Esempio n. 1
0
 /// <summary>
 /// Called when [position changed].
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="oldValue">The old value.</param>
 /// <param name="newValue">The new value.</param>
 public void OnPositionChanged(MediaEngine sender, TimeSpan oldValue, TimeSpan newValue)
 {
     if (Parent == null)
     {
         return;
     }
     Parent?.PostPositionChangedEvent(oldValue, newValue);
 }
Esempio n. 2
0
        /// <summary>
        /// Called when [position changed].
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="oldValue">The old value.</param>
        /// <param name="newValue">The new value.</param>
        public void OnPositionChanged(MediaEngine sender, TimeSpan oldValue, TimeSpan newValue)
        {
            if (Parent == null)
            {
                return;
            }

            // Only set a reportable position if we are playing and not seeking
            if (sender.State.IsPlaying && sender.State.IsSeeking == false)
            {
                Parent.ReportablePosition = newValue;
            }

            Parent?.PostPositionChangedEvent(oldValue, newValue);
        }
 /// <inheritdoc />
 public void OnPositionChanged(MediaEngine sender, TimeSpan oldValue, TimeSpan newValue) =>
 Parent?.PostPositionChangedEvent(oldValue, newValue);