MediaElement Set position in Pause mode

六眼飞鱼酱① 提交于 2019-12-25 12:07:34

问题


I use this method to seek new position in my MediaElement :

TimeSpan t = TimeSpan.FromSeconds(newSecond);
System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() =>
{
    mediaElement1.Position = TimeSpan.FromSeconds(newSecond);
});

When the user play video and then pause it and seek to new position the video frame stay in the previous frame.

And i want to know if it possible that when i seek to new position and the video is in pause mode so the frame will move to the new position and won't wait until i press play again.


回答1:


You need to set the MediaElements ScrubbingEnabled property to true



来源:https://stackoverflow.com/questions/15053870/mediaelement-set-position-in-pause-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!