disable-html5-autoplay
disable-html5-autoplay copied to clipboard
Extension breaks playback in SoundCloud
SoundCloud won't play HTML5 audio with this extension enabled, notably after hitting the 'play' button (which is not an "autoplay" functionality). I've toggled the extension enable checkbox four times and checked if the audio plays after a page reload each time. I'm seeing a consistent pattern of the audio playing only when "disable-html5-autoplay" is not enabled.
It seems that SoundCloud creates "orphaned" audio elements (elements that are not present in the DOM) and uses them to play audio. Since these orphans are never added to the DOM, the extension's MutationObserver never detects them and assigns them to a new delegate; thus they remain undelegated. While the elements are undelegated, their play method won't work and they won't be counted in the popup's statistics. This is why SoundCloud doesn't work while autoplay is disabled and why no media elements or autoplay attempts are tracked in the popup.
In order to deal with this, I'll have to add some code to track the creation of orphaned elements (or elements that became orphaned later on) and send them through the code that assigns delegates. I'll also add another delegate type so the statistics popup will track orphaned elements separately from elements in the DOM.
Implementing these changes will take some time, so I'm pushing this to the 0.6 milestone.
how about simply creating a whitelist to allow sites autoplay or not. Or for the extension to ignore those sites/domains
@gianpaj The whitelist feature has been implemented in Mode Rules, which was implemented in version 0.6. You can find documentation on Mode Rules on the Wiki here.
A proper fix to this issue will be implemented with #16.
Looks like the player on beatport.com is hindered in the same way.
I'm having this same problem too. It says HTML autoplay is disabling nothing on the page, but it interferes and blocks soundcloud from playing songs.
If the refactor is taking a while, could you ship with mode rules for Soundcloud and Beatport built in? I think that will give your users a better experience...
@pde We could, but it would still fail on websites that embed SoundCloud or Beatport. I think it would be more confusing to have it break only on embedded situations as opposed to breaking everywhere.