mozilla / popcorn-js

The HTML5 Media Framework. (Unmaintained. See https://github.com/menismu/popcorn-js for activity)
MIT License
2.14k stars 632 forks source link

play() with time parameter not working on iOS 7 #398

Open jywsn opened 10 years ago

jywsn commented 10 years ago

Calling play(N) with a time parameter N does not work on iOS 7. The clip will start playing at the beginning. The only way I could get it to start playing at a specified time was to use currentTime(n), bind a listener to the 'seeked' event, and then call play() in the associated callback.

rwaldron commented 10 years ago

I have some spare cycles to look at this

rwaldron commented 10 years ago

@ScottDowne @cadecairos @jbuck my first thought is to actually use @jywsn's work around as the handling mechanism here: https://github.com/mozilla/popcorn-js/blob/master/popcorn.js#L613-L617 I'll keep playing around with this, but if anyone has better ideas, by all means :)

ScottDowne commented 10 years ago

Waiting for seek feels pretty sane to me. I guess iOS 7 isn't handling this for us. If I recall correctly, spec says play and currentTime changes should queue and fire in the correct order, but I feel like it's probably pretty common for something like that to be simply not be implemented yet?

rwaldron commented 10 years ago

Maybe we can feature detect for this and only do the special handling path if necessary?

ScottDowne commented 10 years ago

I'm not too sure how we would feature detect this. Feels more like flaw detection than feature detection :P

Would we detect a generic feature we know is not on iOS then act accordingly? That feel like round about browser detection maybe? shrugs

I say don't bother with detection if the seek is not a problem in ff or chrome, and passes the tests.

rwaldron commented 10 years ago

Yeah, I think you're right here. iOS has been edge-case for Popcorn.js anyway