mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-06 13:35:03 +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:
committed by
Andreas Kling
parent
9fc8c37414
commit
7c31343df0
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user