Remove playerContainer position:relative override that nuked YT iframe

createYoutubeEmbed set container.style.position = 'relative' to anchor
the click-to-unmute overlay. That overrode #playerContainer's
position:fixed/inset:0 — the container fell into normal flow with
zero height (the YT iframe inside has no intrinsic size), so the new
absolute-positioned iframe rendered as 100% of 0 = black screen.

The container is already position:fixed, so absolute children anchor
to it correctly without the override. Removed the line. Bumped SW
cache to v7.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
ScreenTinker 2026-04-28 15:36:39 -05:00
parent fb0a7f48dd
commit a4c85eaabc
2 changed files with 5 additions and 2 deletions

View file

@ -689,7 +689,10 @@
}
overlay.remove();
};
container.style.position = 'relative';
// Don't override container.style.position here — #playerContainer is already
// position:fixed so absolute children anchor to it. Setting position:relative
// collapsed the container to 0 height (no content sizing it in normal flow),
// which made the YT iframe render black.
container.appendChild(overlay);
}

View file

@ -1,4 +1,4 @@
const CACHE_NAME = 'rd-player-v6';
const CACHE_NAME = 'rd-player-v7';
// Install: skip waiting to activate immediately
self.addEventListener('install', (event) => {