mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb: Move 'queue a media element task' to BaseAudioContext
We need these steps to be available for the yet to be implemented `BaseAudioContext.decodeAudioData()`.
This commit is contained in:
parent
273a46cc76
commit
177e5210e0
Notes:
github-actions[bot]
2024-10-15 08:03:28 +00:00
Author: https://github.com/gmta
Commit: 177e5210e0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1802
Reviewed-by: https://github.com/awesomekling ✅
Reviewed-by: https://github.com/shannonbooth
4 changed files with 13 additions and 9 deletions
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Luke Wilde <lukew@serenityos.org>
|
||||
* Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -113,4 +114,10 @@ WebIDL::ExceptionOr<void> BaseAudioContext::verify_audio_options_inside_nominal_
|
|||
return {};
|
||||
}
|
||||
|
||||
void BaseAudioContext::queue_a_media_element_task(Function<void()> steps)
|
||||
{
|
||||
auto task = HTML::Task::create(vm(), m_media_element_event_task_source.source, HTML::current_settings_object().responsible_document(), JS::create_heap_function(heap(), move(steps)));
|
||||
HTML::main_thread_event_loop().task_queue().add(move(task));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue