Restore join YouTube start prompt

This commit is contained in:
codex
2026-06-10 20:45:55 +02:00
parent f3d08fbf9e
commit 1fdd7adf3c
+2 -3
View File
@@ -432,7 +432,7 @@ function requestYoutubePlayback(player, videoId, position, allowStartPrompt = fa
) {
setYoutubeStartPromptVisible(true);
}
}, 3300);
}, 900);
}
async function sendWatchState({
@@ -513,9 +513,9 @@ function handleYoutubeStateChange(event) {
desiredYoutubePlaying = action === "play";
if (desiredYoutubePlaying) {
syncedPlaybackRetryUntil = 0;
youtubeStartPromptAllowedUntil = 0;
setYoutubeStartPromptVisible(false);
} else {
youtubeStartPromptAllowedUntil = 0;
setYoutubeStartPromptVisible(false);
}
const state = currentWatchState(action === "play");
@@ -598,7 +598,6 @@ async function applyWatchState(state, { suppressEvents = true, allowStartPrompt
}
if (shouldPlay) {
setYoutubeStartPromptVisible(allowStartPrompt);
const sameVideo = player.getVideoData?.().video_id === currentYoutubeVideoId;
const playerState = player.getPlayerState?.();
if (sameVideo && ![YT.PlayerState.UNSTARTED, YT.PlayerState.CUED].includes(playerState)) {