private void HandleReceiverCurrentTimeChangeRequested(PlayToReceiver sender, CurrentTimeChangeRequestedEventArgs args)
 {
     Dispatch(() =>
     {
         if (_currentPlaybackType == PlaybackType.Video)
         {
             VideoPlayer.Position = args.Time;
             _receiver.NotifySeeking();
             // "Seeked" receiver notification occurs in the HandleVideoPlayerSeekCompleted handler
             _isSeeking = true;
         }
         else if (_currentPlaybackType == PlaybackType.Image)
         {
             // Seeking is a no-op in image playback.  Just indicate it started and finished.
             _receiver.NotifySeeking();
             _receiver.NotifySeeked();
         }
     });
 }
Exemple #2
0
 private async void receiver_CurrentTimeChangeRequested(PlayToReceiver sender, CurrentTimeChangeRequestedEventArgs args)
 {
     await Dispatcher.RunAsync(CoreDispatcherPriority.High, () =>
     {
         if (VideoSource.CanSeek)
         {
             {
                 VideoSource.Position = args.Time;
                 receiver.NotifySeeking();
             }
         }
     });
 }
 private async void receiver_CurrentTimeChangeRequested(PlayToReceiver recv, CurrentTimeChangeRequestedEventArgs args)
 {
     await Dispatcher.RunAsync(CoreDispatcherPriority.High, () =>
     {
         if (IsReceiverStarted)
         {
             if (dmrVideo != null && currentType == MediaType.AudioVideo)
             {
                 if (dmrVideo.CanSeek)
                 {
                     dmrVideo.Position = args.Time;
                     receiver.NotifySeeking();
                     IsSeeking = true;
                 }
             }
             else if (currentType == MediaType.Image)
             {
                 receiver.NotifySeeking();
                 receiver.NotifySeeked();
             }
         }
     });
 }