mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb+LibWebView+WebContent: Inform chromes when audio is played/paused
Most browsers have some indicator when audio is playing in a tab, which makes it easier to find that tab and mute unwanted audio. This adds an IPC to allow the Ladybird chromes to do something similar.
This commit is contained in:
committed by
Andreas Kling
parent
5424135d81
commit
40c0dd81d2
@@ -315,6 +315,14 @@ void ViewImplementation::toggle_media_controls_state()
|
||||
client().async_toggle_media_controls_state(page_id());
|
||||
}
|
||||
|
||||
void ViewImplementation::did_change_audio_play_state(Badge<WebContentClient>, Web::HTML::AudioPlayState play_state)
|
||||
{
|
||||
m_audio_play_state = play_state;
|
||||
|
||||
if (on_audio_play_state_changed)
|
||||
on_audio_play_state_changed(m_audio_play_state);
|
||||
}
|
||||
|
||||
void ViewImplementation::handle_resize()
|
||||
{
|
||||
resize_backing_stores_if_needed(WindowResizeInProgress::Yes);
|
||||
|
||||
Reference in New Issue
Block a user