fix: autoplay video instantly on watch page load

This commit is contained in:
2026-05-13 23:48:09 +02:00
parent e675f125d4
commit 2619dc2c94
3 changed files with 36 additions and 7 deletions

View File

@@ -209,7 +209,7 @@ export const setupControls = (): void => {
// mouse move in container shows controls
state.container.addEventListener('mousemove', showControls);
// initial sync
updatePlayPauseIcons(false);
// initial sync — check actual video state since inline script may have started playback
updatePlayPauseIcons(!state.video.paused);
syncVolumeUI();
};