开发者

How can I set the position of a paused video

I am 开发者_C百科using WPF's MediaElement. If the MediaElement is playing, setting the Position works as expected.

However, if the MediaElement is paused, setting the Position has no effect.

How can I set the position of a paused video?


To update frames for seek operations while paused you need to set the ScrubbingEnabled property of the media element to true. Ie (xaml):

<MediaElement x:Name="Player"
              LoadedBehavior="Manual"
              UnloadedBehavior="Manual"
              ScrubbingEnabled="True" />

MSDN Reference

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜