Mooling0602/dsh-bili-danmaku-overlay ↗★ 1

dsh-bili-danmaku-overlay

Bilibili live danmaku as an always-visible overlay in the DSH Web UI.

패키지
dsh-bili-danmaku-overlay
호환성
미검증
Cordis peer 범위
^4.0.5
버전
1.1.0
라이선스
MIT
최근 업데이트
2026. 11. 11.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Mooling0602/dsh-bili-danmaku-overlay

Bilibili Live Danmaku Overlay

English | 简体中文

Shows Bilibili live-room danmaku in a floating overlay inside the DSH Web UI. The overlay stays mounted across page changes, so you can watch a room while you work.

Features

  • Live danmaku with automatic reconnect, and a history fallback when the live socket is unavailable
  • Multiple rooms at once, each in its own window
  • A round Bilibili television entry that shows the overall state and the newest danmaku, and opens a menu that manages every room and reopens any room this browser has connected to before
  • Windows are titled with the room's real title; double-click to rename one temporarily
  • Resize a window from its bottom right corner, or minimize it to its title bar, or fold it back into the ball, none of which stops its stream
  • A room that is not streaming shows "not live" first; press View danmaku to reveal the list and unlock the input
  • Viewer count, danmaku sending, and a plugin settings page for every option

Install

dsh plugin --profile web add github:Mooling0602/dsh-bili-danmaku-overlay

Restart dsh after installing. The package carries its own cordis.patch.yml, so dsh inserts the plugin into the bundle by itself. It ships built JavaScript, so installation needs no compiler step.

Then open the plugin settings page and set defaultRoom to the room you want to watch.

To uninstall:

dsh plugin --profile web remove dsh-bili-danmaku-overlay

Credentials

The plugin does not manage credentials. It reads SESSDATA and bili_jct from ~/.dsh/.credentials.yaml, which you maintain.

refs:
  BILIBILI_SESSDATA: 
  BILIBILI_JCT: 

To get the values: log in to Bilibili in a browser, open developer tools, then Application, then Cookies for https://www.bilibili.com, and copy the two values.

Watching needs only SESSDATA. Sending danmaku also needs bili_jct.

Settings

Every option is editable on the plugin settings page and applies immediately.

OptionDefaultDescription
defaultRoomemptyRoom to open with; empty means type one each time
autoConnectfalseConnect to the default room on load
historyLimit200Rows kept in a window
historyFetch50Items fetched per history request
pollMinMs100Fastest history poll interval; the poller backs off above it on errors
statsIntervalMs60000Viewer-count refresh interval
heartbeatMs30000Upstream socket heartbeat
showEnterMessagestrueShow "entered the room" notices
showSuperChattrueShow super chat messages
requestTimeoutMs12000Request timeout

Front-end settings

The Front-end settings block on the configuration page is stored in the browser only and never written to the dsh configuration. A slider takes effect immediately.

OptionRangeDefault
Ball diameter32-96px48px
Window zoom (DPI)50-300%100%
Window size240-720 by 180-760px320 by 300px

A window is resized by dragging its bottom right corner. A minimized window is only its title bar, so its size is not adjustable.

The zoom changes the size of the text, spacing and buttons inside a danmaku window, and also the room list behind the floating ball, while leaving the window itself alone, so the two are adjusted separately. At 100% it follows the browser's own zoom for the page. A value far above or below the comfortable range is still accepted, and the settings row says so.

The reset button at the top right of the block restores the ball diameter, the window zoom and the window size. It stays disabled while nothing has been changed.

Notes

  • The viewer count is a real head count, not the popularity score some Bilibili endpoints report.
  • Hover the status dot in a window's top left corner to read the exact state: not live, connection failed, reading history danmaku, or connected.

Development

The sources are TypeScript. index.js and client.js are build output and are committed.

npm run build
npm run typecheck

Rebuild after editing src/. client.js reaches the page on a refresh; index.js is the Host half and needs dsh restarted.

License

MIT