public SelectableMediaStreamListViewModel(IPresentationManager presentationManager, IPlaybackManager playbackManager) { _playbackManager = playbackManager; _presentationManager = presentationManager; ActivateCommand = new RelayCommand(ActivateStream); }
public PlaybackProgressReporter(IConnectionManager connectionManager, IMediaPlayer mediaPlayer, ILogger logger, IPlaybackManager playback) { _connectionManager = connectionManager; _mediaPlayer = mediaPlayer; _logger = logger; _playback = playback; }
/// <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 } //); }
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(); }
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 }; }
/// <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() }; } }
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")); }
/// <summary> /// Initializes a new instance of the <see cref="GenericExternalPlayer" /> class. /// </summary> /// <param name="playbackManager">The playback manager.</param> /// <param name="logger">The logger.</param> /// <param name="userInput">The user input.</param> public GenericExternalPlayer(IPlaybackManager playbackManager, ILogger logger, IUserInputManager userInput, IIsoManager isoManager) { _playbackManager = playbackManager; Logger = logger; _userInput = userInput; _isoManager = isoManager; }
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; }
/// <summary> /// Attaches and configures a new playback handler. /// </summary> /// <param name="Player">The playback handler to attach.</param> private void AttachPlayer(IPlaybackManager Player) { #region Error checking if (Player == null) { return; } #endregion int PreviousVolume = 100; if (this.Player != null) { PreviousVolume = this.Player.Volume; this.Player.SongEnded -= this.PlayNext; this.Player.Dispose(); } this.Player = Player; this.viewModel.PlaybackManager = Player; this.Player.Volume = PreviousVolume; PlaybackController.Player = this.Player; this.Player.SongEnded += this.PlayNext; //Send toast notification ShowToast(Player); }
private void SetCurrentPlayer(MediaFileType fileType) { if (_currentPlaybackManager != null) { RemoveEventHandlers(); } switch (fileType) { case MediaFileType.AudioUrl: case MediaFileType.AudioFile: _currentPlaybackManager = AudioPlayer; break; case MediaFileType.VideoUrl: case MediaFileType.VideoFile: _currentPlaybackManager = VideoPlayer; break; case MediaFileType.Other: break; default: throw new ArgumentOutOfRangeException(); } AddEventHandlers(); }
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")); }
/// <summary> /// Shows toast notification. /// </summary> /// <param name="Player">The IPlaybackManager instance which holds the song's information.</param> private void ShowToast(IPlaybackManager Player) { #region Error checking if (Player == null || Player.SongInfo == null) { return; } #endregion //We don't need to display toast when it is disabled in the config if (!App.Config.ToastOnSongOpen) { return; } System.Drawing.Image AlbumImage = TomiSoft.MP3Player.Properties.Resources.AbstractAlbumArt; if (this.Player.SongInfo.AlbumImage != null) { AlbumImage = this.Player.SongInfo.AlbumImage; } new Toast(App.Name) { Title = this.Player.SongInfo.Title ?? "Ismeretlen szám", Content = this.Player.SongInfo.Artist ?? "Ismeretlen előadó", Image = AlbumImage }.Show(); }
public ThemeSongEntryPoint(INavigationService nav, IPlaybackManager playback, IApiClient apiClient, ISessionManager session) { _nav = nav; _playback = playback; _apiClient = apiClient; _session = session; }
/// <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() }; } }
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); }
public LibraryPopulator(IDatabaseComponent database, IPlaybackManager playbackManager, bool reportProgress, ITransactionSource transaction) : base(reportProgress) { this.Database = database; this.PlaybackManager = playbackManager; this.Transaction = transaction; }
public PlaybackProgressReporter(IApiClient apiClient, IMediaPlayer mediaPlayer, ILogger logger, IPlaybackManager playback) { _apiClient = apiClient; _mediaPlayer = mediaPlayer; _logger = logger; _playback = playback; }
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); }
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(); }
public PlaylistItemScriptRunner(IPlaybackManager playbackManager, IScriptingContext scriptingContext, PlaylistItem playlistItem, string script) { this.PlaybackManager = playbackManager; this.ScriptingContext = scriptingContext; this.PlaylistItem = playlistItem; this.Script = script; }
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); }
/// <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) : 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); _config.ConfigurationUpdated += _config_ConfigurationUpdated; _playbackManager.PlaybackStarted += _playbackManager_PlaybackStarted; _playbackManager.PlaybackCompleted += _playbackManager_PlaybackCompleted; //Timeline.DesiredFrameRateProperty.OverrideMetadata( // typeof(Timeline), // new FrameworkPropertyMetadata { DefaultValue = 30 } //); }
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(); }
public ClientMainFeature(string name, IGameModule topLevelGameModule, ISyncLatestManager syncLatestManager, IPlaybackManager playbackManager, IPredictionInitManager userPredictionInitManager, IUserPredictionInfoProvider predicatoinInfoProvider, ISimulationTimer simulationTimer, IVehicleCmdExecuteSystemHandler vehicleCmdExecuteSystemHandler, IVehicleExecutionSelector vehicleExecutionSelector, ICommonSessionObjects commonSessionObjects) : base(name) { topLevelGameModule.Init(); Add(new ModuleInitSystem(topLevelGameModule, commonSessionObjects.AssetManager)); Add(new EntityCreateSystem(topLevelGameModule).WithExecFrameStep(EEcecuteStep.NormalFrameStep)); Add(new SyncLatestSystem(syncLatestManager).WithExecFrameStep(EEcecuteStep.NormalFrameStep)); if (!SharedConfig.IsOffline) { Add(new PlaybackInitSystem(playbackManager).WithExecFrameStep(EEcecuteStep.NormalFrameStep)); } Add(new PlaybackSystem(topLevelGameModule).WithExecFrameStep(EEcecuteStep.NormalFrameStep)); //添加游戏状态更新处理 Add(new GameStateUpdateSystem(topLevelGameModule).WithExecFrameStep(EEcecuteStep.NormalFrameStep)); // 需要在playback之后,因为要根据车的位置更新人的位置 // 要在predicte之前,因为要根据车的位置,更像摄像机位置 Add(new PhysicsInitSystem(topLevelGameModule).WithExecFrameStep(EEcecuteStep.CmdFrameStep)); Add(new PhysicsUpdateSystem(topLevelGameModule).WithExecFrameStep(EEcecuteStep.CmdFrameStep)); Add(new VehicleCmdExecuteManagerSystem(vehicleExecutionSelector, topLevelGameModule, vehicleCmdExecuteSystemHandler, simulationTimer, false, SharedConfig.ServerAuthorative).WithExecFrameStep(EEcecuteStep.CmdFrameStep)); Add(new UserPrePredictionSystem(topLevelGameModule, predicatoinInfoProvider, userPredictionInitManager).WithExecFrameStep(EEcecuteStep.NormalFrameStep)); //每帧执行的cmd要放在回滚之前,不然会导致多执行帧 Add(new PhysicsPostUpdateSystem(topLevelGameModule).WithExecFrameStep(EEcecuteStep.CmdFrameStep)); Add(new PredictionInitSystem(userPredictionInitManager).WithExecFrameStep(EEcecuteStep.CmdFrameStep)); Add(new UserPredictionSystem(topLevelGameModule, predicatoinInfoProvider, userPredictionInitManager).WithExecFrameStep(EEcecuteStep.CmdFrameStep)); Add(new ResourceLoadSystem(topLevelGameModule, commonSessionObjects.AssetManager).WithExecFrameStep(EEcecuteStep.NormalFrameStep)); Add(new GamePlaySystem(topLevelGameModule).WithExecFrameStep(EEcecuteStep.CmdFrameStep)); Add(new RenderSystem(topLevelGameModule).WithExecFrameStep(EEcecuteStep.NormalFrameStep)); Add(new UiSystem(topLevelGameModule).WithExecFrameStep(EEcecuteStep.UIFrameStep)); Add(new UiHfrSystem(topLevelGameModule).WithExecFrameStep(EEcecuteStep.NormalFrameStep)); Add(new CommonLifeTimeSystem(commonSessionObjects.GameContexts).WithExecFrameStep(EEcecuteStep.NormalFrameStep)); Add(new CommoTickImmutabblitySystem(commonSessionObjects.GameContexts).WithExecFrameStep(EEcecuteStep.NormalFrameStep)); Add(new EntityCleanUpSystem(topLevelGameModule).WithExecFrameStep(EEcecuteStep.NormalFrameStep)); Add(new CommonDestroySystem(commonSessionObjects).WithExecFrameStep(EEcecuteStep.NormalFrameStep)); }
public PlaybackProgressReporter(IConnectionManager connectionManager, IMediaPlayer mediaPlayer, ILogger logger, IPlaybackManager internalPlaybackManager, ApiInteraction.Playback.IPlaybackManager apiPlaybackManager) { _connectionManager = connectionManager; _mediaPlayer = mediaPlayer; _logger = logger; _internalPlaybackManager = internalPlaybackManager; _apiPlaybackManager = apiPlaybackManager; }
public ThemeSongEntryPoint(INavigationService nav, IPlaybackManager playback, ISessionManager session, IConnectionManager connectionManager, ILogger logger) { _nav = nav; _playback = playback; _session = session; _connectionManager = connectionManager; _logger = logger; }
public PlayExternalDiscAppFactory(ISessionManager sessionManager, IPlaybackManager playbackManager, ITheaterConfigurationManager theaterConfigurationManager, IImageManager imageManager, ILogManager logManager) { _playbackManager = playbackManager; _sessionManager = sessionManager; _imageManager = imageManager; _theaterConfigurationManager = theaterConfigurationManager; _logManager = logManager; }
public RotatingBackdropsViewModel(IApiClient apiClient, ITheaterConfigurationManager config, IImageManager imageManager, IPlaybackManager playbackManager, ILogger logger) { _apiClient = apiClient; _config = config; _imageManager = imageManager; _playbackManager = playbackManager; _logger = logger; _dispatcher = Dispatcher.CurrentDispatcher; }
// TODO: Add documentation. // TODO: Add logging. public TextSpeaker(ILogger logger, IApplicationSettingsHelper applicationSettingsHelper, IPlaybackManager playbackManager) { this.playbackManager = playbackManager; this.logger = logger; this.applicationSettingsHelper = applicationSettingsHelper; mediaElement = new MediaElement { Visibility = Visibility.Collapsed }; attachMediElement(); }
public SessionManager(INavigationService navService, IApiClient apiClient, ILogger logger, IThemeManager themeManager, ITheaterConfigurationManager config, IPlaybackManager playback) { _navService = navService; _apiClient = apiClient; _logger = logger; _themeManager = themeManager; _config = config; _playback = playback; }
internal AllJoynInterfaceManager(IPlaybackManager playbackManager, IPlaylistManager playlistManager, IDevicePowerManager powerManager) { this.playbackManager = playbackManager; this.playbackManager.VolumeChanged += PlaybackManager_VolumeChanged; this.playlistManager = playlistManager; this.playlistManager.CurrentTrackChanged += PlaylistManager_CurrentTrackChanged; this.powerManager = powerManager; this.powerManager.PowerStateChanged += PowerManager_PowerStateChanged; }
public FolderPage(BaseItemDto parent, DisplayPreferences displayPreferences, IApiClient apiClient, IImageManager imageManager, IPresentationManager presentation, INavigationService navigationManager, IPlaybackManager playbackManager, ILogger logger, ListPageConfig options) { _logger = logger; _presentationManager = presentation; _imageManager = imageManager; _apiClient = apiClient; _options = options; _parentItem = parent; InitializeComponent(); Loaded += FolderPage_Loaded; SetDefaults(displayPreferences); var playAllFromHere = parent.IsType("playlist") || parent.IsType("musicalbum"); _viewModel = new ItemListViewModel(vm => options.CustomItemQuery(vm, displayPreferences), _presentationManager, _imageManager, _apiClient, navigationManager, playbackManager, _logger) { ImageDisplayHeightGenerator = GetImageDisplayHeight, DisplayNameGenerator = options.DisplayNameGenerator ?? GetDisplayName, PreferredImageTypesGenerator = GetPreferredImageTypes, ShowSidebarGenerator = GetShowSidebar, ScrollDirectionGenerator = GetScrollDirection, AutoSelectFirstItem = true, ShowLoadingAnimation = true, PlayAllFromHereOnPlayCommand = playAllFromHere, PlayAllFromHereOnNavigateCommand = playAllFromHere }; if (options.ShowTitle) { _viewModel.OnItemCreated = v => { v.DisplayNameVisibility = Visibility.Visible; }; } _viewModel.AddIndexOptions(options.IndexOptions); _viewModel.PropertyChanged += _viewModel_PropertyChanged; _viewModel.DisplayPreferences = displayPreferences; if (!string.IsNullOrEmpty(options.IndexValue)) { var index = options.IndexOptions.First(i => string.Equals(i.Name, options.IndexValue)); _viewModel.IndexOptionsCollectionView.MoveCurrentTo(index); } DataContext = _viewModel; }
public PlaylistPopulator(IDatabaseComponent database, IPlaybackManager playbackManager, int sequence, int offset, bool reportProgress, ITransactionSource transaction) : base(reportProgress) { this.Database = database; this.PlaybackManager = playbackManager; this.Sequence = sequence; this.Offset = offset; this.Transaction = transaction; }
public MediaCenterRemoteEntryPoint(IPresentationManager presenation, IPlaybackManager playback, ILogManager logManager, INavigationService nav, IUserInputManager userInput) { _presenation = presenation; _playback = playback; _nav = nav; _userInput = userInput; _logger = logManager.GetLogger(GetType().Name); }
public MediaPlayersPage(INavigationService nav, IPlaybackManager playbackManager, ITheaterConfigurationManager config, IPresentationManager presentation, ISessionManager session) { _nav = nav; _playbackManager = playbackManager; _config = config; _presentation = presentation; _session = session; InitializeComponent(); }
public async Task Pause() { IPlaybackManager currentPlaybackManager = CurrentPlaybackManager; if (currentPlaybackManager != null) { await currentPlaybackManager.Pause(); } }
public DefaultCommandActions(IPresentationManager presenation, IPlaybackManager playback, INavigationService navigation, ILogManager logManager) { _presenation = presenation; _playback = playback; _navigation = navigation; _logger = logManager.GetLogger(GetType().Name); _defaultdActionList = DefaultGlobalCommandActionList(); _nullCommandAction = new CommandAction(Command.Null, NullAction); }
public RotatingBackdropsViewModel(ITheaterConfigurationManager config, IImageManager imageManager, IPlaybackManager playbackManager, ILogger logger, IScreensaverManager screensaverManager, IConnectionManager connectionManager) { _config = config; _imageManager = imageManager; _playbackManager = playbackManager; _logger = logger; _screensaverManager = screensaverManager; _connectionManager = connectionManager; _dispatcher = Dispatcher.CurrentDispatcher; }
public TvHomePageGenerator(IImageManager imageManager, INavigator navigator, IApiClient apiClient, ISessionManager sessionManager, IServerEvents serverEvents, IPlaybackManager playbackManager, ILogManager logManager) { _imageManager = imageManager; _navigator = navigator; _apiClient = apiClient; _sessionManager = sessionManager; _serverEvents = serverEvents; _playbackManager = playbackManager; _logManager = logManager; }
public HomePageViewModel(IPresentationManager presentationManager, ISessionManager sessionManager, ILogger logger, IImageManager imageManager, INavigationService nav, IPlaybackManager playbackManager, IConnectionManager connectionManager) { _presentationManager = presentationManager; _sessionManager = sessionManager; _logger = logger; _imageManager = imageManager; _nav = nav; _playbackManager = playbackManager; _connectionManager = connectionManager; }
/// <summary> /// Initializes a new instance of the <see cref="NVlcPlayer" /> class. /// </summary> /// <param name="hiddenWindow">The hidden window.</param> /// <param name="logManager">The log manager.</param> /// <param name="playbackManager">The playback manager.</param> public NVlcPlayer(IHiddenWindow hiddenWindow, ILogManager logManager, IPlaybackManager playbackManager, ITheaterConfigurationManager config, IUserInputManager userInput, IPresentationManager presentation) { _hiddenWindow = hiddenWindow; _playbackManager = playbackManager; _config = config; _userInput = userInput; _presentation = presentation; _logger = logManager.GetLogger(Name); }
public ScreensaverEntryPoint(IUserInputManager userInput, IPresentationManager presentationManager, IPlaybackManager playback, ISessionManager session, IApiClient apiClient, IImageManager imageManager, ILogger logger) { _userInput = userInput; _presentationManager = presentationManager; _playback = playback; _session = session; _apiClient = apiClient; _imageManager = imageManager; _logger = logger; }
private const double DuplicateCommandPeriod = 500;// Milliseconds public CommandManager(IPresentationManager presentationManager, IPlaybackManager playbackManager, INavigationService navigationService, IUserInputManager userInputManager, ILogManager logManager) { _userInputManager = userInputManager; _inputCommandMaps = new InputCommandMaps(); _userInputManager.KeyDown += input_KeyDown; _userInputManager.AppCommand += input_AppCommand; _logger = logManager.GetLogger(GetType().Name); }
private const double DuplicateCommandPeriod = 500;// Milliseconds public CommandManager(IPresentationManager presentationManager, IPlaybackManager playbackManager, INavigationService navigationService, IUserInputManager userInputManager, ILogManager logManager) { _userInputManager = userInputManager; _defaultCommandActions = new DefaultCommandActions(presentationManager, playbackManager, navigationService, logManager); _userInputManager.KeyDown += input_KeyDown; _userInputManager.AppCommand += input_AppCommand; _logger = logManager.GetLogger(GetType().Name); }