private async void DoTrackStart() { await Task.Delay(100).ConfigureAwait(false); if (partPlayStart != TimeSpan.Zero) { //await Task.Delay(100); // PlayerStoryboard.BeginTime = MarkerStoryboard.BeginTime = partPlayStart; if (PlayPartLength > 0) { var end = (TimeSpan.FromMilliseconds(PlayPartLength + partPlayStart.TotalMilliseconds)); endAnimationTime = end; // PlayerStoryboard.Duration = MarkerStoryboard.Duration = (TimeSpan.FromMilliseconds(PlayPartLength + partPlayStart.TotalMilliseconds)); //PlayerStoryboard.SpeedRatio = 0.5; // playTimer = new System.Threading.Timer(doTrackPartEnd, partPlayStart, (int)PlayPartLength, Timeout.Infinite); } else { endAnimationTime = null; partPlayStart = TimeSpan.Zero; } PlayerStoryboard.Resume(mediaElement); MarkerStoryboard.Resume(PositionBar); } else { PlayerStoryboard.Begin(mediaElement, true); MarkerStoryboard.Begin(PositionBar, true); } }
internal void MarkerStoryboard_Resume() { MarkerStoryboard.Resume(PositionBar); }