Bug 1578615 - part2 : make the pref 'media.block-autoplay-until-in-foreground' to a static pref. r=chunmin

Differential Revision: https://phabricator.services.mozilla.com/D44745

--HG--
extra : moz-landing-system : lando
This commit is contained in:
alwu 2019-09-25 02:06:57 +00:00
Родитель 549eca85d5
Коммит 6fd6ac32c9
4 изменённых файлов: 12 добавлений и 7 удалений

Просмотреть файл

@ -7911,10 +7911,9 @@ nsPIDOMWindowOuter::nsPIDOMWindowOuter(uint64_t aWindowID)
mModalStateDepth(0),
mIsActive(false),
mIsBackground(false),
mMediaSuspend(
Preferences::GetBool("media.block-autoplay-until-in-foreground", true)
? nsISuspendedTypes::SUSPENDED_BLOCK
: nsISuspendedTypes::NONE_SUSPENDED),
mMediaSuspend(StaticPrefs::media_block_autoplay_until_in_foreground()
? nsISuspendedTypes::SUSPENDED_BLOCK
: nsISuspendedTypes::NONE_SUSPENDED),
mAudioVolume(1.0),
mDesktopModeViewport(false),
mIsRootOuterWindow(false),

Просмотреть файл

@ -788,7 +788,6 @@ pref("identity.sync.tokenserver.uri", "https://token.services.mozilla.com/1.0/sy
pref("dom.audiochannel.audioCompeting", true);
pref("dom.audiochannel.mediaControl", true);
pref("media.block-autoplay-until-in-foreground", false);
// Space separated list of URLS that are allowed to send objects (instead of
// only strings) through webchannels. This list is duplicated in browser/app/profile/firefox.js

Просмотреть файл

@ -6144,6 +6144,15 @@
value: false
mirror: always
- name: media.block-autoplay-until-in-foreground
type: bool
#if !defined(MOZ_WIDGET_ANDROID)
value: true
#else
value: false
#endif
mirror: always
#---------------------------------------------------------------------------
# Prefs starting with "mousewheel."
#---------------------------------------------------------------------------

Просмотреть файл

@ -4575,8 +4575,6 @@ pref("dom.maxHardwareConcurrency", 16);
pref("osfile.reset_worker_delay", 30000);
#endif
pref("media.block-autoplay-until-in-foreground", true);
// TODO: Bug 1324406: Treat 'data:' documents as unique, opaque origins
// If true, data: URIs will be treated as unique opaque origins, hence will use
// a NullPrincipal as the security context.