private MPRemoteCommandHandlerStatus ChangePlaybackPositionCommandHandler(MPRemoteCommandEvent e)
        {
            var playbackPositionEvent = (MPChangePlaybackPositionCommandEvent)e;

            ChangePosition((int)playbackPositionEvent.PositionTime);
            return(MPRemoteCommandHandlerStatus.Success);
        }
Example #2
0
        MPRemoteCommandHandlerStatus handleCommandCenterPlayCommand(MPRemoteCommandEvent commandEvent)
        {
            if (Player?.Rate == 0)
            {
                Player.Play();

                updateCommandCenterNowPlayingInfo();

                return(MPRemoteCommandHandlerStatus.Success);
            }

            return(MPRemoteCommandHandlerStatus.CommandFailed);
        }
        private MPRemoteCommandHandlerStatus TogglePlayPauseCommand(MPRemoteCommandEvent arg)
        {
            if (IsPlaying)
            {
                Stop();
            }
            else
            {
                Play();
            }

            return(MPRemoteCommandHandlerStatus.Success);
        }
Example #4
0
 public MPRemoteCommandHandlerStatus ToggleCommand(MPRemoteCommandEvent commandEvent)
 {
     if (_player != null)
     {
         if (_player.Rate == 0)
         {
             PlayMedia();
         }
         else
         {
             PauseMedia();
         }
     }
     return(MPRemoteCommandHandlerStatus.Success);
 }
Example #5
0
 public MPRemoteCommandHandlerStatus PrevCommand(MPRemoteCommandEvent commandEvent)
 {
     PreviousMedia();
     return(MPRemoteCommandHandlerStatus.Success);
 }
Example #6
0
 MPRemoteCommandHandlerStatus handleCommandCenterStopCommand(MPRemoteCommandEvent commandEvent)
 {
     return(MPRemoteCommandHandlerStatus.CommandFailed);
 }
Example #7
0
 MPRemoteCommandHandlerStatus handleCommandCenterSeekBackwardCommand(MPRemoteCommandEvent commandEvent)
 {
     return(MPRemoteCommandHandlerStatus.CommandFailed);
 }
Example #8
0
 MPRemoteCommandHandlerStatus handleCommandCenterPreviousTrackCommand(MPRemoteCommandEvent commandEvent)
 {
     return(MPRemoteCommandHandlerStatus.CommandFailed);
 }
 private MPRemoteCommandHandlerStatus PlayCommandHandler(MPRemoteCommandEvent e)
 {
     Play();
     return(MPRemoteCommandHandlerStatus.Success);
 }
Example #10
0
 public MPRemoteCommandHandlerStatus ChangeRepeatModeCommand(MPRemoteCommandEvent commandEvent)
 {
     RepeatMedia(!IsMediaRepeating());
     return(MPRemoteCommandHandlerStatus.Success);
 }
Example #11
0
 private MPRemoteCommandHandlerStatus _Pause(MPRemoteCommandEvent arg)
 {
     Stop();
     return(MPRemoteCommandHandlerStatus.Success);
 }
Example #12
0
 public MPRemoteCommandHandlerStatus PlayCommand(MPRemoteCommandEvent commandEvent)
 {
     Play();
     return(MPRemoteCommandHandlerStatus.Success);
 }
Example #13
0
 /// <summary>
 /// Command for the pause button on lockscreen and control center
 /// </summary>
 /// <param name="commandEvent"></param>
 /// <returns></returns>
 private MPRemoteCommandHandlerStatus PauseCommand(MPRemoteCommandEvent commandEvent)
 {
     Pause();
     return(MPRemoteCommandHandlerStatus.Success);
 }
 private MPRemoteCommandHandlerStatus RewindCommandHandler(MPRemoteCommandEvent e)
 {
     Rewind();
     return(MPRemoteCommandHandlerStatus.Success);
 }
 private MPRemoteCommandHandlerStatus FastForwardCommandHandler(MPRemoteCommandEvent e)
 {
     FastFoward();
     return(MPRemoteCommandHandlerStatus.Success);
 }
Example #16
0
 public MPRemoteCommandHandlerStatus NextCommand(MPRemoteCommandEvent commandEvent)
 {
     NextMedia();
     return(MPRemoteCommandHandlerStatus.Success);
 }
Example #17
0
 public MPRemoteCommandHandlerStatus PauseCommand(MPRemoteCommandEvent commandEvent)
 {
     PauseMedia();
     return(MPRemoteCommandHandlerStatus.Success);
 }
Example #18
0
 private MPRemoteCommandHandlerStatus _Play(MPRemoteCommandEvent arg)
 {
     Play();
     return(MPRemoteCommandHandlerStatus.Success);
 }
Example #19
0
 MPRemoteCommandHandlerStatus handleCommandCenterChangePlaybackPositionCommand(MPRemoteCommandEvent commandEvent)
 {
     return(MPRemoteCommandHandlerStatus.CommandFailed);
 }
Example #20
0
 public MPRemoteCommandHandlerStatus PauseButton(MPRemoteCommandEvent commandEvent)
 {
     Console.WriteLine("PauseButton : " + commandEvent.Command.Enabled.ToString());
     return(MPRemoteCommandHandlerStatus.Success);
 }