LibWebView: Handle mutliple audio tracks when audio play state changes

For example, if a page has multiple audio elements all actively playing
audio, we don't want to broadcast a play state change when only one of
them stop playing.
This commit is contained in:
Timothy Flynn
2024-03-30 09:34:23 -04:00
committed by Andreas Kling
parent c7c7ed780b
commit 9fc8c37414
2 changed files with 19 additions and 2 deletions

View File

@@ -260,6 +260,7 @@ protected:
RefPtr<Core::Promise<LexicalPath>> m_pending_screenshot;
Web::HTML::AudioPlayState m_audio_play_state { Web::HTML::AudioPlayState::Paused };
size_t m_number_of_elements_playing_audio { 0 };
};
}