Reputation: 369
I am using a WPF MediaElement to play a video. While the MediaElement is Paused, I set the Position to another point in the video. I would like the video image in the MediaElement to refresh to reflect the new position. But it will not update the image until I push the Play button again. Is there a way to force an MediaElement image refresh without calling its Play method?
Code example
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
}
Upvotes: 4
Views: 2669