LAPLACE Chatterbox has two built-in player helpers, Auto Quality and Auto Catch-Up: they switch to the highest quality available when you enter a live room, and fine-tune playback speed in real time to keep the buffer near a target latency you set, cutting viewing latency to a minimum
Both are event-driven and cost almost nothing at runtime while disabled, and both work with the regular video stream and with audio-only mode
The core catch-up and quality-switching algorithms are adapted from c-basalt's
Bilibili 直播自动追帧
userscript (GPL-3.0). LAPLACE Chatterbox rebuilds them on an event-driven
model that no longer relies on timed polling
Auto Quality
Features
- Calls
livePlayer.switchQuality()once, the moment you enter a live room and the native player finishes initializing, switching to the highest tier the room offers - Triggers off the mount event of
#live-player videoinstead of polling, so rooms that are offline or nonexistent cost nothing extra - Runs once per page load; whatever quality you pick by hand afterwards (dropping back to 720P to save bandwidth, say) is kept intact
- Sniffs out the largest
qnvalue available inqualityCandidates, so it adapts on its own to higher tiers bilibili adds later, such as HBR high bitrate atqn=30000 - Skipped automatically when audio-only mode is on, so it cannot fight that mode's
stopPlaybackguard
Usage
- In the Chatterbox panel, open the Settings tab and find the Player Catch-Up section
- Select Automatically switch to the highest quality when entering a live room
- It takes effect the next time you enter any live room, with nothing to do by hand
Notes
- The highest quality costs more bandwidth. On mobile data or a metered connection, enable it only when you want it
- The switch lands a very short time after page load, so you may see the quality jump from the default tier to the top one
- It runs once per page load: if you switch rooms mid-stream or drop back to a lower quality by hand, it will not switch again for the rest of the session
Auto Catch-Up
Live latency comes mostly from buffer buildup in the player. Auto Catch-Up watches buffer length in real time, raising playback speed slightly when the buffer runs long (up to 1.3×) and lowering it when the buffer runs short (down to 0.1×) to avoid stalling, which holds buffer length near the Target Latency you set
Features
- Event-driven: adjustments trigger off the player's native
progress/waiting/timeupdate/playingevents, with nosetIntervalpolling, so it uses almost no resources when disabled or when the page is in the background - No adjustment in the background: all speed adjustment pauses once
document.hiddenis detected and resyncs automatically when the page returns to the foreground - Speed-up / slow-down steps: taken from c-basalt's measured values upstream
- Speed-up steps (seconds the buffer runs past the target → speed multiplier):
[+2s, 1.3×]/[+1s, 1.2×]/[+0s, 1.1×] - Slow-down steps (absolute buffer length → speed multiplier):
[0.2s, 0.1×]/[0.3s, 0.3×]/[0.6s, 0.6×]
- Speed-up steps (seconds the buffer runs past the target → speed multiplier):
- Audio-only support: detects audio-only mode on its own and works the same way on the hidden
<audio>element, with identical logic - Automatic rebinding: bilibili swaps out the
<video>/<audio>element on quality switches, audio-only toggles, and stream URL refreshes, so the feature reattaches its listeners through aMutationObserver - Live status panel: once enabled, the settings panel shows Current Latency, Target Latency, and Current Playback Speed, with a color cue for buffer health (green = healthy, yellow = catching up, red = about to stall)
Usage
- In the Chatterbox panel, open the Settings tab and find the Player Catch-Up section
- Select Enable Auto Catch-Up
- In the Target Latency field, set the buffer length you want to hold, in seconds; the default is 1.7
- A live status panel appears below it once enabled, so you can watch the catch-up work in real time
Options
| Option | Description | Default |
|---|---|---|
| Enable Auto Catch-Up | The master switch; turning it off stops all playback speed adjustment | Off |
| Target Latency (seconds) | The buffer length to hold. The player speeds up above this value and slows down below it; accepts 0.3 to 10 seconds | 1.7 |
A target latency that is too low (under 1 second, say) causes frequent stalls when the network fluctuates, and one that is too high defeats the point of catching up. Keep the default, or fine-tune it between 1.5 and 2 seconds
Status Panel
Once Auto Catch-Up is enabled, the settings panel shows this live data:
| Field | Meaning |
|---|---|
| Current Latency | Length of content already buffered but not yet played, in seconds |
| Target Latency | The target buffer length you set, in seconds |
| Diff | Current latency minus target latency; a positive value means the buffer runs long and the player is catching up, a negative one means it runs short and the player is slowing down |
| Current Playback Speed | The player's actual rate right now, normally 1.00× |
Color cues:
- 🟢 Green: the buffer sits near the target (within about ±0.5 seconds) and everything is healthy
- 🟡 Yellow: the buffer is well above the target (more than 1 second) and the player is catching up at a higher rate
- 🔴 Red: the buffer is under 0.2 seconds and about to stall, or playback speed is under 1.0× and slowing down
Notes
- Auto Catch-Up works by changing
playbackRate, which can shift audio pitch very slightly. In almost every case it is hard to notice - If the live room's network is very unstable, raise the target latency to trigger slow-downs less often
Last updated on September 9, 2026