Restore join YouTube start prompt
This commit is contained in:
+2
-3
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user