LibWeb: Ensure audio tracks are set to the correct volume before playing
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

Previously, a video or audio element with the `autoplay` and `muted`
attributes set, would not mute the audio before playing.
This commit is contained in:
Tim Ledbetter 2025-06-26 08:52:01 +01:00 committed by Tim Flynn
parent 838ca8d172
commit ed6f2f9b81
Notes: github-actions[bot] 2025-06-26 13:59:01 +00:00

View file

@ -41,6 +41,8 @@ AudioTrack::AudioTrack(JS::Realm& realm, GC::Ref<HTMLMediaElement> 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()