Example #1
0
        public VideoEndedRecommendation(
            MediaPlayer mediaPlayer,
            IMessenger messenger,
            IScheduler scheduler,
            QueuePlaylist queuePlaylist,
            RelatedVideoContentsAggregator relatedVideoContentsAggregator,
            PrimaryViewPlayerManager primaryViewPlayerManager,
            PlayerSettings playerSettings,
            AppearanceSettings appearanceSettings,
            HohoemaPlaylistPlayer hohoemaPlaylistPlayer,
            VideoPlayedHistoryRepository videoPlayedHistoryRepository
            )
        {
            _mediaPlayer   = mediaPlayer;
            _messenger     = messenger;
            _scheduler     = scheduler;
            _queuePlaylist = queuePlaylist;
            _relatedVideoContentsAggregator = relatedVideoContentsAggregator;
            _primaryViewPlayerManager       = primaryViewPlayerManager;
            _playerSettings               = playerSettings;
            _appearanceSettings           = appearanceSettings;
            _hohoemaPlaylistPlayer        = hohoemaPlaylistPlayer;
            _videoPlayedHistoryRepository = videoPlayedHistoryRepository;
            IsEnded     = new ReactiveProperty <bool>(_scheduler);
            HasRecomend = new ReactiveProperty <bool>(_scheduler);

            _messenger.RegisterAll(this);
        }
        public VideoQueuePageViewModel(
            ILoggerFactory loggerFactory,
            IMessenger messenger,
            QueuePlaylist queuePlaylist,
            QueuePlaylistSetting queuePlaylistSetting,
            ApplicationLayoutManager applicationLayoutManager,
            RemoveWatchedItemsInAfterWatchPlaylistCommand removeWatchedItemsInAfterWatchPlaylistCommand,
            PlaylistPlayAllCommand playlistPlayAllCommand,
            SelectionModeToggleCommand selectionModeToggleCommand,
            VideoPlayWithQueueCommand videoPlayWithQueueCommand,
            NicoVideoProvider nicoVideoProvider
            )
            : base(loggerFactory.CreateLogger <VideoQueuePageViewModel>())
        {
            _messenger               = messenger;
            QueuePlaylist            = queuePlaylist;
            _queuePlaylistSetting    = queuePlaylistSetting;
            ApplicationLayoutManager = applicationLayoutManager;
            RemoveWatchedItemsInAfterWatchPlaylistCommand = removeWatchedItemsInAfterWatchPlaylistCommand;
            PlaylistPlayAllCommand     = playlistPlayAllCommand;
            SelectionModeToggleCommand = selectionModeToggleCommand;
            VideoPlayWithQueueCommand  = videoPlayWithQueueCommand;
            _nicoVideoProvider         = nicoVideoProvider;

            IsEnableGroupingByTitleSimulality = _queuePlaylistSetting.ToReactivePropertyAsSynchronized(x => x.IsGroupingNearByTitleThenByTitleAscending, mode: ReactivePropertyMode.DistinctUntilChanged)
                                                .AddTo(_CompositeDisposable);

            CurrentPlaylistToken = this.ObserveProperty(x => x.SelectedSortOptionItem)
                                   .Select(x => new PlaylistToken(QueuePlaylist, x))
                                   .ToReadOnlyReactivePropertySlim()
                                   .AddTo(_CompositeDisposable);
        }
        public VideoPlayRequestBridgeToPlayer(
            IMessenger messenger,
            AppearanceSettings appearanceSettings,
            Lazy <AppWindowSecondaryViewPlayerManager> secondaryPlayerViewManager,
            Lazy <PrimaryViewPlayerManager> primaryViewPlayerManager,
            LocalObjectStorageHelper localObjectStorageHelper,
            QueuePlaylist queuePlaylist,
            NicoVideoProvider nicoVideoProvider,
            NicoLiveProvider nicoLiveProvider,
            PlaylistItemsSourceResolver playlistItemsSourceResolver
            )
        {
            _messenger                   = messenger;
            _appearanceSettings          = appearanceSettings;
            __secondaryPlayerManager     = secondaryPlayerViewManager;
            __primaryViewPlayerManager   = primaryViewPlayerManager;
            _localObjectStorage          = localObjectStorageHelper;
            _queuePlaylist               = queuePlaylist;
            _nicoVideoProvider           = nicoVideoProvider;
            _nicoLiveProvider            = nicoLiveProvider;
            _playlistItemsSourceResolver = playlistItemsSourceResolver;

            _messenger.Register <VideoPlayRequestMessage>(this);
            _messenger.Register <PlayerPlayLiveRequestMessage>(this);
            _messenger.Register <ChangePlayerDisplayViewRequestMessage>(this);
        }
Example #4
0
        public HohoemaNotificationService(
            PageManager pageManager,
            QueuePlaylist queuePlaylist,
            HohoemaPlaylistPlayer hohoemaPlaylistPlayer,
            NiconicoSession niconicoSession,
            NotificationService notificationService,
            NicoVideoProvider nicoVideoProvider,
            MylistProvider mylistProvider,
            NicoLiveProvider nicoLiveProvider,
            CommunityProvider communityProvider,
            UserProvider userProvider,
            IMessenger messenger
            )
        {
            PageManager         = pageManager;
            _queuePlaylist      = queuePlaylist;
            _niconicoSession    = niconicoSession;
            NotificationService = notificationService;
            NicoVideoProvider   = nicoVideoProvider;
            MylistProvider      = mylistProvider;
            NicoLiveProvider    = nicoLiveProvider;
            CommunityProvider   = communityProvider;
            UserProvider        = userProvider;

            _messenger = messenger;
        }
 public LocalMylistPlaylistFactory(
     LocalMylistManager localMylistManager,
     QueuePlaylist queuePlaylist
     )
 {
     _localMylistManager = localMylistManager;
     _queuePlaylist      = queuePlaylist;
 }
Example #6
0
 public QueueAddItemCommand(
     QueuePlaylist queuePlaylist,
     NotificationService notificationService
     )
 {
     _queuePlaylist       = queuePlaylist;
     _notificationService = notificationService;
 }
Example #7
0
 public RemoveWatchedItemsInAfterWatchPlaylistCommand(
     QueuePlaylist queuePlaylist,
     VideoPlayedHistoryRepository videoPlayedHistoryRepository
     )
 {
     _queuePlaylist = queuePlaylist;
     _videoPlayedHistoryRepository = videoPlayedHistoryRepository;
 }
 public QueuePlaylistIncrementalLoadingSource(
     QueuePlaylist playlist,
     QueuePlaylistSortOption sortOption,
     NicoVideoProvider nicoVideoProvider
     )
 {
     _playlist          = playlist;
     _sortOption        = sortOption;
     _nicoVideoProvider = nicoVideoProvider;
 }
 static VideoItemViewModel()
 {
     _messenger     = Microsoft.Toolkit.Mvvm.DependencyInjection.Ioc.Default.GetService <IMessenger>();
     _queuePlaylist = Microsoft.Toolkit.Mvvm.DependencyInjection.Ioc.Default.GetService <QueuePlaylist>();
     _cacheManager  = Microsoft.Toolkit.Mvvm.DependencyInjection.Ioc.Default.GetService <VideoCacheManager>();
     _scheduler     = Microsoft.Toolkit.Mvvm.DependencyInjection.Ioc.Default.GetService <IScheduler>();
     _videoPlayedHistoryRepository = Microsoft.Toolkit.Mvvm.DependencyInjection.Ioc.Default.GetService <VideoPlayedHistoryRepository>();
     _addWatchAfterCommand         = Microsoft.Toolkit.Mvvm.DependencyInjection.Ioc.Default.GetService <QueueAddItemCommand>();
     _removeWatchAfterCommand      = Microsoft.Toolkit.Mvvm.DependencyInjection.Ioc.Default.GetService <QueueRemoveItemCommand>();
 }
 public QueueMenuItemViewModel(QueuePlaylist queuePlaylist, IMessenger messenger)
 {
     _queuePlaylist     = queuePlaylist;
     _messenger         = messenger;
     QueuePlaylistCount = _queuePlaylist
                          .ObserveProperty(x => x.TotalCount)
                          .Do(_ => PlayQueuePlaylistCommand.NotifyCanExecuteChanged())
                          .ToReactiveProperty()
     ;
 }
        public VideoItemsListView()
        {
            this.InitializeComponent();

            // Selection
            _selectionContext     = Microsoft.Toolkit.Mvvm.DependencyInjection.Ioc.Default.GetService <VideoItemsSelectionContext>();
            _niconicoSession      = Microsoft.Toolkit.Mvvm.DependencyInjection.Ioc.Default.GetService <NiconicoSession>();
            _localPlaylistManager = Microsoft.Toolkit.Mvvm.DependencyInjection.Ioc.Default.GetService <LocalMylistManager>();
            _mylistManager        = Microsoft.Toolkit.Mvvm.DependencyInjection.Ioc.Default.GetService <LoginUserOwnedMylistManager>();
            _queuePlaylist        = Microsoft.Toolkit.Mvvm.DependencyInjection.Ioc.Default.GetService <QueuePlaylist>();

            _addQueueCommand           = Microsoft.Toolkit.Mvvm.DependencyInjection.Ioc.Default.GetService <QueueAddItemCommand>();
            _removeQueueCommand        = Microsoft.Toolkit.Mvvm.DependencyInjection.Ioc.Default.GetService <QueueRemoveItemCommand>();
            _addMylistCommand          = Microsoft.Toolkit.Mvvm.DependencyInjection.Ioc.Default.GetService <MylistAddItemCommand>();
            _localMylistAddCommand     = new LocalPlaylistAddItemCommand();
            _removeWatchHistoryCommand = Microsoft.Toolkit.Mvvm.DependencyInjection.Ioc.Default.GetService <WatchHistoryRemoveItemCommand>();
            _copyMylistItemCommand     = Microsoft.Toolkit.Mvvm.DependencyInjection.Ioc.Default.GetService <MylistCopyItemCommand>();
            _moveMylistItemCommand     = Microsoft.Toolkit.Mvvm.DependencyInjection.Ioc.Default.GetService <MylistMoveItemCommand>();

            Loaded   += VideoItemsListView_Loaded;
            Unloaded += VideoItemsListView_Unloaded;
        }
Example #12
0
        public FeedResultAddToWatchLater(
            IScheduler scheduler,
            SubscriptionManager subscriptionManager,
            SubscriptionSettings subscriptionSettingsRepository,
            QueuePlaylist queuePlaylist
            )
        {
            _scheduler                      = scheduler;
            _subscriptionManager            = subscriptionManager;
            _subscriptionSettingsRepository = subscriptionSettingsRepository;
            _queuePlaylist                  = queuePlaylist;
            Observable.FromEventPattern <SubscriptionFeedUpdateResult>(
                h => _subscriptionManager.Updated += h,
                h => _subscriptionManager.Updated -= h
                )
            .Select(x => x.EventArgs)
            .Do(x => Results.Add(x))
            .Throttle(TimeSpan.FromSeconds(5))
            .SubscribeOn(_scheduler)
            .Subscribe(_ =>
            {
                var items = Results.ToList();
                Results.Clear();

                foreach (var newVideo in items.SelectMany(x => x.NewVideos))
                {
                    if (!_queuePlaylist.Contains(newVideo.VideoId))
                    {
                        _queuePlaylist.Add(newVideo);

                        Debug.WriteLine("[FeedResultAddToWatchLater] added: " + newVideo.Label);
                    }
                }

                /*
                 * if (!_subscriptionSettingsRepository.IsSortWithSubscriptionUpdated)
                 * {
                 *  foreach (var newVideo in items.SelectMany(x => x.NewVideos))
                 *  {
                 *      _queuePlaylist.Add(newVideo);
                 *
                 *      Debug.WriteLine("[FeedResultAddToWatchLater] added: " + newVideo.Label);
                 *  }
                 * }
                 * else
                 * {
                 *  // 注意: SubscriptionManager.Updatedイベントの挙動に依存した動作になる
                 *  // 新着動画が無くても購読を上から順番に全部更新し通知するという仕様に依存する
                 *  // キチンとやるなら 新着の無い購読ソースの動画が歯抜けにならぬよう SubscriptionManager.GetAllSubscriptionInfo() を利用して埋める必要がある
                 *
                 *  var backup = _hohoemaPlaylist.QueuePlaylist.ToImmutableArray();
                 *  var watchAfterItems = _hohoemaPlaylist.QueuePlaylist.ToDictionary(x => x.VideoId);
                 *  _hohoemaPlaylist.QueuePlaylist.ClearOnScheduler();
                 *
                 *  List<NicoVideo> videos = new List<NicoVideo>();
                 *  foreach (var subscUpdateResult in items)
                 *  {
                 *      // あとで見るに購読から追加済みのものを切り分けてリスト化
                 *      List<NicoVideo> unsortedVideos = new List<NicoVideo>();
                 *      foreach (var video in subscUpdateResult.Videos)
                 *      {
                 *          if (watchAfterItems.Remove(video.Id, out var item))
                 *          {
                 *              unsortedVideos.Add(video);
                 *          }
                 *      }
                 *
                 *      // 新着動画も加えて
                 *      unsortedVideos.AddRange(subscUpdateResult.NewVideos);
                 *
                 *      if (subscUpdateResult.Entity.SourceType == SubscriptionSourceType.User)
                 *      {
                 *          // 購読ソース毎の動画リストに対するソートを実行
                 *          // 1. タイトルの類似度によるグループ化
                 *          // 2. 類似度グループ内でのPostAtによる昇順ソート(同一投稿時間の場合は動画タイトルによる昇順ソート)
                 *          // 3. 各類似度グループの個数による昇順ソート
                 *
                 *          const double TitleSimilarlityThreshold = 0.60;
                 *
                 *          // Note: 類似度のしきい値について
                 *          // 0.9ぐらい高くしてしまうと、例えばパート投稿してるシリーズの「サブタイトル」部分の変化で類似判定から漏れてしまいます
                 *          // 逆に低すぎると「【ゆっくり実況】xxxxxのxxxx partYY」といったタイトルの他パート動画と同じ定型部分によって類似判定が通ってしまいます
                 *
                 *          var nearByTitleMap = new Dictionary<string, List<NicoVideo>>();
                 *          foreach (var video in unsortedVideos)
                 *          {
                 *              bool isDetected = false;
                 *              foreach (var heroTitle in nearByTitleMap.Keys)
                 *              {
                 *                  if (StringHelper.CalculateSimilarity(heroTitle, video.Title) >= TitleSimilarlityThreshold)
                 *                  {
                 *                      nearByTitleMap[heroTitle].Add(video);
                 *                      isDetected = true;
                 *                      break;
                 *                  }
                 *              }
                 *
                 *              if (!isDetected)
                 *              {
                 *                  nearByTitleMap.Add(video.Title, new List<NicoVideo>() { video });
                 *              }
                 *          }
                 *
                 *          videos.AddRange(nearByTitleMap.Values.OrderBy(x => x.Count).SelectMany(x => x.OrderBy(x => x.PostedAt).ThenBy(x => x.Title)));
                 *      }
                 *      else
                 *      {
                 *          videos.AddRange(unsortedVideos.OrderBy(x => x.PostedAt));
                 *      }
                 *
                 *  }
                 *
                 *  // ここまでで watchAfterItems には購読ソースに関連しない動画のみが残ってる
                 *
                 *  // 購読ソース毎タイトルでソート済みの動画 と あとで見るに追加されていたが購読ソースと関連しない動画 を連結してあとで見るに追加
                 *  try
                 *  {
                 *      _hohoemaPlaylist.QueuePlaylist.AddRangeOnScheduler(
                 *          videos.Concat(watchAfterItems.Values)
                 *          );
                 *  }
                 *  catch
                 *  {
                 *      _hohoemaPlaylist.QueuePlaylist.AddRangeOnScheduler(backup);
                 *  }
                 * }
                 */
            });
        }
Example #13
0
        private void VideoItemFlyout_Opening(object sender, object e)
        {
            object dataContext = Target.DataContext ?? (Target as SelectorItem)?.Content;
            var    content     = (dataContext as IVideoContent);

            if (content == null || (SelectedVideoItems?.Any() ?? false))
            {
                content     = SelectedVideoItems?.First();
                dataContext = SelectedVideoItems;
            }

            bool isMultipleSelection = AllowSelection && SelectedVideoItems?.Count >= 2;

            var playlist = Playlist;


            // 視聴履歴
            RemoveWatchHisotryItem.Visibility = (content is IWatchHistory).ToVisibility();

            // ローカルプレイリスト
            if (playlist is LocalPlaylist localPlaylist)
            {
                RemoveLocalPlaylistItem.CommandParameter = dataContext;
                RemoveLocalPlaylistItem.Command          = new LocalPlaylistRemoveItemCommand(localPlaylist);
                RemoveLocalPlaylistItem.Visibility       = Visibility.Visible;
            }
            else
            {
                RemoveLocalPlaylistItem.Visibility = Visibility.Collapsed;
            }

            // マイリスト
            if (playlist is LoginUserMylistPlaylist mylistPlaylist)
            {
                RemoveMylistItem.CommandParameter = dataContext;
                RemoveMylistItem.Command          = new MylistRemoveItemCommand(mylistPlaylist);
                RemoveMylistItem.Visibility       = Visibility.Visible;
            }
            else
            {
                RemoveMylistItem.Visibility = Visibility.Collapsed;
            }


            // あとで見る
            AddWatchAfter.CommandParameter    = dataContext;
            RemoveWatchAfter.CommandParameter = dataContext;
            if (isMultipleSelection)
            {
                AddWatchAfter.Visibility    = SelectedVideoItems.All(x => QueuePlaylist.Contains(x.VideoId)).ToInvisibility();
                RemoveWatchAfter.Visibility = SelectedVideoItems.Any(x => QueuePlaylist.Contains(x.VideoId)).ToVisibility();
            }
            else if (QueuePlaylist.Contains(content.VideoId))
            {
                AddWatchAfter.Visibility    = Visibility.Collapsed;
                RemoveWatchAfter.Visibility = Visibility.Visible;
            }
            else
            {
                AddWatchAfter.Visibility    = Visibility.Visible;
                RemoveWatchAfter.Visibility = Visibility.Collapsed;
            }


            // ここから連続再生
            if (!isMultipleSelection &&
                content is not null &&
                playlist is not null
                )
            {
                PlaylistPlayFromHere.Visibility       = Visibility.Visible;
                PlaylistPlayFromHere.Command          = new PlaylistPlayFromHereCommand(playlist, _messenger);
                PlaylistPlayFromHere.CommandParameter = content;
            }
        public VideoPlayerPageViewModel(
            ILoggerFactory loggerFactory,
            IScheduler scheduler,
            IPlayerView playerView,
            NiconicoSession niconicoSession,
            SubscriptionManager subscriptionManager,
            NicoVideoProvider nicoVideoProvider,
            ChannelProvider channelProvider,
            MylistProvider mylistProvider,
            AppearanceSettings appearanceSettings,
            PlayerSettings playerSettings,
            VideoCacheSettings_Legacy cacheSettings,
            ApplicationLayoutManager applicationLayoutManager,
            LocalMylistManager localMylistManager,
            LoginUserOwnedMylistManager userMylistManager,
            PageManager pageManager,
            QueuePlaylist queuePlaylist,
            HohoemaPlaylistPlayer hohoemaPlaylistPlayer,
            MediaPlayer mediaPlayer,
            VideoTogglePlayPauseCommand videoTogglePlayPauseCommand,
            NotificationService notificationService,
            DialogService dialogService,
            AddSubscriptionCommand addSubscriptionCommand,
            LocalPlaylistCreateCommand createLocalMylistCommand,
            MylistAddItemCommand addMylistCommand,
            LocalPlaylistAddItemCommand localPlaylistAddItemCommand,
            MylistCreateCommand createMylistCommand,
            VideoStreamingOriginOrchestrator videoStreamingOriginOrchestrator,
            VideoCommentPlayer commentPlayer,
            CommentCommandEditerViewModel commentCommandEditerViewModel,
            KeepActiveDisplayWhenPlaying keepActiveDisplayWhenPlaying,
            ObservableMediaPlayer observableMediaPlayer,
            VideoEndedRecommendation videoEndedRecommendation,
            PrimaryViewPlayerManager primaryViewPlayerManager,
            TogglePlayerDisplayViewCommand togglePlayerDisplayViewCommand,
            ShowPrimaryViewCommand showPrimaryViewCommand,
            MediaPlayerSoundVolumeManager soundVolumeManager,
            OpenLinkCommand openLinkCommand,
            CopyToClipboardCommand copyToClipboardCommand,
            ChangeVideoQualityCommand changeVideoQualityCommand,
            CopyToClipboardWithShareTextCommand copyToClipboardWithShareTextCommand,
            OpenShareUICommand openShareUICommand,
            PlaylistSidePaneContentViewModel playlistSidePaneContentViewModel,
            SettingsSidePaneContentViewModel settingsSidePaneContentViewModel,
            VideoCommentSidePaneContentViewModel videoCommentSidePaneContent,
            RelatedVideosSidePaneContentViewModel relatedVideosSidePaneContentViewModel
            )
        {
            _logger = loggerFactory.CreateLogger <VideoPlayerPageViewModel>();
            CurrentPlayerDisplayView = appearanceSettings
                                       .ObserveProperty(x => x.PlayerDisplayView)
                                       .ToReadOnlyReactivePropertySlim()
                                       .AddTo(_CompositeDisposable);

            _scheduler                             = scheduler;
            PlayerView                             = playerView;
            NiconicoSession                        = niconicoSession;
            SubscriptionManager                    = subscriptionManager;
            NicoVideoProvider                      = nicoVideoProvider;
            ChannelProvider                        = channelProvider;
            MylistProvider                         = mylistProvider;
            PlayerSettings                         = playerSettings;
            CacheSettings                          = cacheSettings;
            ApplicationLayoutManager               = applicationLayoutManager;
            LocalMylistManager                     = localMylistManager;
            UserMylistManager                      = userMylistManager;
            PageManager                            = pageManager;
            _queuePlaylist                         = queuePlaylist;
            _hohoemaPlaylistPlayer                 = hohoemaPlaylistPlayer;
            _NotificationService                   = notificationService;
            _HohoemaDialogService                  = dialogService;
            AddSubscriptionCommand                 = addSubscriptionCommand;
            CreateLocalMylistCommand               = createLocalMylistCommand;
            AddMylistCommand                       = addMylistCommand;
            LocalPlaylistAddItemCommand            = localPlaylistAddItemCommand;
            CreateMylistCommand                    = createMylistCommand;
            _videoStreamingOriginOrchestrator      = videoStreamingOriginOrchestrator;
            CommentPlayer                          = commentPlayer;
            CommentCommandEditerViewModel          = commentCommandEditerViewModel;
            PrimaryViewPlayerManager               = primaryViewPlayerManager;
            TogglePlayerDisplayViewCommand         = togglePlayerDisplayViewCommand;
            ShowPrimaryViewCommand                 = showPrimaryViewCommand;
            SoundVolumeManager                     = soundVolumeManager;
            OpenLinkCommand                        = openLinkCommand;
            CopyToClipboardCommand                 = copyToClipboardCommand;
            ChangeVideoQualityCommand              = changeVideoQualityCommand;
            CopyToClipboardWithShareTextCommand    = copyToClipboardWithShareTextCommand;
            OpenShareUICommand                     = openShareUICommand;
            _playlistSidePaneContentViewModel      = playlistSidePaneContentViewModel;
            _settingsSidePaneContentViewModel      = settingsSidePaneContentViewModel;
            _videoCommentSidePaneContentViewModel  = videoCommentSidePaneContent;
            _relatedVideosSidePaneContentViewModel = relatedVideosSidePaneContentViewModel;
            ObservableMediaPlayer                  = observableMediaPlayer
                                                     .AddTo(_CompositeDisposable);
            VideoEndedRecommendation = videoEndedRecommendation
                                       .AddTo(_CompositeDisposable);
            _keepActiveDisplayWhenPlaying = keepActiveDisplayWhenPlaying
                                            .AddTo(_CompositeDisposable);
            MediaPlayer = mediaPlayer;
            VideoTogglePlayPauseCommand = videoTogglePlayPauseCommand;
            SeekCommand            = new MediaPlayerSeekCommand(MediaPlayer);
            SetPlaybackRateCommand = new MediaPlayerSetPlaybackRateCommand(MediaPlayer);
            ToggleMuteCommand      = new MediaPlayerToggleMuteCommand(MediaPlayer);
            VolumeUpCommand        = new MediaPlayerVolumeUpCommand(SoundVolumeManager);
            VolumeDownCommand      = new MediaPlayerVolumeDownCommand(SoundVolumeManager);

            PlayNextCommand = _hohoemaPlaylistPlayer.GetCanGoNextOrPreviewObservable()
                              .SelectMany(async x => await _hohoemaPlaylistPlayer.CanGoNextAsync())
                              .ToAsyncReactiveCommand()
                              .AddTo(_CompositeDisposable);

            PlayNextCommand.Subscribe(async() => await _hohoemaPlaylistPlayer.GoNextAsync(NavigationCancellationToken))
            .AddTo(_CompositeDisposable);

            PlayPreviousCommand = _hohoemaPlaylistPlayer.GetCanGoNextOrPreviewObservable()
                                  .SelectMany(async x => await _hohoemaPlaylistPlayer.CanGoPreviewAsync())
                                  .ToAsyncReactiveCommand()
                                  .AddTo(_CompositeDisposable);

            PlayPreviousCommand.Subscribe(async() => await _hohoemaPlaylistPlayer.GoPreviewAsync(NavigationCancellationToken))
            .AddTo(_CompositeDisposable);

            IsLoopingEnabled = PlayerSettings.ToReactivePropertyAsSynchronized(x => x.IsCurrentVideoLoopingEnabled, raiseEventScheduler: scheduler)
                               .AddTo(_CompositeDisposable);
            IsLoopingEnabled.Subscribe(x => mediaPlayer.IsLoopingEnabled = x)
            .AddTo(_CompositeDisposable);

            IsPlaylistShuffleRequeted = PlayerSettings.ToReactivePropertyAsSynchronized(x => x.IsShuffleEnable, _scheduler)
                                        .AddTo(_CompositeDisposable);

            IsAvailablePlaylistRepeatOrShuffle = _hohoemaPlaylistPlayer.ObserveProperty(x => x.IsShuffleAndRepeatAvailable)
                                                 .ToReadOnlyReactiveProperty();
        }