Esempio n. 1
0
 void MediaPlayer_SkippingAhead(object sender, SkipRoutedEventArgs e)
 {
     if (e.Position == MediaPlayer.LivePosition.GetValueOrDefault(MediaPlayer.EndTime) && CurrentPlaylistItemIndex < Playlist.Count - 1)
     {
         GoToNextPlaylistItem();
         e.Canceled = true;
     }
 }
Esempio n. 2
0
 void MediaPlayer_SkippingBack(object sender, SkipRoutedEventArgs e)
 {
     if (e.Position == MediaPlayer.StartTime && (!SkipBackThreshold.HasValue || MediaPlayer.VirtualPosition.Subtract(MediaPlayer.StartTime) < SkipBackThreshold.Value) && CurrentPlaylistItemIndex > 0)
     {
         GoToPreviousPlaylistItem();
         e.Canceled = true;
     }
 }