1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-12 02:30:30 +09:00

LibWeb: Add AudioContext.createMediaElementSource() factory method

This commit is contained in:
Tim Ledbetter 2025-01-15 23:08:23 +00:00 committed by Luke Wilde
parent aa39aa50f7
commit 31532e36a8
Notes: github-actions[bot] 2025-01-17 19:05:41 +00:00
4 changed files with 18 additions and 5 deletions

View file

@ -342,4 +342,12 @@ bool AudioContext::start_rendering_audio_graph()
return render_result;
}
// https://webaudio.github.io/web-audio-api/#dom-audiocontext-createmediaelementsource
WebIDL::ExceptionOr<GC::Ref<MediaElementAudioSourceNode>> AudioContext::create_media_element_source(GC::Ptr<HTML::HTMLMediaElement> media_element)
{
MediaElementAudioSourceOptions options;
options.media_element = media_element;
return MediaElementAudioSourceNode::create(realm(), *this, options);
}
}