Skip to content

Commit ebed03e

Browse files
[ARRISEOS-47239]: Cloned from Apple Radar 119814367: Mute functionality not working on video element
1 parent 9c815b5 commit ebed03e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,11 @@ void MediaPlayerPrivateGStreamer::setVolume(float volume)
17771777
return;
17781778

17791779
GST_DEBUG_OBJECT(pipeline(), "Setting volume: %f", volume);
1780-
gst_stream_volume_set_volume(m_volumeElement.get(), GST_STREAM_VOLUME_FORMAT_LINEAR, static_cast<double>(volume));
1780+
gst_stream_volume_set_volume(m_volumeElement.get(), GST_STREAM_VOLUME_FORMAT_LINEAR, static_cast<double>(volume));
1781+
1782+
bool audioMuted = (volume == 0) ? true : false;
1783+
g_object_set(m_volumeElement.get(), "mute", audioMuted, nullptr);
1784+
17811785
configureMediaStreamAudioTracks();
17821786
}
17831787

0 commit comments

Comments
 (0)