-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support played
attribute
#523
Comments
(while it's a goal, we haven't made a claim that video.js supports ALL html5 attributes. Updating the issue title to make me less sad when I read it.) |
That's reasonable. Some background on where this is coming from: I was trying to implement a "firstplay" event in a plugin. If it were possible to check what portions of the video had been played, I could piggy-back on top of the |
Yeah, switching sources is an issue with that. You could potentially use the loadeddata event to reset any 'hasplayed' var. And then use the 'play' event to set hasplayed to true like you said. If you had the played attr, what would it look like to determine first play with it? |
Something like this: video.on('playing', function(){
if (video.played().length === 0 || video.played().start(0) === video.played().end(0)) {
video.trigger('firstplay');
}
}); If there were guarantees as to which of those two possibilities in the conditional indicates no video has been played, we could make it a bit cleaner. |
Yeah, I haven't worked with 'played' much yet, but I would actually expect both of those to always return false when the 'playing' event is fired, assuming you're already at least one frame into the video when that event is triggered. I can't say how that actually works though. On May 24, 2013, at 12:22 PM, David LaPalomento [email protected] wrote:
|
Confirming and added link to the spec |
A few things need to be done to finish this one:
We should check to make sure all the html5 browsers support the played property now. If any of them don't (like Android) we'll need to add a check in the HTML5 tech to determine if the current browser can support it, and if not use the fallback. |
Does #2384 mean this can be closed? |
Hello Matthew, I do not think so. Played has not been fully implemented. Sent from mobile |
Aw dang. I thought that was gonna be from pam. I'm lame. |
video.js 4.0 does not yet implement the
played
attribute.played
is available in Chrome 26 (at least).http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-media-played
The text was updated successfully, but these errors were encountered: