Bug 1476853 - Enable block autoplay on Nightly only on desktop. r=jya
authorChris Pearce <cpearce@mozilla.com>
Thu, 19 Jul 2018 15:11:33 +1200
changeset 427436 7d8ce14346a34ec39d09d747e1e0ee0ff5f3f202
parent 427435 ea9220c21a7bb11b50b363f96745eaa1544ebb1a
child 427437 a44577a773a7d2a7e10af1ea318114890b110051
push id105465
push usertoros@mozilla.com
push dateFri, 20 Jul 2018 10:00:26 +0000
treeherdermozilla-inbound@18c964a8c818 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1476853
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1476853 - Enable block autoplay on Nightly only on desktop. r=jya We want to solicit feedback on our doorhanger implementation, so enable block autoplay by default on Nightly only. MozReview-Commit-ID: Kq5T8BS5Esm
browser/app/profile/firefox.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1444,17 +1444,29 @@ pref("media.gmp.trial-create.enabled", t
 // to enable the CDM if its disabled; it's as if the keysystem is completely
 // unsupported.
 
 #ifdef MOZ_WIDEVINE_EME
 pref("media.gmp-widevinecdm.visible", true);
 pref("media.gmp-widevinecdm.enabled", true);
 #endif
 
+#ifdef NIGHTLY_BUILD
+// Switch block autoplay logic to v2, and enable UI.
+pref("media.autoplay.enabled.user-gestures-needed", true);
+// Allow asking for permission to autoplay to appear in UI.
+pref("media.autoplay.ask-permission", true);
+// Set Firefox to block autoplay, asking for permission by default.
+pref("media.autoplay.default", 2); // 0=Allowed, 1=Blocked, 2=Prompt
+#else
+pref("media.autoplay.default", 0); // 0=Allowed, 1=Blocked, 2=Prompt
+pref("media.autoplay.enabled.user-gestures-needed", false);
 pref("media.autoplay.ask-permission", false);
+#endif
+
 
 // Play with different values of the decay time and get telemetry,
 // 0 means to randomize (and persist) the experiment value in users' profiles,
 // -1 means no experiment is run and we use the preferred value for frecency (6h)
 pref("browser.cache.frecency_experiment", 0);
 
 pref("browser.translation.detectLanguage", false);
 pref("browser.translation.neverForLanguages", "");