Skip to content

Commit c6d788d

Browse files
authored
Fix YouTube player embed layout (#128)
- Increase iframe height for a usable player - Allow same-origin access so the embed renders correctly - Reset persisted player state for the new layout
1 parent bf92d7b commit c6d788d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

apps/web/src/components/YouTubePlayer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,9 @@ export function YouTubePlayerDrawer() {
401401
title="YouTube Player"
402402
src={embedUrl}
403403
width="100%"
404-
height="80"
404+
height="260"
405405
allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture"
406-
sandbox="allow-scripts allow-popups allow-forms allow-presentation"
406+
sandbox="allow-same-origin allow-scripts allow-popups allow-forms allow-presentation"
407407
loading="lazy"
408408
className="rounded-xl border-0"
409409
/>

apps/web/src/youtubePlayerStore.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ interface YouTubePlayerStore extends PersistedYouTubeState {
4242
clearCustomSlot: (slotIndex: 0 | 1) => void;
4343
}
4444

45-
const STORAGE_KEY = "okcode:youtube-player:v1";
45+
const STORAGE_KEY = "okcode:youtube-player:v2";
4646

4747
function readPersistedState(): PersistedYouTubeState {
4848
const defaults: PersistedYouTubeState = {
4949
isOpen: false,
5050
minimized: false,
51-
selectedIndex: null,
51+
selectedIndex: 0,
5252
volume: 80,
5353
customSlots: [null, null],
5454
};

0 commit comments

Comments
 (0)