Title: [175003] trunk/Source/WebCore
Revision
175003
Author
[email protected]
Date
2014-10-21 17:17:46 -0700 (Tue, 21 Oct 2014)

Log Message

Calling WebCore::Page::setMediaVolume(0) does not mute videos as expected.
https://bugs.webkit.org/show_bug.cgi?id=137305

Reviewed by Darin Adler.

This was broken in http://trac.webkit.org/changeset/154970. To fix this (but not break
GStreamer), remove the "if (m_volumeInitialized)" check before updating the MediaPlayer's
volume to the value multiplied with the Page's mediaVolume. This should not affect GStreamer's
behavior because MediaPlayerPrivateGStreamerBase::setStreamVolumeElement does nothing unless
m_volumeInitialized is true.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateVolume):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (175002 => 175003)


--- trunk/Source/WebCore/ChangeLog	2014-10-21 23:38:12 UTC (rev 175002)
+++ trunk/Source/WebCore/ChangeLog	2014-10-22 00:17:46 UTC (rev 175003)
@@ -1,3 +1,19 @@
+2014-10-21  Ada Chan  <[email protected]>
+
+        Calling WebCore::Page::setMediaVolume(0) does not mute videos as expected.
+        https://bugs.webkit.org/show_bug.cgi?id=137305
+
+        Reviewed by Darin Adler.
+
+        This was broken in http://trac.webkit.org/changeset/154970. To fix this (but not break
+        GStreamer), remove the "if (m_volumeInitialized)" check before updating the MediaPlayer's
+        volume to the value multiplied with the Page's mediaVolume. This should not affect GStreamer's
+        behavior because MediaPlayerPrivateGStreamerBase::setStreamVolumeElement does nothing unless
+        m_volumeInitialized is true.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::updateVolume):
+
 2014-10-21  Jer Noble  <[email protected]>
 
         [EME][Mac] Update to match new AVStreamSession API and requirements.

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (175002 => 175003)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2014-10-21 23:38:12 UTC (rev 175002)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2014-10-22 00:17:46 UTC (rev 175003)
@@ -4477,8 +4477,7 @@
         }
 
         m_player->setMuted(shouldMute);
-        if (m_volumeInitialized)
-            m_player->setVolume(m_volume * volumeMultiplier);
+        m_player->setVolume(m_volume * volumeMultiplier);
     }
 
     if (hasMediaControls())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to