From 8bfb961b362b75c67b7c69df15d75a5706b92e17 Mon Sep 17 00:00:00 2001 From: suresh-khurdiya-infosys Date: Wed, 19 Mar 2025 08:54:06 +0530 Subject: [PATCH] Mute functionality is not working on video element by calling volume API by 0/1 --- .../graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp index db4c5624873a8..7fb3fc004ded6 100644 --- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp +++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp @@ -1752,6 +1752,10 @@ void MediaPlayerPrivateGStreamer::setVolume(float volume) GST_DEBUG_OBJECT(pipeline(), "Setting volume: %f", volume); gst_stream_volume_set_volume(m_volumeElement.get(), GST_STREAM_VOLUME_FORMAT_LINEAR, static_cast(volume)); + + bool audioMuted = (volume == 0) ? true : false; + g_object_set(m_volumeElement.get(), "mute", static_cast(audioMuted), nullptr); + configureMediaStreamAudioTracks(); }