From ed6f2f9b81e2879a6e2f13655e667c951290d266 Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Thu, 26 Jun 2025 08:52:01 +0100 Subject: [PATCH] LibWeb: Ensure audio tracks are set to the correct volume before playing Previously, a video or audio element with the `autoplay` and `muted` attributes set, would not mute the audio before playing. --- Libraries/LibWeb/HTML/AudioTrack.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Libraries/LibWeb/HTML/AudioTrack.cpp b/Libraries/LibWeb/HTML/AudioTrack.cpp index d83051835cf..1e3f889b4a7 100644 --- a/Libraries/LibWeb/HTML/AudioTrack.cpp +++ b/Libraries/LibWeb/HTML/AudioTrack.cpp @@ -41,6 +41,8 @@ AudioTrack::AudioTrack(JS::Realm& realm, GC::Ref media_element m_audio_plugin->on_decoder_error = [this](String error_message) { m_media_element->set_decoder_error(move(error_message)); }; + + update_volume(); } AudioTrack::~AudioTrack()