YouTube hard-caps a windowed embed to ~360p and only a real fullscreen lifts the cap — after which the higher quality persists for the session. Since we can't set quality via the (dead) API, coax it: on the first video opened per page session, briefly enter fullscreen using the modal-open click's live user activation, then exit back to the small player. Exits early once onPlaybackQualityChange reports the quality actually rose (else after a ms cap). Module-scoped hdUnlockDone flag makes it fire once per session (the unlock persists), with a retry on the first overlay click if the open-click activation had expired. Cleaned up on teardown so a mid-flash close can't leave the player stuck in fullscreen. Best-effort — bandwidth still gates the actual bitrate. |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| tailwind.config.js | ||
| tsconfig.json | ||
| vite.config.ts | ||