1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:17:35 +00:00

LibWeb+WebContent: Add APIs to control video playback state

This allows for the browser process to control the play/pause state,
whether we paint user agent controls on the video, and whether the video
loops when it finishes playing.
This commit is contained in:
Timothy Flynn 2023-05-15 11:17:58 -04:00 committed by Andreas Kling
parent d8f03dda08
commit c82f678fc6
9 changed files with 146 additions and 0 deletions

View file

@ -756,6 +756,21 @@ void ConnectionFromClient::prompt_closed(Optional<String> const& response)
m_page_host->prompt_closed(response);
}
void ConnectionFromClient::toggle_video_play_state()
{
m_page_host->toggle_video_play_state().release_value_but_fixme_should_propagate_errors();
}
void ConnectionFromClient::toggle_video_loop_state()
{
m_page_host->toggle_video_loop_state().release_value_but_fixme_should_propagate_errors();
}
void ConnectionFromClient::toggle_video_controls_state()
{
m_page_host->toggle_video_controls_state().release_value_but_fixme_should_propagate_errors();
}
void ConnectionFromClient::inspect_accessibility_tree()
{
if (auto* doc = page().top_level_browsing_context().active_document()) {