mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1520088 - part5 - add pref to control whether blacklist can override the default setting. r=cpearce
Differential Revision: https://phabricator.services.mozilla.com/D16640 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
ea15b9bab4
commit
e5bba6b8f2
@ -195,7 +195,8 @@ static bool IsAllowedToPlayInternal(const HTMLMediaElement& aElement) {
|
||||
}
|
||||
|
||||
if (DefaultAutoplayBehaviour() == nsIAutoplay::ALLOWED &&
|
||||
!IsSiteInAutoplayBlackList(approver)) {
|
||||
!(IsSiteInAutoplayBlackList(approver) &&
|
||||
StaticPrefs::MediaAutoplayBlackListOverrideDefault())) {
|
||||
AUTOPLAY_LOG(
|
||||
"Allow autoplay as global autoplay setting is allowing autoplay by "
|
||||
"default.");
|
||||
|
@ -1604,6 +1604,12 @@ VARCACHE_PREF(
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
"media.autoplay.blackList-override-default",
|
||||
MediaAutoplayBlackListOverrideDefault,
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Network prefs
|
||||
//---------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user