mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:07:45 +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:
parent
d8f03dda08
commit
c82f678fc6
9 changed files with 146 additions and 0 deletions
|
@ -334,6 +334,21 @@ void PageHost::prompt_closed(Optional<String> response)
|
|||
page().prompt_closed(move(response));
|
||||
}
|
||||
|
||||
Web::WebIDL::ExceptionOr<void> PageHost::toggle_video_play_state()
|
||||
{
|
||||
return page().toggle_video_play_state();
|
||||
}
|
||||
|
||||
Web::WebIDL::ExceptionOr<void> PageHost::toggle_video_loop_state()
|
||||
{
|
||||
return page().toggle_video_loop_state();
|
||||
}
|
||||
|
||||
Web::WebIDL::ExceptionOr<void> PageHost::toggle_video_controls_state()
|
||||
{
|
||||
return page().toggle_video_controls_state();
|
||||
}
|
||||
|
||||
void PageHost::page_did_request_accept_dialog()
|
||||
{
|
||||
m_client.async_did_request_accept_dialog();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue