Bug 1294649 - Ensure 'Play DRM Content' is unchecked by default on Linux. r=gerald
The current UI for EME on Linux is confusing. We have the 'Play DRM Content'
checkbox ticked, but the CDM disabled. It would be clearer if we just had
the 'Play DRM Checkbox' unticked, and instead left the Widevine CDM enabled.
Then we won't download and install the CDM until the 'Play DRM Content'
checkbox is checked (which toggles media.eme.enabled).
This also means that the Widevine CDM won't appear in the plugins list
by default unless the 'Play DRM Checkbox' is checked.
MozReview-Commit-ID: 7CeCe1DOWgM
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1313,17 +1313,28 @@ pref("identity.fxaccounts.migrateToDevEd
#endif
// On GTK, we now default to showing the menubar only when alt is pressed:
#ifdef MOZ_WIDGET_GTK
pref("ui.key.menuAccessKeyFocuses", true);
#endif
// Encrypted media extensions.
+#ifdef XP_LINUX
+// On Linux EME is visible but disabled by default. This is so that the
+// "Play DRM content" checkbox in the Firefox UI is unchecked by default.
+// DRM requires downloading and installing proprietary binaries, which
+// users on an open source operating systems didn't opt into. The first
+// time a site using EME is encountered, the user will be prompted to
+// enable DRM, whereupon the EME plugin binaries will be downloaded if
+// permission is granted.
+pref("media.eme.enabled", false);
+#else
pref("media.eme.enabled", true);
+#endif
pref("media.eme.apiVisible", true);
// Decode using Gecko Media Plugins in <video>, if a system decoder is not
// availble and the preferred GMP is available.
pref("media.gmp.decoder.enabled", false);
// If decoding-via-GMP is turned on for <video>, use Adobe's GMP for decoding,
// if it's available. Note: We won't fallback to another GMP if Adobe's is not
@@ -1345,27 +1356,18 @@ pref("media.gmp.trial-create.enabled", t
#ifdef MOZ_ADOBE_EME
pref("media.gmp-eme-adobe.visible", true);
pref("media.gmp-eme-adobe.enabled", true);
#endif
#ifdef MOZ_WIDEVINE_EME
pref("media.gmp-widevinecdm.visible", true);
-// On Linux Widevine is visible but disabled by default. This is because
-// enabling Widevine downloads a proprietary binary, which users on an open
-// source operating system didn't opt into. The first time a site using EME
-// is encountered, the user will be prompted to enable EME, whereupon the
-// EME plugin binary will be downloaded if permission is granted.
-#ifdef XP_LINUX
-pref("media.gmp-widevinecdm.enabled", false);
-#else
pref("media.gmp-widevinecdm.enabled", true);
#endif
-#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", "");