mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
WebContent: Clear Serenity's audio buffers when seeking
Without this, the already-buffered audio may continue playing after a seek. The SoundPlayer application does the same operation here.
This commit is contained in:
parent
21260ea2ef
commit
27ca90646d
Notes:
sideshowbarker
2024-07-17 04:01:41 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/27ca90646d Pull-request: https://github.com/SerenityOS/serenity/pull/19771
1 changed files with 3 additions and 0 deletions
|
@ -92,6 +92,9 @@ void AudioCodecPluginSerenity::seek(double position)
|
|||
{
|
||||
m_position = set_loader_position(m_loader, position, m_duration);
|
||||
|
||||
m_connection->clear_client_buffer();
|
||||
m_connection->async_clear_buffer();
|
||||
|
||||
if (on_playback_position_updated)
|
||||
on_playback_position_updated(m_position);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue