mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
LibMedia+LibWeb: Disable audio output in headless mode
Audio output on macOS was consuming Core Audio resources until the PlaybackStream creation took well over the timeout for some tests. This was observed in media-source-buffered.html, where it would time out due to the long-running callback on the main thread to create the PlaybackStream for AudioMixingSink. However, the AudioUnit init should definitely not be blocking the main thread, so I've added a FIXME there.
This commit is contained in:
committed by
Gregory Bertilson
parent
94be6c7611
commit
1467127d35
Notes:
github-actions[bot]
2026-04-01 07:55:31 +00:00
Author: https://github.com/Zaggy1024 Commit: https://github.com/LadybirdBrowser/ladybird/commit/1467127d35e Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8655 Reviewed-by: https://github.com/tcl3
@@ -1751,6 +1751,7 @@ void HTMLMediaElement::on_metadata_parsed()
|
||||
void HTMLMediaElement::set_up_playback_manager_for_remote()
|
||||
{
|
||||
m_playback_manager = Media::PlaybackManager::create();
|
||||
m_playback_manager->set_audio_output_disabled(document().page().client().is_headless());
|
||||
|
||||
m_has_enabled_preferred_audio_track = false;
|
||||
m_has_selected_preferred_video_track = false;
|
||||
@@ -1816,6 +1817,7 @@ void HTMLMediaElement::set_up_playback_manager_for_remote()
|
||||
void HTMLMediaElement::set_up_playback_manager_for_local()
|
||||
{
|
||||
m_playback_manager = Media::PlaybackManager::create();
|
||||
m_playback_manager->set_audio_output_disabled(document().page().client().is_headless());
|
||||
|
||||
m_has_enabled_preferred_audio_track = false;
|
||||
m_has_selected_preferred_video_track = false;
|
||||
|
||||
Reference in New Issue
Block a user