feat(stream-test): persistent YouTube ad auto-skipper for the broadcast
Adds ad-skip.mjs: connects over CDP and injects a watcher into every tab (current and future) that clicks "Skip ad" the moment it appears, closes overlay ads, and fast-forwards unskippable ads (seek-to-end + 16x + mute) so they clear in ~1s. Self-contained (no extension, no hosts/network changes) and reconnects across Chrome restarts. Documented in the README. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,13 @@ real browsing session captured from the X display.
|
||||
- `scenario.mjs` - the browse scenario (YouTube -> IU live -> 1080p ->
|
||||
fullscreen -> Naver -> 나무위키), driven with the human helpers. Connects to a
|
||||
Chrome already running with `--remote-debugging-port` (`CDP_PORT`, default
|
||||
9222) on the streamed display.
|
||||
9222) on the streamed display. Captions default OFF, auto-enabling a Korean
|
||||
track when one exists.
|
||||
- `ad-skip.mjs` - persistent YouTube ad auto-skipper. Connects over CDP and
|
||||
injects a watcher into every tab (current and future) that clicks "Skip ad"
|
||||
the instant it appears, closes overlay ads, and fast-forwards unskippable ads
|
||||
(seek-to-end + 16x + mute). Run it alongside the broadcast. Reconnects across
|
||||
Chrome restarts.
|
||||
|
||||
## Run
|
||||
```
|
||||
@@ -30,6 +36,9 @@ bun bot/scripts/stream-test/stream-hold.ts
|
||||
|
||||
# Chrome on the streamed display with remote debugging, then:
|
||||
node bot/scripts/stream-test/scenario.mjs
|
||||
|
||||
# keep YouTube ads auto-skipped for the whole broadcast (separate process):
|
||||
node bot/scripts/stream-test/ad-skip.mjs
|
||||
```
|
||||
|
||||
Recommended Chrome flags on the streamed display (avoids the "restore pages?"
|
||||
|
||||
Reference in New Issue
Block a user