Ejemplo n.º 1
0
 void MediaPlayer_PositionChanged(object sender, RoutedPropertyChangedEventArgs <TimeSpan> e)
 {
     if (MediaPlayer.SelectedCaption != null)
     {
         captionsPanel.UpdatePosition(MediaPlayer.Position);
         markerManager.CheckMarkerPositions(MediaPlayer.Position);
     }
 }
        public void UpdateCaptions(TimeSpan mediaPosition, bool isSeeking)
        {
            _mediaPosition = mediaPosition;
            _captionManager.CheckMarkerPositions(mediaPosition, CaptionRegion.Children, isSeeking);

            CaptionRegion.Children.WhereActiveAtPosition(mediaPosition)
            .Where(i => i.HasAnimations)
            .ForEach(i => i.CalculateCurrentStyle(mediaPosition))
            .ForEach(HideCaption)
            .ForEach(ShowCaption);
        }