about summary refs log tree commit diff
path: root/pkgs/aszlig/firefox/mute-by-default.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/aszlig/firefox/mute-by-default.patch')
-rw-r--r--pkgs/aszlig/firefox/mute-by-default.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/aszlig/firefox/mute-by-default.patch b/pkgs/aszlig/firefox/mute-by-default.patch
new file mode 100644
index 00000000..67e6bce4
--- /dev/null
+++ b/pkgs/aszlig/firefox/mute-by-default.patch
@@ -0,0 +1,20 @@
+diff --git a/dom/media/autoplay/AutoplayPolicy.cpp b/dom/media/autoplay/AutoplayPolicy.cpp
+index 77c53ce58acd..688af016a72c 100644
+--- a/dom/media/autoplay/AutoplayPolicy.cpp
++++ b/dom/media/autoplay/AutoplayPolicy.cpp
+@@ -78,15 +78,6 @@ static bool IsWindowAllowedToPlay(nsPIDOMWindowInner* aWindow) {
+     return true;
+   }
+ 
+-  WindowContext* topContext =
+-      aWindow->GetBrowsingContext()->GetTopWindowContext();
+-  if (topContext && topContext->HasBeenUserGestureActivated()) {
+-    AUTOPLAY_LOG(
+-        "Allow autoplay as top-level context has been activated by user "
+-        "gesture.");
+-    return true;
+-  }
+-
+   Document* currentDoc = aWindow->GetExtantDoc();
+   if (!currentDoc) {
+     return false;