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

LibWeb: Implement HTMLMediaElement's autoplay attribute

This commit is contained in:
Timothy Flynn 2023-04-17 07:24:50 -04:00 committed by Andreas Kling
parent 1ffd533ea2
commit 229cc67fee
3 changed files with 52 additions and 10 deletions

View file

@ -106,6 +106,7 @@ private:
void set_paused(bool);
void set_duration(double);
bool is_eligible_for_autoplay() const;
bool has_ended_playback() const;
WebIDL::ExceptionOr<void> reached_end_of_media_playback();
@ -168,6 +169,9 @@ private:
// https://html.spec.whatwg.org/multipage/media.html#media-data
ByteBuffer m_media_data;
// https://html.spec.whatwg.org/multipage/media.html#can-autoplay-flag
bool m_can_autoplay { true };
bool m_running_time_update_event_handler { false };
Optional<Time> m_last_time_update_event_time;