support playlist function

This commit is contained in:
bonjinnorenka 2023-09-06 23:31:09 +09:00
parent 74bf3bc8b2
commit ffb7b7446e
2 changed files with 179 additions and 16 deletions

View file

@ -111,6 +111,9 @@ function control_embed_iframe(message) {
case 'seek':
const duration = player.duration();
let newTime = helpers.clamp(message.data.value, 0, duration);
if (player.paused() && player.currentTime() === 0) {
player.play();
}
player.currentTime(newTime);
break;
case 'setplaybackrate':