Skip to content
This repository has been archived by the owner on Nov 20, 2021. It is now read-only.

Handle autoplay state and events correctly #124

Open
fregante opened this issue Jun 8, 2017 · 1 comment
Open

Handle autoplay state and events correctly #124

fregante opened this issue Jun 8, 2017 · 1 comment

Comments

@fregante
Copy link
Owner

fregante commented Jun 8, 2017

Current incorrect behavior on autoplay videos:

  • paused is set to false immediately
  • the play event is triggered immediately

Correct behavior:

  • paused should be set to true after the canplay event
  • canplay, play, and playing should be fired at the same time

Source: https://www.w3.org/TR/html5/embedded-content-0.html#handling-first-frame-available

@fregante
Copy link
Owner Author

fregante commented Jun 8, 2017

Also, when a new src is set, the event order should be changed:

 loadeddata
+playing
 canplay
 canplaythrough
-play
-playing

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant