mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +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:
committed by
Andreas Kling
parent
d8f03dda08
commit
c82f678fc6
@@ -131,6 +131,21 @@ void ViewImplementation::run_javascript(StringView js_source)
|
||||
client().async_run_javascript(js_source);
|
||||
}
|
||||
|
||||
void ViewImplementation::toggle_video_play_state()
|
||||
{
|
||||
client().async_toggle_video_play_state();
|
||||
}
|
||||
|
||||
void ViewImplementation::toggle_video_loop_state()
|
||||
{
|
||||
client().async_toggle_video_loop_state();
|
||||
}
|
||||
|
||||
void ViewImplementation::toggle_video_controls_state()
|
||||
{
|
||||
client().async_toggle_video_controls_state();
|
||||
}
|
||||
|
||||
void ViewImplementation::handle_resize()
|
||||
{
|
||||
resize_backing_stores_if_needed(WindowResizeInProgress::Yes);
|
||||
|
||||
Reference in New Issue
Block a user