Show blocked YouTube overlay immediately

This commit is contained in:
codex
2026-06-10 20:38:54 +02:00
parent c92e6a5c19
commit 01fd20ccdb
+1 -1
View File
@@ -384,7 +384,6 @@ function setYoutubeStartPromptVisible(visible) {
function requestYoutubePlayback(player, videoId, position) {
const requestId = ++youtubePlaybackRequestId;
const startedAt = Date.now();
setYoutubeStartPromptVisible(false);
for (const delay of [0, 150, 750, 1500, 3000]) {
setTimeout(() => {
@@ -578,6 +577,7 @@ async function applyWatchState(state, { suppressEvents = true } = {}) {
if (youtubeReady) {
if (shouldPlay) {
setYoutubeStartPromptVisible(true);
const sameVideo = player.getVideoData?.().video_id === currentYoutubeVideoId;
const playerState = player.getPlayerState?.();
if (sameVideo && ![YT.PlayerState.UNSTARTED, YT.PlayerState.CUED].includes(playerState)) {