Esempio n. 1
0
        public IPlayer GetPlayer(MediaItem mediaItem)
        {
            string mimeType;
            string title;

            if (!mediaItem.GetPlayData(out mimeType, out title))
            {
                return(null);
            }
            if (Enabled && mimeType == "video/bluray")
            {
                IResourceLocator locator = mediaItem.GetResourceLocator();
                BDPlayer         player  = new BDPlayer();
                try
                {
                    player.SetMediaItem(locator, title);
                }
                catch (Exception)
                {
                    LogError("Error playing media item '{0}'", locator);
                    player.Dispose();
                    return(null);
                }
                return(player);
            }
            return(null);
        }
 public IPlayer GetPlayer(IResourceLocator locator, string mimeType)
 {
     if (Enabled && mimeType == "video/bluray")
       {
     BDPlayer player = new BDPlayer();
     try
     {
       player.SetMediaItemLocator(locator);
     }
     catch (Exception)
     {
       LogError("Error playing media item '{0}'", locator);
       player.Dispose();
       return null;
     }
     return player;
       }
       return null;
 }
 public IPlayer GetPlayer(MediaItem mediaItem)
 {
     string mimeType;
       string title;
       if (!mediaItem.GetPlayData(out mimeType, out title))
     return null;
       if (Enabled && mimeType == "video/bluray")
       {
     IResourceLocator locator = mediaItem.GetResourceLocator();
     BDPlayer player = new BDPlayer();
     try
     {
       player.SetMediaItem(locator, title);
     }
     catch (Exception)
     {
       LogError("Error playing media item '{0}'", locator);
       player.Dispose();
       return null;
     }
     return player;
       }
       return null;
 }