mdn / sprints

Archived: MDN Web Docs issues are tracked in the content repository.
https://github.com/mdn/content
Creative Commons Zero v1.0 Universal
150 stars 142 forks source link

https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Client-side_web_APIs/Video_and_audio_APIs #3944

Closed gabrielsbrl closed 3 years ago

gabrielsbrl commented 3 years ago

Request type

Details

Actually, the better way to work with the play and pause action, is to save the play promise in a variable, and just do the pause action when you know that the promise have been resolved, otherwise an error may appear, saying that you tried to pause a video that wasn't ready to be paused. The article didn't explained that the play action is asynchronous.

chrisdavidmills commented 3 years ago

Issue moved to mdn/content #1446 via ZenHub