2

So, I have an AxWindowsMediaPlayer control on my form, and I'm looking to, while its playing, change the playback position to another point. I found:

    mediaplayer.Ctlcontrols.currentPosition = <position in seconds>

But If I call that whilst its playing, it does jump to the right position and claims to keep playing, but in reality the video stops playing.

I've tried pausing/stopping before I change the position and playing afterwards, but no luck.

How can I get around this?

UPDATE

So, if I wait long enough, playback will resume again, but it will be a few seconds after the point I told it to jump to.

For example, if I tell it to jump to 15 seconds while its playing, it will jump to 15, Ctlcontrols.currentPosition will continue to increment, but the video won't actually start playing again until about five seconds later.

So... why isn't there a five second delay when I load the file? It plays instantaneously when I load it in... And how do I get rid of the delay after the jump?

Entity
  • 7,972
  • 21
  • 79
  • 122
  • I wouldn't complain about a delay, it makes sense to be quicker playing from the start than from an arbitrary point. But I also hate when things start "playing" before they're ready. Maybe there's a way to check if it's actually ready and then make it play... – karnok Jan 29 '12 at 10:14
  • 1
    Go get your video file and investigate its properties/metadata. It is entirely possible that your video file has **very sparse keyframes** (like one in 5-7 seconds). After a jump, WMP (or rather, the CODEC) is not able to produce any video until a keyframe is passed. That's completely normal for some codecs/profiles. – quetzalcoatl Sep 07 '14 at 16:36

0 Answers0