-
Notifications
You must be signed in to change notification settings - Fork 2
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
Autoplay policy (pending) #17
Comments
Try the feature policy iframe delegation ? https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#iframe <iframe src="https://cross-origin.com/myvideo.html" allow="autoplay"> Or may be keep an eye on :
|
Modify tests and write a warning about media autoplays ? #17
Happens in Chrome when reloading a playing page |
A paper by Chrome https://developers.google.com/web/updates/2018/11/web-audio-autoplay |
Really interesting way to detect it, to check onto Chrome, Firefox and Safari |
A really interesting paper : async function play_video() {
const $video = document.querySelector('video');
// Detect in advance
if ($video.allowedToPlay) {
$video.play();
// video started to play
} else {
// autoplay will be blocked
// show a play button
}
// or use Promise
try {
await $video.play();
// video started to play
} catch (ex) {
// autoplay has been blocked
// show a play button
}
} Our problems are mainly in Firefox Nightly, not in main Firefox . In Chrome, we got « Uncaught (in promise) DOMException » |
Still some issues on Firefox Nightly on |
As in Chrome cf https://developers.google.com/web/updates/2017/09/autoplay-policy-changes ,
Firefox Nightly (63) is testing blocking autoplay due to abuse. We're both impacted https://bugzilla.mozilla.org/show_bug.cgi?id=1476853
Note : To do the tests, don't reload the browser, but follow the links. Yes, it's ugly.
The text was updated successfully, but these errors were encountered: