Closed Bug 1520088 Opened 4 years ago Closed 4 years ago

Sites' autoplay preference is overridden by global autoplay preference


(Core :: Audio/Video: Playback, defect, P2)




Tracking Status
firefox66 --- verified


(Reporter: alwu, Assigned: alwu)




(5 files)


  1. go to about:preferences#privacy
  2. Find the autoplay setting area
  3. Click Exceptions and choose block for ""
  4. Click Save Changes and go back to about:preferences#privacy
  5. Uncheck the check box for Block websites from automatically playing media with sound
  6. go to ""

7. video should not be allowed to start, because we have added the site into the blacklist

7. video starts playing automatically

Summary: Site's autoplay preference is override by global autoplay preference → Sites' autoplay preference is overridden by global autoplay preference
We would like to have different phases checking for autoplay, the first phase is to check media element itself, so we need to move other non-related checkings out from 'IsMediaElementAllowedToPlay()'.
Ensure we can always see the debug log for the autoplay result.
The autoplay checking for media element has 4 different phases,
1. check whether media element itself meets the autoplay condition
2. check whethr the site is in the autoplay whitelist
3. check global autoplay setting and check wether the site is in the autoplay blacklist.
4. check whether media is allowed under current blocking model (click-to-play or user-gesture-activation)
Duplicate of this bug: 1506557
Rank: 15
Priority: -- → P2
Pushed by
part1 : let 'IsMediaElementAllowedToPlay()' only check media element's attributes r=cpearce
part2 : ensure logging result can always be executed. r=cpearce
part3 : implement different phases autoplay checking. r=cpearce
part4 : modify test. r=cpearce
part5 - add pref to control whether blacklist can override the default setting. r=cpearce

Hi, This issue no longer occurs in the latest nightly build, the Exceptions functionality works even with the feature turned off, I will mark this issue accordingly.
This issue was verified in the latest Nightly Build:

You need to log in before you can comment on or make changes to this bug.