We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
VideoJS 7 fails to return the native play promise.
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Video Player</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/video.js/7.0.3/video-js.min.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/video.js/7.0.3/video.min.js"></script> <style> .video-js { width: 320px; height: 180px; } </style> </head> <body> <video controls id="vid" class="video-js"> <source src="//mirrors.standaloneinstaller.com/video-sample/dolbycanyon.mp4"> </video> <script> videojs(vid,{},function(){console.log(this.play())}); </script> </body> </html>
console will log the play() promise on both success and failure, on platforms that natively return it
console logs undefined
7
all, tested on chrome
all
none
The text was updated successfully, but these errors were encountered:
The problem is calling play() between ready and loadstart. In this case, that play() returns nothing and play is attempted again on loadstart.
play()
ready
loadstart
https://github.com/videojs/video.js/blob/v7.0.3/src/js/player.js#L1906
Sorry, something went wrong.
We've also started work to try and make sure that a promise is always returned, if Promises are available to us #5227
Actually, going to close this specific issue in favor of #3927
No branches or pull requests
Description
VideoJS 7 fails to return the native play promise.
Steps to reproduce
Results
Expected
console will log the play() promise on both success and failure, on platforms that natively return it
Actual
console logs undefined
Additional Information
versions
videojs
7
browsers
all, tested on chrome
OSes
all
plugins
none
The text was updated successfully, but these errors were encountered: