youtube
youtube copied to clipboard
Prevent initial autoplay when disabled
Summary
- install an early page-world play guard before YouTube can start the first watch-page playback
- mirror the autoplay-disable setting into page localStorage for the early guard
- add Jest coverage for blocked and allowed initial play calls
Fixes #1461
Testing
- npm ci --silent
- npm test -- --runInBand --json --outputFile=/tmp/youtube-jest-full2.json
- git diff --check
hi and thank you @KaannKara
compare: https://github.com/code-charity/youtube/pull/3936
pageWorldFiles: Our timing is worth tuning if you will. Some files only need to load if that feature is enabled