Skip to content
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

Closed
dascritch opened this issue Aug 30, 2018 · 7 comments
Closed

Autoplay policy (pending) #17

dascritch opened this issue Aug 30, 2018 · 7 comments
Labels
doc write Need more documentation to write help wanted Extra attention is needed question Further information is requested

Comments

@dascritch
Copy link
Owner

dascritch commented Aug 30, 2018

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.

@dascritch dascritch added the question Further information is requested label Sep 13, 2018
@dascritch dascritch added the help wanted Extra attention is needed label Oct 2, 2018
@dascritch dascritch changed the title Write a warning about media autoplays ? Modify tests and write a warning about media autoplays ? Oct 2, 2018
dascritch added a commit that referenced this issue Oct 15, 2018
Modify tests and write a warning about media autoplays ? #17
@dascritch
Copy link
Owner Author

@dascritch dascritch reopened this Oct 17, 2018
@dascritch dascritch changed the title Modify tests and write a warning about media autoplays ? Autoplay policy (pending) Oct 17, 2018
@dascritch dascritch reopened this Oct 18, 2018
@dascritch
Copy link
Owner Author

Happens in Chrome when reloading a playing page

@dascritch
Copy link
Owner Author

@dascritch
Copy link
Owner Author

Really interesting way to detect it, to check onto Chrome, Firefox and Safari
https://stackoverflow.com/questions/37674223/domexception-failed-to-load-because-no-supported-source-was-found#answer-40238567

@dascritch dascritch added doc write Need more documentation to write and removed doc write Need more documentation to write labels May 15, 2019
@dascritch
Copy link
Owner Author

dascritch commented Jul 16, 2019

A really interesting paper :
https://www.fxsitecompat.dev/en-CA/docs/2019/audible-media-s-autoplay-is-now-blocked-by-default/

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 »

dascritch added a commit that referenced this issue Jul 17, 2019
dascritch added a commit that referenced this issue Jul 17, 2019
@dascritch
Copy link
Owner Author

dascritch commented Jul 17, 2019

Still some issues on Firefox Nightly on tests-minimal.html and tests-interface.html , about async tests collisions ?
Seems related to https://bugzilla.mozilla.org/show_bug.cgi?id=1507193 , only nightly/dev because not happening in Firefox vanilla.

@dascritch dascritch added buggy browser Incorrect standard implemntation in browser and removed buggy browser Incorrect standard implemntation in browser labels Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc write Need more documentation to write help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant