1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-29 17:35:06 +00:00

LibWeb: Begin implementing media resource seeking

This commit is contained in:
Timothy Flynn 2023-04-11 18:37:00 -04:00 committed by Linus Groh
parent f8f35fdaad
commit 5a98a5529f
8 changed files with 138 additions and 8 deletions

View file

@ -101,4 +101,10 @@ void HTMLVideoElement::on_paused()
m_video_track->pause_video({});
}
void HTMLVideoElement::on_seek(double position, MediaSeekMode seek_mode)
{
if (m_video_track)
m_video_track->seek(Time::from_milliseconds(position * 1000.0), seek_mode);
}
}