public MusicPlayerViewModel(HistoryService historyService, IMediaService mediaService, VlcService mediaPlayerService) : base(historyService, mediaService, mediaPlayerService) { _trackCollection = new TrackCollectionViewModel(); _mediaService.MediaEnded += MediaService_MediaEnded; _historyService = historyService; }
public PlayVideoViewModel(HistoryService historyService, IMediaService mediaService, VlcService mediaPlayerService) : base(historyService, mediaService, mediaPlayerService) { _subtitles = new ObservableCollection<Subtitle>(); _subtitlesTracks = new Dictionary<int, string>(); _audioTracks = new Dictionary<int, string>(); #if NETFX_CORE _mouseService = App.Container.Resolve<MouseService>(); #endif _setSubTitlesCommand = new SetSubtitleTrackCommand(); _setAudioTrackCommand = new SetAudioTrackCommand(); _openSubtitleCommand = new OpenSubtitleCommand(); }
public LastViewedViewModel() { _historyService = App.Container.Resolve<HistoryService>(); if (_historyService.FileCount() > 0) { LastViewedSectionVisible = true; } else { WelcomeSectionVisible = true; } _clearHistoryCommand = new ClearHistoryCommand(); _historyService.HistoryUpdated += UpdateHistory; }
protected MediaPlaybackViewModel(HistoryService historyService, IMediaService mediaService, VlcService mediaPlayerService) { _historyService = historyService; _mediaService = mediaService; _mediaService.StatusChanged += PlayerStateChanged; _vlcPlayerService = mediaPlayerService; _displayAlwaysOnRequest = new DisplayRequest(); _sliderPositionTimer = new DispatcherTimer(); _sliderPositionTimer.Tick += FirePositionUpdate; _sliderPositionTimer.Interval = TimeSpan.FromMilliseconds(16); _skipAhead = new ActionCommand(() => _mediaService.SkipAhead()); _skipBack = new ActionCommand(() => _mediaService.SkipBack()); _playNext = new PlayNextCommand(); _playPrevious = new PlayPreviousCommand(); _playOrPause = new PlayPauseCommand(); _goBackCommand = new StopVideoCommand(); }
public MediaService(HistoryService historyService, VlcService vlcService) { _historyService = historyService; _vlcService = vlcService; _vlcService.MediaEnded += VlcPlayerService_MediaEnded; _vlcService.StatusChanged += VlcPlayerService_StatusChanged; MediaControl.IsPlaying = false; CoreWindow.GetForCurrentThread().Activated += ApplicationState_Activated; }
public VlcService(HistoryService historyService) { CurrentState = MediaPlayerState.Stopped; _historyService = historyService; }