I'm writing a jQuery plugin for the video tag on the ipad. One of the things my plugin does is resumes playing a movie where you last quit watching it. I'm having issues setting current time. I've found I can only set it after the "stalled
" event has fired. The stalled seems to fire on an ipad after a movie starts playing (this is an HTTP live stream video). I don't see this event in other environments i.e. google chrome on a PC. So this code works but I feel uncomfortable using the stalled
event. I've tried canplaythrough
, playing
and others and in those cases my update to currentTime
is ignored. Does anyone else have experience with this?
var theClass = this;
$(this.videoElement).bind("pause play stalled error abort progress waiting playing webkitfullscreenchange canplaythrough", null, function (e) {
///<summary>bind to the various events we are interested in during playback. event state changes will be saved to
///local storage. If we detect the media has finished playing we will exit fullscreen and trigger our mediaDone event</summary>
if (e.type == "stalled" && theClass.resumeTriggered) {
theClass.resumeTriggered = false;
theClass.resumeTime = theClass.resumeTime + 0.1;
$("#smpPlayerDebug").append("<p> seeking to time " + theClass.resumeTime + "</p>");
e.srcElement.currentTime = theClass.resumeTime;
}
It just plain doesn't work. The iPad's support for controlling video play is weak, probably in Apple's attempt to create a standard experience (not allowing too much variation).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With