private void MediaPlayer_MediaEnded(object sender, MediaPlayerActionEventArgs e) { foreach (var trackingEvent in TrackingEvents.Where(t => t.PositionPercentage.HasValue && t.PositionPercentage.Value == 1).ToList()) { OnTrackEvent(new PositionEventTrackedEventArgs(trackingEvent, false)); } }
private void MediaPlayer_MediaStarted(object sender, RoutedEventArgs e) { if (!MediaPlayer.StartupPosition.HasValue) { foreach (var trackingEvent in TrackingEvents.Where(t => t.PositionPercentage.HasValue && t.PositionPercentage.Value == 0).ToList()) { OnTrackEvent(new PositionEventTrackedEventArgs(trackingEvent, false)); } } }