Play() promise should be rejected when Chrome does not allow autoplay
See original GitHub issueThe promise returned by vimeo’s play() should get rejected when Google chrome rejects the HTML5 video element’s play().
Currently Vimeo resolves its promise, but it should be rejected with error.
Example code: https://gist.github.com/nextend/245243c297abcdd75cdd3d58bacc4149
Chrome docs: https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
var promise = document.querySelector('video').play();
if (promise !== undefined) {
  promise.then(_ => {
    // Autoplay started!
  }).catch(error => {
    // Autoplay was prevented.
    // Show a "Play" button so that user can start playback.
  });
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:6 (1 by maintainers)
 Top Results From Across the Web
Top Results From Across the Web
HTML5 plugin fails to resolve/reject play-promise when in ...
When trying to run an ad in a player that uses your plugin in secure mode -- which returns a proxy object instead...
Read more >HTML5 video.play returning Pending promises - Stack Overflow
The Chrome team have released a test page to check whether your own browser supports Promisified MediaElement.play() . If supported, the logging box...
Read more >Autoplay policy in Chrome - Chrome Developers
When the permissions policy for autoplay is disabled, calls to play() without a user gesture will reject the promise with a NotAllowedError ...
Read more >728294 - Please silence play() Promise errors - Monorail
Currently, only Firefox and Chrome return a Promise from play() [2]. This uncaught Promise error happens much less than it used to, but...
Read more >Initial video play promise rejects in Chrome - Bugs - Babylon.js
When loading a scene with a video texture, a video.play() promise is rejected in Chrome due to their policy on autoplay (autoplay is...
Read more > Top Related Medium Post
Top Related Medium Post
No results found
 Top Related StackOverflow Question
Top Related StackOverflow Question
No results found
 Troubleshoot Live Code
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free Top Related Reddit Thread
Top Related Reddit Thread
No results found
 Top Related Hackernoon Post
Top Related Hackernoon Post
No results found
 Top Related Tweet
Top Related Tweet
No results found
 Top Related Dev.to Post
Top Related Dev.to Post
No results found
 Top Related Hashnode Post
Top Related Hashnode Post
No results found

Seems like that jsfiddle references a local domain vimeo.dev. Here’s a working version with the current live script. https://jsfiddle.net/thatguysam/4ombuyvL/
This is added in the latest release. Please take a look at the below link to verify. https://jsfiddle.net/luwes/6cpzoqst/
Thanks for your patience.