Ejemplo n.º 1
0
        public UserInfoPageViewModel(
            UserProvider userProvider,
            NGSettings ngSettings,
            Models.NiconicoSession niconicoSession,
            SubscriptionManager subscriptionManager,
            UserMylistManager userMylistManager,
            Services.HohoemaPlaylist hohoemaPlaylist,
            PageManager pageManager,
            ExternalAccessService externalAccessService,
            NiconicoFollowToggleButtonService followToggleButtonService,
            Commands.Subscriptions.CreateSubscriptionGroupCommand createSubscriptionGroupCommand
            )
            : base(pageManager)
        {
            HasOwnerVideo = true;


            MylistGroups   = new ObservableCollection <MylistGroupListItem>();
            VideoInfoItems = new ObservableCollection <VideoInfoControlViewModel>();

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

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

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

            IsNGVideoOwner.Subscribe(isNgVideoOwner =>
            {
                if (isNgVideoOwner)
                {
                    NgSettings.AddNGVideoOwnerId(UserId, UserName);
                    IsNGVideoOwner.Value = true;
                    Debug.WriteLine(UserName + "をNG動画投稿者として登録しました。");
                }
                else
                {
                    NgSettings.RemoveNGVideoOwnerId(UserId);
                    IsNGVideoOwner.Value = false;
                    Debug.WriteLine(UserName + "をNG動画投稿者の指定を解除しました。");
                }
            });
            NiconicoSession                = niconicoSession;
            SubscriptionManager            = subscriptionManager;
            UserMylistManager              = userMylistManager;
            ExternalAccessService          = externalAccessService;
            FollowToggleButtonService      = followToggleButtonService;
            CreateSubscriptionGroupCommand = createSubscriptionGroupCommand;
            UserProvider = userProvider;
            NgSettings   = ngSettings;
        }
        public SearchResultTagPageViewModel(
            ApplicationLayoutManager applicationLayoutManager,
            NGSettings ngSettings,
            Models.NiconicoSession niconicoSession,
            SearchProvider searchProvider,
            SubscriptionManager subscriptionManager,
            HohoemaPlaylist hohoemaPlaylist,
            Services.PageManager pageManager,
            Services.DialogService dialogService,
            Commands.Subscriptions.CreateSubscriptionGroupCommand createSubscriptionGroupCommand,
            NiconicoFollowToggleButtonService followButtonService
            )
        {
            SearchProvider           = searchProvider;
            SubscriptionManager      = subscriptionManager;
            HohoemaPlaylist          = hohoemaPlaylist;
            PageManager              = pageManager;
            ApplicationLayoutManager = applicationLayoutManager;
            NgSettings                     = ngSettings;
            NiconicoSession                = niconicoSession;
            HohoemaDialogService           = dialogService;
            CreateSubscriptionGroupCommand = createSubscriptionGroupCommand;
            FollowButtonService            = followButtonService;
            FailLoading                    = new ReactiveProperty <bool>(false)
                                             .AddTo(_CompositeDisposable);

            LoadedPage = new ReactiveProperty <int>(1)
                         .AddTo(_CompositeDisposable);



            SelectedSearchSort = new ReactiveProperty <SearchSortOptionListItem>(
                VideoSearchOptionListItems.First(),
                mode: ReactivePropertyMode.DistinctUntilChanged
                );

            SelectedSearchSort
            .Subscribe(async _ =>
            {
                var selected = SelectedSearchSort.Value;
                if (SearchOption.Order == selected.Order &&
                    SearchOption.Sort == selected.Sort
                    )
                {
                    return;
                }

                SearchOption.Order = selected.Order;
                SearchOption.Sort  = selected.Sort;

                await ResetList();
            })
            .AddTo(_CompositeDisposable);

            SelectedSearchTarget = new ReactiveProperty <SearchTarget>();
        }
Ejemplo n.º 3
0
 public ChannelFavItemVM(
     FollowItemInfo follow,
     Services.NiconicoFollowToggleButtonService followToggleButtonService,
     Models.Subscription.SubscriptionManager subscriptionManager,
     Commands.Subscriptions.CreateSubscriptionGroupCommand createSubscriptionGroupCommand
     )
     : base(follow, followToggleButtonService, subscriptionManager, createSubscriptionGroupCommand)
 {
     FollowToggleButtonService.SetFollowTarget(this);
 }
Ejemplo n.º 4
0
 public UserVideoPageViewModel(
     UserProvider userProvider,
     Models.Subscription.SubscriptionManager subscriptionManager,
     Services.HohoemaPlaylist hohoemaPlaylist,
     Services.PageManager pageManager,
     Commands.Subscriptions.CreateSubscriptionGroupCommand createSubscriptionGroupCommand
     )
 {
     SubscriptionManager            = subscriptionManager;
     UserProvider                   = userProvider;
     HohoemaPlaylist                = hohoemaPlaylist;
     PageManager                    = pageManager;
     CreateSubscriptionGroupCommand = createSubscriptionGroupCommand;
 }
Ejemplo n.º 5
0
        public SearchResultKeywordPageViewModel(
            ApplicationLayoutManager applicationLayoutManager,
            NGSettings ngSettings,
            SearchProvider searchProvider,
            SubscriptionManager subscriptionManager,
            HohoemaPlaylist hohoemaPlaylist,
            Services.PageManager pageManager,
            Commands.Subscriptions.CreateSubscriptionGroupCommand createSubscriptionGroupCommand
            )
        {
            FailLoading = new ReactiveProperty <bool>(false)
                          .AddTo(_CompositeDisposable);

            LoadedPage = new ReactiveProperty <int>(1)
                         .AddTo(_CompositeDisposable);

            SelectedSearchSort = new ReactiveProperty <SearchSortOptionListItem>(
                VideoSearchOptionListItems.First(),
                mode: ReactivePropertyMode.DistinctUntilChanged
                );

            SelectedSearchTarget = new ReactiveProperty <SearchTarget>();

            SelectedSearchSort
            .Subscribe(async _ =>
            {
                var selected = SelectedSearchSort.Value;
                if (SearchOption.Order == selected.Order &&
                    SearchOption.Sort == selected.Sort
                    )
                {
                    //                       return;
                }

                SearchOption.Sort  = SelectedSearchSort.Value.Sort;
                SearchOption.Order = SelectedSearchSort.Value.Order;

                await ResetList();
            })
            .AddTo(_CompositeDisposable);

            ApplicationLayoutManager = applicationLayoutManager;
            NgSettings                     = ngSettings;
            SearchProvider                 = searchProvider;
            HohoemaPlaylist                = hohoemaPlaylist;
            PageManager                    = pageManager;
            SubscriptionManager            = subscriptionManager;
            CreateSubscriptionGroupCommand = createSubscriptionGroupCommand;
        }
Ejemplo n.º 6
0
 public FavoriteItemViewModel(
     FollowItemInfo follow,
     Services.NiconicoFollowToggleButtonService followToggleButtonService,
     Models.Subscription.SubscriptionManager subscriptionManager,
     Commands.Subscriptions.CreateSubscriptionGroupCommand createSubscriptionGroupCommand
     )
 {
     FollowItemInfo                 = follow;
     FollowToggleButtonService      = followToggleButtonService;
     SubscriptionManager            = subscriptionManager;
     CreateSubscriptionGroupCommand = createSubscriptionGroupCommand;
     Label    = follow.Name;
     ItemType = follow.FollowItemType;
     SourceId = follow.Id;
 }
Ejemplo n.º 7
0
        public VideoItemFlyout()
        {
            this.InitializeComponent();

            VideoItems = new List <IVideoContent>();

            CreateMylistCommand            = App.Current.Container.Resolve <CreateMylistCommand>();
            CreateLocalMylistCommand       = App.Current.Container.Resolve <CreateLocalMylistCommand>();
            CreateSubscriptionGroupCommand = App.Current.Container.Resolve <CreateSubscriptionGroupCommand>();
            HohoemaPlaylist            = App.Current.Container.Resolve <HohoemaPlaylist>();
            ExternalAccessService      = App.Current.Container.Resolve <ExternalAccessService>();
            PageManager                = App.Current.Container.Resolve <PageManager>();
            UserMylistManager          = App.Current.Container.Resolve <UserMylistManager>();
            LocalMylistManager         = App.Current.Container.Resolve <LocalMylistManager>();
            SubscriptionManager        = App.Current.Container.Resolve <SubscriptionManager>();
            VideoCacheManager          = App.Current.Container.Resolve <VideoCacheManager>();
            VideoItemsSelectionContext = App.Current.Container.Resolve <VideoItemsSelectionContext>();

            RemoveWatchHisotryItem.Command = App.Current.Container.Resolve <WatchHistoryRemoveItemCommand>();
            AddWatchAfter.Command          = App.Current.Container.Resolve <WatchAfterAddItemCommand>();
            RemoveWatchAfter.Command       = App.Current.Container.Resolve <WatchAfterRemoveItemCommand>();
            AddQueue.Command    = App.Current.Container.Resolve <QueueAddItemCommand>();
            RemoveQueue.Command = App.Current.Container.Resolve <QueueRemoveItemCommand>();

            OpenVideoInfoPage.Command   = PageManager.OpenPageCommand;
            OpenOwnerVideosPage.Command = PageManager.OpenVideoListPageCommand;
            OpenOwnerSeriesPage.Command = new OpenPageWithIdCommand(HohoemaPageType.UserSeries, PageManager);
            Share.Command         = ExternalAccessService.OpenShareUICommand;
            CopyVideoId.Command   = ExternalAccessService.CopyToClipboardCommand;
            CopyVideoId.Command   = ExternalAccessService.CopyToClipboardCommand;
            CopyShareText.Command = ExternalAccessService.CopyToClipboardWithShareTextCommand;

            CacheRequest.Command       = App.Current.Container.Resolve <CacheAddRequestCommand>();
            DeleteCacheRequest.Command = App.Current.Container.Resolve <CacheDeleteRequestCommand>();

            AddNgUser.Command      = App.Current.Container.Resolve <AddToHiddenUserCommand>();
            RemoveNgUser.Command   = App.Current.Container.Resolve <RemoveHiddenVideoOwnerCommand>();
            SelectionStart.Command = App.Current.Container.Resolve <SelectionStartCommand>();
            SelectionEnd.Command   = App.Current.Container.Resolve <SelectionExitCommand>();
            SelectionAll.Command   = App.Current.Container.Resolve <SelectionAllSelectCommand>();

            Opening += VideoItemFlyout_Opening;
        }
 public VideoInfomationPageViewModel(
     ApplicationLayoutManager applicationLayoutManager,
     AppearanceSettings appearanceSettings,
     NGSettings ngSettings,
     Models.NiconicoSession niconicoSession,
     UserMylistManager userMylistManager,
     HohoemaPlaylist hohoemaPlaylist,
     NicoVideoProvider nicoVideoProvider,
     LoginUserMylistProvider loginUserMylistProvider,
     VideoCacheManager videoCacheManager,
     SubscriptionManager subscriptionManager,
     Models.NicoVideoSessionProvider nicoVideo,
     Services.PageManager pageManager,
     Services.NotificationService notificationService,
     Services.DialogService dialogService,
     Services.ExternalAccessService externalAccessService,
     AddMylistCommand addMylistCommand,
     Commands.Subscriptions.CreateSubscriptionGroupCommand createSubscriptionGroupCommand
     )
 {
     ApplicationLayoutManager = applicationLayoutManager;
     _appearanceSettings      = appearanceSettings;
     NgSettings              = ngSettings;
     NiconicoSession         = niconicoSession;
     UserMylistManager       = userMylistManager;
     HohoemaPlaylist         = hohoemaPlaylist;
     NicoVideoProvider       = nicoVideoProvider;
     LoginUserMylistProvider = loginUserMylistProvider;
     VideoCacheManager       = videoCacheManager;
     SubscriptionManager     = subscriptionManager;
     NicoVideo                      = nicoVideo;
     PageManager                    = pageManager;
     NotificationService            = notificationService;
     DialogService                  = dialogService;
     ExternalAccessService          = externalAccessService;
     AddMylistCommand               = addMylistCommand;
     CreateSubscriptionGroupCommand = createSubscriptionGroupCommand;
     NowLoading                     = new ReactiveProperty <bool>(false);
     IsLoadFailed                   = new ReactiveProperty <bool>(false);
 }
Ejemplo n.º 9
0
 public VideoInfomationPageViewModel(
     NGSettings ngSettings,
     Models.NiconicoSession niconicoSession,
     UserMylistManager userMylistManager,
     Services.HohoemaPlaylist hohoemaPlaylist,
     NicoVideoProvider nicoVideoProvider,
     LoginUserMylistProvider loginUserMylistProvider,
     VideoCacheManager videoCacheManager,
     Models.NicoVideoStreamingSessionProvider nicoVideo,
     Services.Helpers.MylistHelper mylistHelper,
     Services.PageManager pageManager,
     Services.NotificationService notificationService,
     Services.DialogService dialogService,
     Services.ExternalAccessService externalAccessService,
     Commands.AddMylistCommand addMylistCommand,
     Commands.Subscriptions.CreateSubscriptionGroupCommand createSubscriptionGroupCommand
     )
     : base(pageManager)
 {
     NgSettings              = ngSettings;
     NiconicoSession         = niconicoSession;
     UserMylistManager       = userMylistManager;
     HohoemaPlaylist         = hohoemaPlaylist;
     NicoVideoProvider       = nicoVideoProvider;
     LoginUserMylistProvider = loginUserMylistProvider;
     VideoCacheManager       = videoCacheManager;
     NicoVideo                      = nicoVideo;
     MylistHelper                   = mylistHelper;
     NotificationService            = notificationService;
     DialogService                  = dialogService;
     ExternalAccessService          = externalAccessService;
     AddMylistCommand               = addMylistCommand;
     CreateSubscriptionGroupCommand = createSubscriptionGroupCommand;
     NowLoading                     = new ReactiveProperty <bool>(false);
     IsLoadFailed                   = new ReactiveProperty <bool>(false);
 }
Ejemplo n.º 10
0
        public MylistPageViewModel(
            Services.PageManager pageManager,
            NiconicoSession niconicoSession,
            MylistProvider mylistProvider,
            UserProvider userProvider,
            FollowManager followManager,
            LoginUserMylistProvider loginUserMylistProvider,
            NGSettings ngSettings,
            UserMylistManager userMylistManager,
            LocalMylistManager localMylistManager,
            Services.HohoemaPlaylist hohoemaPlaylist,
            SubscriptionManager subscriptionManager,
            Services.DialogService dialogService,
            NiconicoFollowToggleButtonService followToggleButtonService,
            Services.Helpers.MylistHelper mylistHelper,
            Commands.Subscriptions.CreateSubscriptionGroupCommand createSubscriptionGroupCommand
            )
            : base(pageManager)
        {
            NiconicoSession         = niconicoSession;
            MylistProvider          = mylistProvider;
            UserProvider            = userProvider;
            FollowManager           = followManager;
            LoginUserMylistProvider = loginUserMylistProvider;
            NgSettings                     = ngSettings;
            UserMylistManager              = userMylistManager;
            LocalMylistManager             = localMylistManager;
            HohoemaPlaylist                = hohoemaPlaylist;
            SubscriptionManager            = subscriptionManager;
            DialogService                  = dialogService;
            FollowToggleButtonService      = followToggleButtonService;
            MylistHelper                   = mylistHelper;
            CreateSubscriptionGroupCommand = createSubscriptionGroupCommand;
            Mylist       = new ReactiveProperty <Interfaces.IMylist>();
            MylistOrigin = new ReactiveProperty <Services.PlaylistOrigin>();

            /*
             * IsFavoriteMylist = new ReactiveProperty<bool>(mode: ReactivePropertyMode.DistinctUntilChanged)
             *  .AddTo(_CompositeDisposable);
             * CanChangeFavoriteMylistState = new ReactiveProperty<bool>()
             *  .AddTo(_CompositeDisposable);
             *
             *
             * IsFavoriteMylist
             *  .Where(x => PlayableList.Value.Id != null)
             *  .Subscribe(async x =>
             *  {
             *      if (PlayableList.Value.Origin != PlaylistOrigin.OtherUser) { return; }
             *
             *      if (_NowProcessFavorite) { return; }
             *
             *      _NowProcessFavorite = true;
             *
             *      CanChangeFavoriteMylistState.Value = false;
             *      if (x)
             *      {
             *          if (await FavoriteMylist())
             *          {
             *              Debug.WriteLine(_MylistTitle + "のマイリストをお気に入り登録しました.");
             *          }
             *          else
             *          {
             *              // お気に入り登録に失敗した場合は状態を差し戻し
             *              Debug.WriteLine(_MylistTitle + "のマイリストをお気に入り登録に失敗");
             *              IsFavoriteMylist.Value = false;
             *          }
             *      }
             *      else
             *      {
             *          if (await UnfavoriteMylist())
             *          {
             *              Debug.WriteLine(_MylistTitle + "のマイリストをお気に入り解除しました.");
             *          }
             *          else
             *          {
             *              // お気に入り解除に失敗した場合は状態を差し戻し
             *              Debug.WriteLine(_MylistTitle + "のマイリストをお気に入り解除に失敗");
             *              IsFavoriteMylist.Value = true;
             *          }
             *      }
             *
             *      CanChangeFavoriteMylistState.Value =
             *          IsFavoriteMylist.Value == true
             || FollowManager.CanMoreAddFollow(FollowItemType.Mylist);
             ||
             ||
             ||     _NowProcessFavorite = false;
             || })
             || .AddTo(_CompositeDisposable);
             ||
             ||
             ||UnregistrationMylistCommand = SelectedItems.ObserveProperty(x => x.Count)
             || .Where(_ => IsUserOwnerdMylist)
             || .Select(x => x > 0)
             || .ToReactiveCommand(false);
             ||
             ||UnregistrationMylistCommand.Subscribe(async _ =>
             ||{
             || if (PlayableList.Value.Origin == PlaylistOrigin.Local)
             || {
             ||     var localMylist = PlayableList.Value as LegacyLocalMylist;
             ||     var items = SelectedItems.ToArray();
             ||
             ||     foreach (var item in items)
             ||     {
             ||         localMylist.Remove(item.PlaylistItem);
             ||         IncrementalLoadingItems.Remove(item);
             ||     }
             || }
             || else if (PlayableList.Value.Origin == PlaylistOrigin.LoginUser)
             || {
             ||     var mylistGroup = HohoemaApp.UserMylistManager.GetMylistGroup(PlayableList.Value.Id);
             ||
             ||     var items = SelectedItems.ToArray();
             ||
             ||
             ||     var action = AsyncInfo.Run<uint>(async (cancelToken, progress) =>
             ||     {
             ||         uint progressCount = 0;
             ||         int successCount = 0;
             ||         int failedCount = 0;
             ||
             ||         Debug.WriteLine($"マイリストに追加解除を開始...");
             ||         foreach (var video in items)
             ||         {
             ||             var unregistrationResult = await mylistGroup.Unregistration(
             ||                 video.RawVideoId
             ||                 , withRefresh: false );
             ||
             ||             if (unregistrationResult == ContentManageResult.Success)
             ||             {
             ||                 successCount++;
             ||             }
             ||             else
             ||             {
             ||                 failedCount++;
             ||             }
             ||
             ||             progressCount++;
             ||             progress.Report(progressCount);
             ||
             ||             Debug.WriteLine($"{video.Label}[{video.RawVideoId}]:{unregistrationResult.ToString()}");
             ||         }
             ||
             ||         // 登録解除結果を得るためリフレッシュ
             ||         await mylistGroup.Refresh();
             ||
             ||
             ||         // ユーザーに結果を通知
             ||         var titleText = $"「{mylistGroup.Label}」から {successCount}件 の動画が登録解除されました";
             ||         var toastService = App.Current.Container.Resolve<NotificationService>();
             ||         var resultText = $"";
             ||         if (failedCount > 0)
             ||         {
             ||             resultText += $"\n登録解除に失敗した {failedCount}件 は選択されたままです";
             ||         }
             ||         toastService.ShowToast(titleText, resultText);
             ||
             ||         // 登録解除に失敗したアイテムだけを残すように
             ||         // マイリストから除外された動画を選択アイテムリストから削除
             ||         foreach (var item in SelectedItems.ToArray())
             ||         {
             ||             if (false == mylistGroup.CheckRegistratedVideoId(item.RawVideoId))
             ||             {
             ||                 SelectedItems.Remove(item);
             ||                 IncrementalLoadingItems.Remove(item);
             ||             }
             ||         }
             ||
             ||         Debug.WriteLine($"マイリストに追加解除完了---------------");
             ||     });
             ||
             ||     await PageManager.StartNoUIWork("マイリストに追加解除", items.Length, () => action);
             ||
             || }
             ||
             ||
             ||});
             ||
             ||
             */
        }
Ejemplo n.º 11
0
        public VideoPlayerPageViewModel(
            IScheduler scheduler,
            IEventAggregator eventAggregator,
            Models.NiconicoSession niconicoSession,
            Models.Subscription.SubscriptionManager subscriptionManager,
            NicoVideoProvider nicoVideoProvider,
            ChannelProvider channelProvider,
            MylistProvider mylistProvider,
            PlayerSettings playerSettings,
            CacheSettings cacheSettings,
            NGSettings ngSettings,
            ApplicationLayoutManager applicationLayoutManager,
            HohoemaPlaylist hohoemaPlaylist,
            LocalMylistManager localMylistManager,
            UserMylistManager userMylistManager,
            PageManager pageManager,
            MediaPlayer mediaPlayer,
            NotificationService notificationService,
            DialogService dialogService,
            ExternalAccessService externalAccessService,
            Commands.Subscriptions.CreateSubscriptionGroupCommand createSubscriptionGroupCommand,
            Commands.Mylist.CreateLocalMylistCommand createLocalMylistCommand,
            Commands.Mylist.CreateMylistCommand createMylistCommand,
            UseCase.NicoVideoPlayer.VideoStreamingOriginOrchestrator videoStreamingOriginOrchestrator,
            UseCase.VideoPlayer videoPlayer,
            UseCase.CommentPlayer commentPlayer,
            KeepActiveDisplayWhenPlaying keepActiveDisplayWhenPlaying,
            ObservableMediaPlayer observableMediaPlayer,
            WindowService windowService,
            VideoEndedRecommendation videoEndedRecommendation,
            PrimaryViewPlayerManager primaryViewPlayerManager,
            TogglePlayerDisplayViewCommand togglePlayerDisplayViewCommand,
            ShowPrimaryViewCommand showPrimaryViewCommand,
            MediaPlayerSoundVolumeManager soundVolumeManager
            )
        {
            _scheduler                        = scheduler;
            NiconicoSession                   = niconicoSession;
            SubscriptionManager               = subscriptionManager;
            NicoVideoProvider                 = nicoVideoProvider;
            ChannelProvider                   = channelProvider;
            MylistProvider                    = mylistProvider;
            PlayerSettings                    = playerSettings;
            CacheSettings                     = cacheSettings;
            NgSettings                        = ngSettings;
            ApplicationLayoutManager          = applicationLayoutManager;
            HohoemaPlaylist                   = hohoemaPlaylist;
            LocalMylistManager                = localMylistManager;
            UserMylistManager                 = userMylistManager;
            PageManager                       = pageManager;
            _NotificationService              = notificationService;
            _HohoemaDialogService             = dialogService;
            ExternalAccessService             = externalAccessService;
            CreateSubscriptionGroupCommand    = createSubscriptionGroupCommand;
            CreateLocalMylistCommand          = createLocalMylistCommand;
            CreateMylistCommand               = createMylistCommand;
            _videoStreamingOriginOrchestrator = videoStreamingOriginOrchestrator;
            VideoPlayer                       = videoPlayer;
            CommentPlayer                     = commentPlayer;
            PrimaryViewPlayerManager          = primaryViewPlayerManager;
            TogglePlayerDisplayViewCommand    = togglePlayerDisplayViewCommand;
            ShowPrimaryViewCommand            = showPrimaryViewCommand;
            SoundVolumeManager                = soundVolumeManager;
            ObservableMediaPlayer             = observableMediaPlayer
                                                .AddTo(_CompositeDisposable);
            WindowService = windowService
                            .AddTo(_CompositeDisposable);
            VideoEndedRecommendation = videoEndedRecommendation
                                       .AddTo(_CompositeDisposable);
            _keepActiveDisplayWhenPlaying = keepActiveDisplayWhenPlaying
                                            .AddTo(_CompositeDisposable);
            MediaPlayer = mediaPlayer;

            SeekCommand            = new MediaPlayerSeekCommand(MediaPlayer);
            SetPlaybackRateCommand = new MediaPlayerSetPlaybackRateCommand(MediaPlayer);
            ToggleMuteCommand      = new MediaPlayerToggleMuteCommand(MediaPlayer);
            VolumeUpCommand        = new MediaPlayerVolumeUpCommand(SoundVolumeManager);
            VolumeDownCommand      = new MediaPlayerVolumeDownCommand(SoundVolumeManager);
        }