本文整理汇总了C#中IPlaybackManager类的典型用法代码示例。如果您正苦于以下问题:C# IPlaybackManager类的具体用法?C# IPlaybackManager怎么用?C# IPlaybackManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPlaybackManager类属于命名空间,在下文中一共展示了IPlaybackManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ScreensaverManager
public ScreensaverManager(IUserInputManager userInput, IPresentationManager presentationManager, IPlaybackManager playback, ISessionManager session, IApiClient apiClient, ITheaterConfigurationManager theaterConfigurationManager, ILogManager logManager, IServerEvents serverEvents)
{
_userInput = userInput;
_presentationManager = presentationManager;
_playback = playback;
_session = session;
_apiClient = apiClient;
_theaterConfigurationManager = theaterConfigurationManager;
_logger = logManager.GetLogger(GetType().Name);
_serverEvents = serverEvents;
_session.UserLoggedIn += session_UserChanged;
_session.UserLoggedOut += session_UserChanged;
_playback.PlaybackCompleted += _playback_PlaybackCompleted;
_playback.PlaybackStarted += _playback_PlaybackStarted;
_serverEvents.BrowseCommand += _serverEvents_BrowseCommand;
_serverEvents.MessageCommand += _serverEvents_MessageCommand;
_serverEvents.PlayCommand += _serverEvents_PlayCommand;
_serverEvents.PlaystateCommand += _serverEvents_PlaystateCommand;
_serverEvents.GeneralCommand += _serverEvents_GeneralCommand;
SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;
StartTimer();
}
示例2: InternalDirectShowPlayer
public InternalDirectShowPlayer(ILogManager logManager, IHiddenWindow hiddenWindow, IPresentationManager presentation, ISessionManager sessionManager, IPlaybackManager playbackManager, ITheaterConfigurationManager config, IIsoManager isoManager, IUserInputManager inputManager, IZipClient zipClient, IHttpClient httpClient, IConnectionManager connectionManager)
{
_logger = logManager.GetLogger("InternalDirectShowPlayer");
_hiddenWindow = hiddenWindow;
_presentation = presentation;
_sessionManager = sessionManager;
_httpClient = httpClient;
_connectionManager = connectionManager;
_playbackManager = playbackManager;
_config = config;
_isoManager = isoManager;
_inputManager = inputManager;
_zipClient = zipClient;
_config.Configuration.InternalPlayerConfiguration.VideoConfig.SetDefaults();
_config.Configuration.InternalPlayerConfiguration.AudioConfig.SetDefaults();
_config.Configuration.InternalPlayerConfiguration.SubtitleConfig.SetDefaults();
_config.Configuration.InternalPlayerConfiguration.COMConfig.SetDefaults();
//use a static object so we keep the libraries in the same place. Doesn't usually matter, but the EVR Presenter does some COM hooking that has problems if we change the lib address.
if (_privateCom == null)
_privateCom = new URCOMLoader(_config, _zipClient);
EnsureMediaFilters();
}
示例3: GetInstantMixPlaylist
internal static async Task<List<PlaylistItem>> GetInstantMixPlaylist(this IApiClient apiClient, BaseItemDto item, IPlaybackManager playbackManager)
{
ItemsResult result;
var query = new SimilarItemsQuery { UserId = AuthenticationService.Current.LoggedInUserId, Id = item.Id, Fields = new []{ ItemFields.MediaSources}};
switch (item.Type)
{
case "Audio":
result = await apiClient.GetInstantMixFromSongAsync(query);
break;
case "MusicArtist":
result = await apiClient.GetInstantMixFromArtistAsync(query);
break;
case "MusicAlbum":
result = await apiClient.GetInstantMixFromAlbumAsync(query);
break;
case "Genre":
result = await apiClient.GetInstantMixFromMusicGenreAsync(query);
break;
default:
return new List<PlaylistItem>();
}
if (result == null || result.Items.IsNullOrEmpty())
{
return new List<PlaylistItem>();
}
return await result.Items.ToList().ToPlayListItems(apiClient, playbackManager);
}
示例4: MainViewModel
/// <summary>
/// Initializes a new instance of the MainViewModel class.
/// </summary>
public MainViewModel(IConnectionManager connectionManager, INavigationService navigationService, IPlaybackManager playbackManager)
: base(navigationService, connectionManager)
{
_playbackManager = playbackManager;
Folders = new ObservableCollection<BaseItemDto>();
RecentItems = new ObservableCollection<BaseItemDto>();
FavouriteItems = new ObservableCollection<BaseItemDto>();
InProgressItems = new ObservableCollection<BaseItemDto>();
UserViews = new ObservableCollection<BaseItemDto>();
if (IsInDesignMode)
{
Folders.Add(new BaseItemDto { Id = "78dbff5aa1c2101b98ebaf42b72a988d", Name = "Movies", UserData = new UserItemDataDto { UnplayedItemCount = 6 } });
RecentItems.Add(new BaseItemDto { Id = "2fc6f321b5f8bbe842fcd0eed089561d", Name = "A Night To Remember" });
}
else
{
WireCommands();
DummyFolder = new BaseItemDto
{
Type = "folder",
Name = AppResources.LabelRecent.ToLower()
};
}
}
示例5: PageContentViewModel
public PageContentViewModel(INavigationService navigationService, ISessionManager sessionManager, IPlaybackManager playbackManager, ILogger logger, ITheaterApplicationHost appHost, IApiClient apiClient, IPresentationManager presentationManager, IServerEvents serverEvents)
{
NavigationService = navigationService;
SessionManager = sessionManager;
PlaybackManager = playbackManager;
Logger = logger;
AppHost = appHost;
ApiClient = apiClient;
PresentationManager = presentationManager;
ServerEvents = serverEvents;
MasterCommands = new MasterCommandsViewModel(navigationService, sessionManager, presentationManager, apiClient, logger, appHost, serverEvents);
NavigationService.Navigated += NavigationServiceNavigated;
SessionManager.UserLoggedIn += SessionManagerUserLoggedIn;
SessionManager.UserLoggedOut += SessionManagerUserLoggedOut;
PlaybackManager.PlaybackStarted += PlaybackManager_PlaybackStarted;
PlaybackManager.PlaybackCompleted += PlaybackManager_PlaybackCompleted;
_dispatcher = Dispatcher.CurrentDispatcher;
_clockTimer = new Timer(ClockTimerCallback, null, 0, 10000);
IsLoggedIn = SessionManager.CurrentUser != null;
var page = NavigationService.CurrentPage;
IsOnHomePage = page is IHomePage;
IsOnFullscreenVideo = page is IFullscreenVideoPage;
}
示例6: PlaybackProgressReporter
public PlaybackProgressReporter(IConnectionManager connectionManager, IMediaPlayer mediaPlayer, ILogger logger, IPlaybackManager playback)
{
_connectionManager = connectionManager;
_mediaPlayer = mediaPlayer;
_logger = logger;
_playback = playback;
}
示例7: ToPlaylistItem
internal static async Task<PlaylistItem> ToPlaylistItem(this BaseItemDto item, IApiClient apiClient, IPlaybackManager playbackManager)
{
var profile = VideoProfileHelper.GetWindowsPhoneProfile();
var options = new AudioOptions
{
Profile = profile,
ItemId = item.Id,
DeviceId = apiClient.DeviceId,
MediaSources = item.MediaSources
};
//var streamInfo = await playbackManager.GetAudioStreamInfo(App.ServerInfo.Id, options, true, apiClient);
var streamBuilder = new StreamBuilder(new MBLogger());
var streamInfo = streamBuilder.BuildAudioItem(options);
var streamUrl = streamInfo.ToUrl(apiClient.GetApiUrl("/"), apiClient.AccessToken);
return new PlaylistItem
{
Album = item.Album,
Artist = item.AlbumArtist,
TrackName = item.Name,
TrackUrl = streamUrl.Replace(App.ServerInfo.LocalAddress, !string.IsNullOrEmpty(App.ServerInfo.ManualAddress) ? App.ServerInfo.ManualAddress : App.ServerInfo.RemoteAddress),
MediaBrowserId = item.Id,
IsJustAdded = true,
ImageUrl = (string) ImageConverter.Convert(item, typeof (string), null, null),
BackgroundImageUrl = (string) ImageConverter.Convert(item, typeof (string), "backdrop", null),
RunTimeTicks = item.RunTimeTicks ?? 0
};
}
示例8: PlaybackProgressReporter
public PlaybackProgressReporter(IApiClient apiClient, IMediaPlayer mediaPlayer, ILogger logger, IPlaybackManager playback)
{
_apiClient = apiClient;
_mediaPlayer = mediaPlayer;
_logger = logger;
_playback = playback;
}
示例9: FavoritesViewModel
public FavoritesViewModel(IPresentationManager presentation, IImageManager imageManager, IApiClient apiClient, ISessionManager session, INavigationService nav, IPlaybackManager playback, ILogger logger, double tileWidth, double tileHeight, IServerEvents serverEvents)
: base(presentation, apiClient)
{
_sessionManager = session;
_playbackManager = playback;
_imageManager = imageManager;
_navService = nav;
_logger = logger;
_serverEvents = serverEvents;
TileWidth = tileWidth;
TileHeight = tileHeight;
var spotlightTileWidth = TileWidth * 2 + TilePadding;
var spotlightTileHeight = spotlightTileWidth * 9 / 16;
SpotlightViewModel = new ImageViewerViewModel(_imageManager, new List<ImageViewerImage>())
{
Height = spotlightTileHeight,
Width = spotlightTileWidth,
CustomCommandAction = i => _navService.NavigateToItem(i.Item, ViewType.Tv)
};
LoadViewModels();
NavigateToFavoriteMoviesCommand = new RelayCommand(o => NavigateToFavorites("Movie"));
}
示例10: MainWindow
/// <summary>
/// Initializes a new instance of the <see cref="MainWindow" /> class.
/// </summary>
public MainWindow(ILogger logger, IPlaybackManager playbackManager, IApiClient apiClient, IImageManager imageManager, IApplicationHost appHost, IPresentationManager appWindow, IUserInputManager userInput, ITheaterConfigurationManager config, INavigationService nav, IScreensaverManager screensaverManager)
: base()
{
_logger = logger;
_appHost = appHost;
_appWindow = appWindow;
_config = config;
_playbackManager = playbackManager;
UserInputManager = userInput;
NavigationManager = nav;
Loaded += MainWindow_Loaded;
InitializeComponent();
RotatingBackdrops = new RotatingBackdropsViewModel(apiClient, _config, imageManager, playbackManager, logger, screensaverManager);
_config.ConfigurationUpdated += _config_ConfigurationUpdated;
_playbackManager.PlaybackStarted += _playbackManager_PlaybackStarted;
_playbackManager.PlaybackCompleted += _playbackManager_PlaybackCompleted;
//Timeline.DesiredFrameRateProperty.OverrideMetadata(
// typeof(Timeline),
// new FrameworkPropertyMetadata { DefaultValue = 30 }
//);
}
示例11: ThemeSongEntryPoint
public ThemeSongEntryPoint(INavigationService nav, IPlaybackManager playback, IApiClient apiClient, ISessionManager session)
{
_nav = nav;
_playback = playback;
_apiClient = apiClient;
_session = session;
}
示例12: CommandActionsEntryPoint
public CommandActionsEntryPoint(ICommandManager commandManager, ITheaterApplicationHost appHost, IPresenter presentationManager, IPlaybackManager playbackManager, INavigator navigationService, /*IScreensaverManager screensaverManager,*/ ILogManager logManager, IEventAggregator events)
{
_commandManager = commandManager;
_defaultCommandActionMap = new DefaultCommandActionMap(appHost, presentationManager, playbackManager, navigationService, /*screensaverManager,*/ logManager, events);
_logger = logManager.GetLogger(GetType().Name);
}
示例13: CommandActionsEntryPoint
public CommandActionsEntryPoint(ICommandManager commandManager, IPresentationManager presentationManager, IPlaybackManager playbackManager, INavigationService navigationService, IScreensaverManager screensaverManager, ILogManager logManager)
{
_commandManager = commandManager;
_defaultCommandActionMap = new DefaultCommandActionMap(presentationManager, playbackManager, navigationService, screensaverManager, logManager);
_logger = logManager.GetLogger(GetType().Name);
}
示例14: PlaybackProgressReporter
public PlaybackProgressReporter(IConnectionManager connectionManager, IMediaPlayer mediaPlayer, ILogger logger, IPlaybackManager internalPlaybackManager, ApiInteraction.Playback.IPlaybackManager apiPlaybackManager)
{
_connectionManager = connectionManager;
_mediaPlayer = mediaPlayer;
_logger = logger;
_internalPlaybackManager = internalPlaybackManager;
_apiPlaybackManager = apiPlaybackManager;
}
示例15: ThemeSongEntryPoint
public ThemeSongEntryPoint(INavigationService nav, IPlaybackManager playback, ISessionManager session, IConnectionManager connectionManager, ILogger logger)
{
_nav = nav;
_playback = playback;
_session = session;
_connectionManager = connectionManager;
_logger = logger;
}