summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-02-10 07:30:57 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-02-10 07:30:57 +0100
commitb2bdac20c02b12f2057b9ef70b0a946113a00e00 (patch)
tree10a9f7b3d495bf06522e5e107ce4b07933813f48
parent8cecf8d5208f3945b35f879bba3015bb1a11bec6 (diff)
downloadUXP-b2bdac20c02b12f2057b9ef70b0a946113a00e00.tar
UXP-b2bdac20c02b12f2057b9ef70b0a946113a00e00.tar.gz
UXP-b2bdac20c02b12f2057b9ef70b0a946113a00e00.tar.lz
UXP-b2bdac20c02b12f2057b9ef70b0a946113a00e00.tar.xz
UXP-b2bdac20c02b12f2057b9ef70b0a946113a00e00.zip
Workaround for cloned videos not retaining their muted state.
-rw-r--r--dom/html/HTMLMediaElement.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp
index b64761270..e81cd20bc 100644
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -4550,6 +4550,11 @@ void HTMLMediaElement::FirstFrameLoaded()
ChangeDelayLoadStatus(false);
+ // FIXME: This is a workaround for DoneCreatingElement() not being called
+ // at the appropriate time when cloning elements, to preserve the "muted"
+ // status. See bug 1424871.
+ if (HasAttr(kNameSpaceID_None, nsGkAtoms::muted)) SetMuted(true);
+
if (mDecoder && mAllowSuspendAfterFirstFrame && mPaused &&
!HasAttr(kNameSpaceID_None, nsGkAtoms::autoplay) &&
mPreloadAction == HTMLMediaElement::PRELOAD_METADATA) {