1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:58:11 +00:00

LibWeb: Pause HTMLMediaElement when its document becomes inactive

For example, when navigating to another page, this ensures any media
resource will not continue playing.
This commit is contained in:
Timothy Flynn 2023-05-04 08:50:34 -04:00 committed by Andreas Kling
parent f78eadf00f
commit ac8b892a25
2 changed files with 12 additions and 0 deletions

View file

@ -208,6 +208,8 @@ private:
bool m_running_time_update_event_handler { false };
Optional<Time> m_last_time_update_event_time;
JS::GCPtr<DOM::DocumentObserver> m_document_observer;
JS::GCPtr<Fetch::Infrastructure::FetchController> m_fetch_controller;
bool m_seek_in_progress = false;