From 2a3247480291c808d227b29d125c7324f11b353f Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 28 Mar 2022 15:26:04 +0200 Subject: [PATCH] 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 --- .../networking/browsers/firefox/common.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index 64cba1b52a60..2aba65effbd3 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" ])