-
Notifications
You must be signed in to change notification settings - Fork 4
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
Players: Event model for Playback Sync #1
Comments
It seems like all three APIs are pretty similar. I'd propose something similar to what we're all doing now. EventsEvent messages are posted from the child window to the parent window. Event namesThe following subset of HTML5 media element events should be used since they cover both audio and video playback:
Message formatData is an object that contains specific information about the event. {
event: 'name',
data: {}
} Progress-based events should return the following keys in the {
seconds: 1,
duration: 10,
percent: 0.1
} MethodsMethod calls are made from the parent to the child, with an optional response from the child back to the parent. Method names
|
Thanks Brad. Appreciate the input - it's a great start! I have couple questions regarding specific playback events, and some general observations. Playback:
General:
|
Oh, and let's not forget about full screen. I heard you saying many devs have asked to put it in one by default. There's a reason for it. People want next video to play in full screen if the prev one in their playlist was in full screen. |
To keep everyone posted about the progress: Embedly guys came up with similar spec - https://github.com/embedly/player.js/blob/master/SPEC.rst Let's see if we can unify. |
Here's a quote of what we need community help with here:
playback
- forplayer
indicating that widget supports JavaScript orwindow.postMessage
API to control media playback. With the list of calls, similar to what YouTube, Vimeo and Soundcloud have.So in a sense, the task is to synchronize the spec of those three providers that all of them have probability to potentially adapt in the future. Cross-provider playback sync is critical for a lot of apps. At the moment they have to rely on removing/adding players in DOM to control user experience.
We already have some of the general events in the spec (like the ones that register the iframe and the one that resizes it on onload) - but it can be changed to accommodate the general approach.
The text was updated successfully, but these errors were encountered: