# app-plyr YouTube browser checks These Playwright CLI fixtures run against the actual window-manager example, whiteboard room, app-plyr and YouTube iframe. Use a dedicated test room with valid credentials: the fixtures create/close Apps and exercise writable permissions, disconnect/reload, and duplicate user sessions. ## Run Install the example with its frozen lockfile. The Vite alias loads `dist/main.es.js` from the installed app-plyr package. Keep room tokens in an ignored local env file, such as `example/.env.youtube-e2e.local`, using the existing example room configuration. Do not commit credentials. From the window-manager repository root, start the example: ```sh pnpm -C example exec vite --host 127.0.0.1 --port 4000 --strictPort --mode youtube-e2e ``` In another terminal at the same repository root, use Playwright CLI with Chrome: ```sh mkdir -p output/playwright npx --package @playwright/cli playwright-cli -s=plyr-qa open 'http://localhost:4000/?writable=1&uid=owner-e2e-A' --browser chrome npx --package @playwright/cli playwright-cli -s=plyr-qa run-code --filename example/qa/youtube-owner-controller.js npx --package @playwright/cli playwright-cli -s=plyr-qa run-code --filename example/qa/youtube-follower-audio-controller.js npx --package @playwright/cli playwright-cli -s=plyr-qa run-code --filename example/qa/youtube-audio-controller.js npx --package @playwright/cli playwright-cli -s=plyr-qa run-code --filename example/qa/youtube-pending-recovery.js npx --package @playwright/cli playwright-cli -s=plyr-qa run-code --filename example/qa/youtube-audio.js npx --package @playwright/cli playwright-cli -s=plyr-qa run-code --filename example/qa/youtube-owner.js npx --package @playwright/cli playwright-cli -s=plyr-qa run-code --filename example/qa/youtube-owner-fast4g.js npx --package @playwright/cli playwright-cli -s=plyr-qa run-code --filename example/qa/plyr-html5-audit.js npx --package @playwright/cli playwright-cli -s=plyr-qa close ``` Run these sequentially. Each returns JSON with `passed` and `checks`; require `passed: true`. Browser suites share the main page and manage their additional contexts and Apps. Stop the example server after testing. The owner fixture expects the creator UID `owner-e2e-A` shown above. ## Coverage | Fixture | Checks | Scope | | --- | ---: | --- | | youtube-owner-controller | 17 | Built Controller with controlled engine observations, command arbitration, recovery and cleanup | | youtube-follower-audio-controller | 10 | Shared/local follower audio, delayed acknowledgement, priming and cleanup | | youtube-audio-controller | 10 | Audio command observations and cache/UI handling | | youtube-pending-recovery | 3 | Real native seek/rate input after deliberately withholding parent API commands | | youtube-audio | 22 | Three-client native/custom audio and four controlled mute/pause races | | youtube-owner | 31 | Native/custom transport, real video progress, CC, permissions, refresh/reconnect, duplicate UID and small players | | youtube-owner-fast4g | 8 | Follower and creator buffering/recovery on real media | | plyr-html5-audit | 7 | Original HTML5 media, custom audio and play/pause/seek | The 108 checks comprise 37 controlled Controller checks and 71 browser checks. The pending recovery fixture withholds initial parent API commands. Four audio race checks withhold audio sampling until real native mute/pause complete. These are controlled fault scenarios, not measurements of natural event ordering. Fast 4G uses 9 Mbps download, 1.5 Mbps upload and 60 ms latency. It additionally stalls two media requests by 3 seconds to reliably create a progress difference; room signaling and the other client are not stalled. The report distinguishes network throttling from those injected media interruptions. `check-plyr-baseline.cjs` compares the current package with app-plyr 0.2.12 (`a80584e`) and checks explicitly accepted method differences and unchanged custom control class/input code. Run it separately with `node example/qa/check-plyr-baseline.cjs`; source equality does not prove universal runtime equivalence. The overlay fixtures and `youtube-audit-fixes.js` cover earlier compatibility/initialization scenarios and are outside the 108 total. ## Open observation An earlier paused seek into a target that had not become ready timed out after 45 seconds. The room target and both native video `currentTime` values were 90, but the videos stayed at `readyState=1` and the outer YouTube API reported an old position despite a retry. Its cause remains unconfirmed. The focused command recovery fixture uses an already decoded target to isolate arbitration from media loading. Passing the suites above does not establish that the earlier loading timeout is fixed. Vimeo and whiteboard recording playback are outside the current browser validation scope.