mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWeb: Store the ID of all media elements on a page
This will be used to inform the media elements when the user has muted the page.
This commit is contained in:
parent
9fc8c37414
commit
7c31343df0
Notes:
sideshowbarker
2024-07-17 00:53:02 +09:00
Author: https://github.com/trflynn89
Commit: 7c31343df0
Pull-request: https://github.com/SerenityOS/serenity/pull/23773
4 changed files with 24 additions and 0 deletions
|
@ -65,6 +65,13 @@ void HTMLMediaElement::initialize(JS::Realm& realm)
|
|||
// the document is active again.
|
||||
pause_element().release_value_but_fixme_should_propagate_errors();
|
||||
});
|
||||
|
||||
document().page().register_media_element({}, unique_id());
|
||||
}
|
||||
|
||||
void HTMLMediaElement::finalize()
|
||||
{
|
||||
document().page().unregister_media_element({}, unique_id());
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/media.html#queue-a-media-element-task
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue