private async void receiver_PlayRequested(PlayToReceiver recv, Object args)
 {
     await Dispatcher.RunAsync(CoreDispatcherPriority.High, () =>
     {
         if (dmrVideo != null && currentType == MediaType.AudioVideo)
         {
             IsPlayReceivedPreMediaLoaded = true;
             dmrVideo.Play();
         }
         else if (currentType == MediaType.Image)
         {
             dmrImage.Source = imagerevd;
             receiver.NotifyPlaying();
         }
     });
 }
 private void HandleReceiverPlayRequested(PlayToReceiver sender,
                                          Object args)
 {
     Dispatch(() =>
     {
         if (_currentPlaybackType == PlaybackType.Video)
         {
             VideoPlayer.Play();
             // Receiver notification occurs in the HandleVideoPlayerCurrentStateChanged handler
         }
         else if (_currentPlaybackType == PlaybackType.Image)
         {
             ImagePlayer.Source = _imageSource;
             _receiver.NotifyPlaying();
         }
     });
 }
示例#3
0
 async void receiver_PlayRequested(PlayToReceiver sender, object args)
 {
     await Dispatcher.RunAsync(CoreDispatcherPriority.High, () =>
     {
         MusicSource.Play();
         VideoSource.Play();
         receiver.NotifyPlaying();
     });
 }