Files
javis_bot/bot/scripts/stream-test/README.md
javis-bot 2cdd159fc1 feat(stream-test): drive the whole browse scenario with real input
Make every action real keyboard/mouse via xdotool, not just the visible
browsing: address-bar navigation (Ctrl+L + char-by-char typing), the YouTube
settings gear -> 화질 -> 1080p menu (real clicks, verified hd1080), the autoplay
toggle, the play button, and fullscreen via the real 'f' key (F11 isn't honored
by this WM; 'f' yields true 1080p fullscreen without pausing). CDP/DOM API is
now used only to read state for verification.
2026-06-10 14:11:58 +09:00

43 lines
1.8 KiB
Markdown

# stream-test
Operational scripts for manually verifying the selfbot Go-Live broadcast with a
real browsing session captured from the X display.
## Files
- `stream-hold.ts` - joins the voice channel and keeps the Go-Live stream up
until stopped. All params from `.env` (`DISCORD_SELFBOT_TOKEN`,
`DISCORD_GUILD_ID`, `DISCORD_VOICE_CHANNEL_ID`, `VNC_RESOLUTION`,
`VNC_FRAMERATE`, `VNC_BITRATE_KBPS`, `STREAM_HW`, `VNC_DISPLAY`).
- `human.mjs` - human-like interaction helpers. Real mouse/keyboard via
`xdotool` (so the cursor is visible in the stream); Playwright only locates
elements. Every action is real input: address-bar navigation (Ctrl+L +
typing), search typing, clicking the video / settings menu / autoplay toggle /
play button, fullscreen via the `f` key, scrolling, and entering links. The
CDP/DOM API is used only to read state for verification, and as a rare click
fallback when an element has no on-screen box.
- `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.
## Run
```
# keep the broadcast up (separate process / service)
bun bot/scripts/stream-test/stream-hold.ts
# Chrome on the streamed display with remote debugging, then:
node bot/scripts/stream-test/scenario.mjs
```
## A/B framerate/resolution
Lower settings to compare what Discord actually delivers to viewers, e.g.:
```
VNC_RESOLUTION=1280x720 VNC_FRAMERATE=30 bun bot/scripts/stream-test/stream-hold.ts
```
## Notes
- Selfbot streaming violates Discord ToS; use a burner account.
- Requires `xdotool`, an X display, and a system `ffmpeg` with `x11grab`/nvenc.
- Prereqs (`playwright`, system Chrome) are not bot dependencies; install
separately where you run the scenario.