4

我正在使用 WPF MediaElement 播放视频。当 MediaElement 暂停时,我将位置设置为视频中的另一个点。我希望 MediaElement 中的视频图像刷新以反映新位置。但在我再次按下播放按钮之前,它不会更新图像。有没有办法在不调用其 Play 方法的情况下强制刷新 MediaElement 图像?

代码示例

TimeSpan tsPosition = new TimeSpan(0,0,30);   // set to 30 seconds
MediaElementObj.Position = tsPosition;
 if (PlayStatus == PAUSED) // ignore if not paused
            {
                // image refresh method call here if there is a way to do it
            }
4

1 回答 1

11

将MediaElement 上的ScrubbingEnabled属性设置为 true。

于 2012-11-12T21:54:59.213 回答