private void HandleReceiverPauseRequested(PlayToReceiver sender, Object args)
 {
     Dispatch(() =>
     {
         if (_currentPlaybackType == PlaybackType.Video)
         {
             VideoPlayer.Pause();
             // Receiver notification occurs in the HandleVideoPlayerCurrentStateChanged handler
         }
         else if (_currentPlaybackType == PlaybackType.Image)
         {
             _receiver.NotifyPaused();
         }
     });
 }
 private async void receiver_PauseRequested(PlayToReceiver recv, Object args)
 {
     await Dispatcher.RunAsync(CoreDispatcherPriority.High, () =>
     {
         if (dmrVideo != null && currentType == MediaType.AudioVideo)
         {
             if (dmrVideo.CurrentState == MediaElementState.Stopped)
             {
                 receiver.NotifyPaused();
             }
             else
             {
                 dmrVideo.Pause();
             }
         }
     });
 }
Exemple #3
0
 async void receiver_PauseRequested(PlayToReceiver sender, object args)
 {
     await Dispatcher.RunAsync(CoreDispatcherPriority.High, () =>
     {
         MusicSource.Pause();
         VideoSource.Pause();
         receiver.NotifyPaused();
     });
 }