public ChannelVideoPageViewModel(
            ILoggerFactory loggerFactory,
            ApplicationLayoutManager applicationLayoutManager,
            NiconicoSession niconicoSession,
            ChannelProvider channelProvider,
            ChannelFollowProvider channelFollowProvider,
            PageManager pageManager,
            VideoPlayWithQueueCommand videoPlayWithQueueCommand,
            PlaylistPlayAllCommand playlistPlayAllCommand,
            OpenLinkCommand openLinkCommand,
            SelectionModeToggleCommand selectionModeToggleCommand
            )
            : base(loggerFactory.CreateLogger <ChannelVideoPageViewModel>())
        {
            ApplicationLayoutManager = applicationLayoutManager;
            NiconicoSession          = niconicoSession;
            ChannelProvider          = channelProvider;
            _channelFollowProvider   = channelFollowProvider;
            PageManager = pageManager;
            VideoPlayWithQueueCommand  = videoPlayWithQueueCommand;
            PlaylistPlayAllCommand     = playlistPlayAllCommand;
            OpenLinkCommand            = openLinkCommand;
            SelectionModeToggleCommand = selectionModeToggleCommand;

            CurrentPlaylistToken = Observable.CombineLatest(
                this.ObserveProperty(x => x.ChannelVideoPlaylist),
                this.ObserveProperty(x => x.SelectedSortOption),
                (x, y) => new PlaylistToken(x, y)
                )
                                   .ToReadOnlyReactivePropertySlim()
                                   .AddTo(_CompositeDisposable);
        }
示例#2
0
 public VideoInfomationPageViewModel(
     ILoggerFactory loggerFactory,
     ApplicationLayoutManager applicationLayoutManager,
     AppearanceSettings appearanceSettings,
     VideoFilteringSettings ngSettings,
     NiconicoSession niconicoSession,
     LoginUserOwnedMylistManager userMylistManager,
     NicoVideoProvider nicoVideoProvider,
     LoginUserMylistProvider loginUserMylistProvider,
     SubscriptionManager subscriptionManager,
     NicoVideoSessionProvider nicoVideo,
     PageManager pageManager,
     Services.NotificationService notificationService,
     Services.DialogService dialogService,
     VideoPlayWithQueueCommand videoPlayWithQueueCommand,
     MylistAddItemCommand addMylistCommand,
     LocalPlaylistAddItemCommand localPlaylistAddItemCommand,
     AddSubscriptionCommand addSubscriptionCommand,
     OpenLinkCommand openLinkCommand,
     CopyToClipboardCommand copyToClipboardCommand,
     CopyToClipboardWithShareTextCommand copyToClipboardWithShareTextCommand,
     OpenShareUICommand openShareUICommand,
     CacheAddRequestCommand cacheAddRequestCommand,
     RecommendProvider recommendProvider,
     UserFollowProvider userFollowProvider,
     ChannelFollowProvider channelFollowProvider
     )
 {
     _logger = loggerFactory.CreateLogger <VideoInfomationPageViewModel>();
     ApplicationLayoutManager = applicationLayoutManager;
     AppearanceSettings       = appearanceSettings;
     NgSettings              = ngSettings;
     NiconicoSession         = niconicoSession;
     UserMylistManager       = userMylistManager;
     NicoVideoProvider       = nicoVideoProvider;
     LoginUserMylistProvider = loginUserMylistProvider;
     SubscriptionManager     = subscriptionManager;
     NicoVideo                           = nicoVideo;
     PageManager                         = pageManager;
     NotificationService                 = notificationService;
     DialogService                       = dialogService;
     VideoPlayWithQueueCommand           = videoPlayWithQueueCommand;
     AddMylistCommand                    = addMylistCommand;
     LocalPlaylistAddItemCommand         = localPlaylistAddItemCommand;
     AddSubscriptionCommand              = addSubscriptionCommand;
     OpenLinkCommand                     = openLinkCommand;
     CopyToClipboardCommand              = copyToClipboardCommand;
     CopyToClipboardWithShareTextCommand = copyToClipboardWithShareTextCommand;
     OpenShareUICommand                  = openShareUICommand;
     CacheAddRequestCommand              = cacheAddRequestCommand;
     _recommendProvider                  = recommendProvider;
     _userFollowProvider                 = userFollowProvider;
     _channelFollowProvider              = channelFollowProvider;
     NowLoading                          = new ReactiveProperty <bool>(false);
     IsLoadFailed                        = new ReactiveProperty <bool>(false);
 }
示例#3
0
 public MainController(onCopyFunc onCopy)
 {
     this.onCopy        = onCopy;
     LabelText          = getTokenFlg.Select(flg => flg ? "PINコード" : "検索ワード").ToReadOnlyReactiveProperty();
     ButtonText         = getTokenFlg.Select(flg => flg ? "入力" : "検索").ToReadOnlyReactiveProperty();
     showListViewFlg    = getTokenFlg.Select(flg => !flg).ToReadOnlyReactiveProperty();
     SearchStartCommand = SearchWord.Select(s => s.Length != 0).CombineLatest(progressFlg, (x, y) => x & !y).ToReactiveCommand();
     CopyLinkCommand    = SelectTweet.Select(t => t != null).ToReactiveCommand();
     OpenLinkCommand    = SelectTweet.Select(t => t != null).ToReactiveCommand();
     RtRtCommand        = SelectTweet.Select(t => t != null).ToReactiveCommand();
     SearchResult       = searchResult.ToReadOnlyReactiveCollection();
     //
     LoginCommand.Subscribe(_ => Login());
     SearchStartCommand.Subscribe(async _ => {
         if (getTokenFlg.Value)
         {
             // トークン入力処理
             token = session.GetTokens(SearchWord.Value);
             Application.Current.Properties["AccessToken"]       = token.AccessToken;
             Application.Current.Properties["AccessTokenSecret"] = token.AccessTokenSecret;
             getTokenFlg.Value = false;
             SearchWord.Value  = "";
         }
         else
         {
             // 検索処理
             await SearchTweet();
         }
     });
     CopyLinkCommand.Subscribe(_ => {
         string url = "https://twitter.com/" + SelectTweet.Value.User.ScreenName + "/status/" + SelectTweet.Value.Id;
         this.onCopy(url);
     });
     OpenLinkCommand.Subscribe(_ => {
         string url = "https://twitter.com/" + SelectTweet.Value.User.ScreenName + "/status/" + SelectTweet.Value.Id;
         Device.OpenUri(new Uri(url));
     });
     RtRtCommand.Subscribe(_ => {
     });
     //トークンが保存されているかを確かめ、されてない場合に限りログイン処理を行う
     if (Application.Current.Properties.ContainsKey("AccessToken") &&
         Application.Current.Properties.ContainsKey("AccessTokenSecret"))
     {
         token = Tokens.Create(Consumer.Key, Consumer.Secret,
                               Application.Current.Properties["AccessToken"] as string,
                               Application.Current.Properties["AccessTokenSecret"] as string);
     }
     else
     {
         Login();
     }
 }
示例#4
0
        public HomeTabVM(ControllerClient controllerClient)
        {
            if (controllerClient == null)
            {
                throw new ArgumentNullException(nameof(controllerClient));
            }

            _controllerClient = controllerClient;

            OpenHomepageCommand      = new OpenLinkCommand("http://www.HA4IoT.de");
            OpenTwitterCommand       = new OpenLinkCommand("https://twitter.com/chkratky");
            OpenRepositoryCommand    = new OpenLinkCommand("https://github.com/chkr1011/CK.HomeAutomation");
            OpenDocumentationCommand = new OpenLinkCommand(
                "https://www.hackster.io/cyborg-titanium-14/home-automation-with-raspberry-pi-2-and-windows-10-iot-784235");

            OpenAppCommand = new DelegateCommand(OpenApp);
        }
示例#5
0
        public LiveCommentsSidePaneContentViewModel(
            CommentFilteringFacade commentFiltering,
            IScheduler scheduler,
            NicoVideoOwnerCacheRepository nicoVideoOwnerRepository,
            OpenLinkCommand openLinkCommand,
            CopyToClipboardCommand copyToClipboardCommand
            )
        {
            _playerSettings                   = commentFiltering;
            _scheduler                        = scheduler;
            _nicoVideoOwnerRepository         = nicoVideoOwnerRepository;
            OpenLinkCommand                   = openLinkCommand;
            CopyToClipboardCommand            = copyToClipboardCommand;
            NicoLiveUserIdAddToNGCommand      = new NicoLiveUserIdAddToNGCommand(_playerSettings, _nicoVideoOwnerRepository);
            NicoLiveUserIdRemoveFromNGCommand = new NicoLiveUserIdRemoveFromNGCommand(_playerSettings);
            IsCommentListScrollWithVideo      = new ReactiveProperty <bool>(_scheduler, false)
                                                .AddTo(_CompositeDisposable);

            NGUsers = new ObservableCollection <CommentFliteringRepository.FilteringCommentOwnerId>(_playerSettings.GetFilteringCommentOwnerIdList());
            IsNGCommentUserIdEnabled = _playerSettings.ToReactivePropertyAsSynchronized(x => x.IsEnableFilteringCommentOwnerId, _scheduler)
                                       .AddTo(_CompositeDisposable);
        }
示例#6
0
        /// <summary>
        /// Create a new instance of this model
        /// </summary>
        /// <param name="window"></param>
        public MainWindowModel(Window window) : base(window, true)
        {
            IconVisible        = false;
            updateSearched     = false;
            CloseWindowCommand = new CloseApplicationCommand();

            SetWindowTitle();

            object dockArea = window.FindName("DP_ContentDock");

            if (dockArea is DockPanel panel)
            {
                ISettingFactory settingFactory = new WpfPropertySettingManagerFactory();
                SettingManager  wpfSettings    = settingFactory.GetSettingsManager();

                contentDock = panel;

                BrowserUserControl localBrowser     = new BrowserUserControl(string.Empty);
                ICommand           openLocalBrowser = new MultiCommand(new List <ICommand>()
                {
                    new OpenControlToPanel(contentDock, localBrowser, false),
                    new ChangeBrowserContentCommand(localBrowser)
                });

                BrowserUserControl remoteBrowser     = new BrowserUserControl(string.Empty, new RemoteDocumentManagerFactory(new TimeSpan(0, 30, 0)));
                ICommand           openRemoteBrowser = new MultiCommand(new List <ICommand>()
                {
                    new OpenControlToPanel(contentDock, remoteBrowser, false),
                    new ChangeBrowserContentCommand(remoteBrowser)
                });

                OpenNewsCommand      = openRemoteBrowser;
                OpenChangelogCommand = openLocalBrowser;
                OpenDisclamerCommand = openLocalBrowser;
                OpenAboutCommand     = openLocalBrowser;
                OpenLicenseCommand   = openLocalBrowser;

                OpenHDPatchCommand = new OpenControlToPanel(contentDock, new ComingSoonControl());
                OpenMapCommand     = new OpenControlToPanel(contentDock, new MapUserControl());
                LaunchGameCommand  = new OpenControlToPanel(contentDock, new PatchVersionSelectionUserControl(window));
                OpenSettingCommand = new OpenControlToPanel(contentDock, new SettingsUserControl(currentWindow));
                ComingSoonCommand  = new OpenControlToPanel(contentDock, new ComingSoonControl());

                ReportIssueCommand = new OpenLinkCommand(wpfSettings.GetValue <string>("ReportIssueLink"));
                OpenEditorCommand  = new StartEditorCommand(settingManager);
                OpenSettlersConfigurationCommand = new StartSettlersConfigCommand(settingManager);
                OpenSavesFolderCommand           = new OpenFolderCommand(Environment.GetFolderPath(
                                                                             Environment.SpecialFolder.MyDocuments)
                                                                         + "/TheSettlers4/Save/"
                                                                         );

                string gameFolder    = settingManager.GetValue <string>("GameFolder");
                string textureChange = gameFolder + "Texturenwechsler.bat";
                OpenTextureChangerCommand = new StartProgramCommand(textureChange);

                OpenNewsCommand.Execute("News.md");
            }

            ChangeGroupVisiblity    = new ToggleSubGroupVisibilityCommand(currentWindow);
            window.ContentRendered += (sender, data) =>
            {
                if (updateSearched)
                {
                    return;
                }
                updateSearched = true;
                CheckForUpdateIfNeeded(window);
            };
        }
        // TODO: 視聴開始(会場後のみ、チャンネル会員限定やチケット必要な場合あり)
        // TODO: タイムシフト予約(tsがある場合のみ、会場前のみ、プレミアムの場合は会場後でも可)
        // TODO: 後からタイムシフト予約(プレミアムの場合のみ)
        // TODO: 配信説明
        // TODO: タグ
        // TODO: 配信者(チャンネルやコミュニティ)の概要説明
        // TODO: 配信者(チャンネルやコミュニティ)のフォロー
        // TODO: オススメ生放送(放送中、放送予定を明示)
        // TODO: ニコニコ市場
        // TODO: SNS共有


        // gateとwatchをどちらも扱った上でその差を意識させないように表現する

        // LiveInfo.Video.CurrentStatusは開演前、放送中は時間の経過によって変化する可能性がある

        public LiveInfomationPageViewModel(
            ApplicationLayoutManager applicationLayoutManager,
            AppearanceSettings appearanceSettings,
            PageManager pageManager,
            NiconicoSession niconicoSession,
            NicoLiveProvider nicoLiveProvider,
            DialogService dialogService,
            OpenLiveContentCommand openLiveContentCommand,
            OpenLinkCommand openLinkCommand,
            CopyToClipboardCommand copyToClipboardCommand,
            CopyToClipboardWithShareTextCommand copyToClipboardWithShareTextCommand
            )
        {
            ApplicationLayoutManager = applicationLayoutManager;
            _appearanceSettings      = appearanceSettings;
            PageManager            = pageManager;
            NiconicoSession        = niconicoSession;
            NicoLiveProvider       = nicoLiveProvider;
            HohoemaDialogService   = dialogService;
            OpenLiveContentCommand = openLiveContentCommand;
            OpenLinkCommand        = openLinkCommand;
            CopyToClipboardCommand = copyToClipboardCommand;
            CopyToClipboardWithShareTextCommand = copyToClipboardWithShareTextCommand;
            IsLoadFailed = new ReactiveProperty <bool>(false)
                           .AddTo(_CompositeDisposable);
            LoadFailedMessage = new ReactiveProperty <string>()
                                .AddTo(_CompositeDisposable);



            IsLiveIdAvairable = this.ObserveProperty(x => x.LiveId)
                                .Select(x => x != default(LiveId))
                                .ToReadOnlyReactiveProperty()
                                .AddTo(_CompositeDisposable);



            IsLoggedIn = NiconicoSession.ObserveProperty(x => x.IsLoggedIn)
                         .ToReadOnlyReactiveProperty()
                         .AddTo(_CompositeDisposable);

            IsPremiumAccount = NiconicoSession.ObserveProperty(x => x.IsPremiumAccount)
                               .ToReadOnlyReactiveProperty()
                               .AddTo(_CompositeDisposable);



            _IsTsPreserved = new ReactiveProperty <bool>(false)
                             .AddTo(_CompositeDisposable);

            LiveTags = new ReadOnlyObservableCollection <LiveTagViewModel>(_LiveTags);

            IchibaItems = new ReadOnlyObservableCollection <IchibaItem>(_IchibaItems);

            /*
             * ReccomendItems = _ReccomendItems.ToReadOnlyReactiveCollection(x =>
             * {
             *  var liveId = x.ProgramId;
             *  var liveInfoVM = new LiveInfoListItemViewModel(liveId);
             *  liveInfoVM.Setup(x);
             *
             *  var reserve = _Reservations?.ReservedProgram.FirstOrDefault(reservation => liveId == reservation.Id);
             *  if (reserve != null)
             *  {
             *      liveInfoVM.SetReservation(reserve);
             *  }
             *
             *  return liveInfoVM;
             * })
             *  .AddTo(_CompositeDisposable);
             */

            IsShowOpenLiveContentButton =
                new[]
            {
                this.ObserveProperty(x => LiveProgram).ToUnit(),
                NiconicoSession.ObserveProperty(x => x.IsLoggedIn).ToUnit(),
                _IsTsPreserved.ToUnit()
            }
            .Merge()
            .Select(x =>
            {
                if (LiveProgram == null)
                {
                    return(false);
                }

                if (NiconicoSession.IsPremiumAccount)
                {
                    if (LiveProgram.OnAirTime.BeginAt > DateTime.Now)
                    {
                        return(false);
                    }

                    return(LiveProgram.Timeshift.Enabled);
                }
                else
                {
                    // 一般アカウントは放送中のみ
                    if (LiveProgram.OnAirTime.BeginAt > DateTime.Now)
                    {
                        return(false);
                    }

                    if (_IsTsPreserved.Value)
                    {
                        return(true);
                    }

                    if (LiveProgram.OnAirTime.EndAt < DateTime.Now)
                    {
                        return(false);
                    }

                    return(true);
                }
            })
            .ToReadOnlyReactiveProperty()
            .AddTo(_CompositeDisposable);

            IsShowAddTimeshiftButton =
                new []
            {
                this.ObserveProperty(x => LiveProgram).ToUnit(),
                NiconicoSession.ObserveProperty(x => x.IsLoggedIn).ToUnit(),
                _IsTsPreserved.ToUnit()
            }
            .Merge()
            .Select(x =>
            {
                if (LiveProgram == null)
                {
                    return(false);
                }
                if (!LiveProgram.Timeshift.Enabled)
                {
                    return(false);
                }
                if (!NiconicoSession.IsLoggedIn)
                {
                    return(false);
                }

                if (!NiconicoSession.IsPremiumAccount)
                {
                    // 一般アカウントは放送開始の30分前からタイムシフトの登録はできなくなる
                    if ((LiveProgram.ShowTime.BeginAt - TimeSpan.FromMinutes(30)) < DateTime.Now)
                    {
                        return(false);
                    }
                }

                // 放送前、及び放送中はタイムシフトボタンを非表示…?
                // プレ垢なら常に表示しておいていいんじゃないの?
                //if (LiveProgram.ShowTime.EndAt > DateTime.Now) { return false; }

                // タイムシフト予約済み
                if (_IsTsPreserved.Value)
                {
                    return(false);
                }

                return(true);
            })
            .ToReadOnlyReactiveProperty()
            .AddTo(_CompositeDisposable);

            IsShowDeleteTimeshiftButton = _IsTsPreserved;
        }
示例#8
0
        public UserInfoPageViewModel(
            ApplicationLayoutManager applicationLayoutManager,
            UserProvider userProvider,
            UserFollowProvider userFollowProvider,
            VideoFilteringSettings ngSettings,
            NiconicoSession niconicoSession,
            SubscriptionManager subscriptionManager,
            LoginUserOwnedMylistManager userMylistManager,
            PageManager pageManager,
            MylistResolver mylistRepository,
            VideoPlayWithQueueCommand videoPlayWithQueueCommand,
            AddSubscriptionCommand addSubscriptionCommand,
            OpenLinkCommand openLinkCommand
            )
        {
            NiconicoSession           = niconicoSession;
            SubscriptionManager       = subscriptionManager;
            UserMylistManager         = userMylistManager;
            PageManager               = pageManager;
            _mylistRepository         = mylistRepository;
            VideoPlayWithQueueCommand = videoPlayWithQueueCommand;
            AddSubscriptionCommand    = addSubscriptionCommand;
            OpenLinkCommand           = openLinkCommand;
            ApplicationLayoutManager  = applicationLayoutManager;
            UserProvider              = userProvider;
            _userFollowProvider       = userFollowProvider;
            NgSettings = ngSettings;

            HasOwnerVideo = true;

            VideoInfoItems = new ObservableCollection <VideoListItemControlViewModel>();

            OpenUserVideoPageCommand = VideoInfoItems.ObserveProperty(x => x.Count)
                                       .Select(x => x > 0)
                                       .ToReactiveCommand()
                                       .AddTo(_CompositeDisposable);

            OpenUserVideoPageCommand.Subscribe(x =>
            {
                PageManager.OpenPageWithId(HohoemaPageType.UserVideo, UserId);
            })
            .AddTo(_CompositeDisposable);

            IsNGVideoOwner = new ReactiveProperty <bool>(false, ReactivePropertyMode.DistinctUntilChanged);

            IsNGVideoOwner.Subscribe(isNgVideoOwner =>
            {
                if (isNgVideoOwner)
                {
                    NgSettings.AddHiddenVideoOwnerId(UserId, Nickname);
                    IsNGVideoOwner.Value = true;
                    Debug.WriteLine(Nickname + "をNG動画投稿者として登録しました。");
                }
                else
                {
                    NgSettings.RemoveHiddenVideoOwnerId(UserId);
                    IsNGVideoOwner.Value = false;
                    Debug.WriteLine(Nickname + "をNG動画投稿者の指定を解除しました。");
                }
            });
        }
        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();
        }