about summary refs log tree commit diff
path: root/pkgs/applications/networking/browsers/firefox/common.nix
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2022-03-28 15:26:04 +0200
committerMartin Weinelt <hexa@darmstadt.ccc.de>2022-03-28 18:12:02 +0200
commit2a3247480291c808d227b29d125c7324f11b353f (patch)
treea14afcfbd921a299ad24975002e645c2db55869b /pkgs/applications/networking/browsers/firefox/common.nix
parent584734ee64e5d08d57736dd4c919c273bfa2d43d (diff)
firefox: fix drmSupport flag
In #109133 @alyssais discovered that the drmSupport flag stopped
working. This is because Mozilla decided around Firefox 51
(mozbz#1289634) to swap the default values and our flag was asking for
the wrong thing all along.

Since this flag has now been enabled for multiple years, disabling it
would mean a regression for our users. Leaving it enabled should be
unproblematic since it only controls whether Firefox shows the EME nagbar,
that allows to enable Widevine CDM, when a site requests it. The choice is
therefore completely up to the enduser.

Disabling this nagbar is still possible at runtime by setting
`browser.eme.ui.enabled` to `false`. If Widevine CDM was inadvertently
enabled it can be disabled at `media.gmp-widevinecdm.enabled`.

Supersedes: #109133
Diffstat (limited to 'pkgs/applications/networking/browsers/firefox/common.nix')
-rw-r--r--pkgs/applications/networking/browsers/firefox/common.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix
index 64cba1b52a60e..2aba65effbd34 100644
--- a/pkgs/applications/networking/browsers/firefox/common.nix
+++ b/pkgs/applications/networking/browsers/firefox/common.nix
@@ -98,10 +98,18 @@
 , googleAPISupport ? geolocationSupport
 , webrtcSupport ? !privacySupport
 
+# digital rights managemewnt
+
+# This flag controls whether Firefox will show the nagbar, that allows
+# users at runtime the choice to enable Widevine CDM support when a site
+# requests it.
+# Controlling the nagbar and widevine CDM at runtime is possible by setting
+# `browser.eme.ui.enabled` and `media.gmp-widevinecdm.enabled` accordingly
+, drmSupport ? true
+
 ## other
 
 , crashreporterSupport ? false
-, drmSupport ? false
 , safeBrowsingSupport ? false
 
 # As stated by Sylvestre Ledru (@sylvestre) on Nov 22, 2017 at
@@ -277,7 +285,7 @@ buildStdenv.mkDerivation ({
   ++ flag gssSupport "negotiateauth"
   ++ flag webrtcSupport "webrtc"
   ++ flag crashreporterSupport "crashreporter"
-  ++ lib.optional drmSupport "--enable-eme=widevine"
+  ++ lib.optional (!drmSupport) "--disable-eme"
 
   ++ (if debugBuild then [ "--enable-debug" "--enable-profiling" ]
                     else [ "--disable-debug" "--enable-optimize" ])