bilibili-live-ws

JSON →
library 6.3.1 ·javascript
verified Jun 7, 2026

A JavaScript/TypeScript library for connecting to Bilibili Live WebSocket and TCP APIs. Version 6.3.1 is the latest stable release. It provides four main classes (LiveWS, LiveTCP, KeepLiveWS, KeepLiveTCP) for real-time room events like danmaku, gifts, and heartbeats. Supports browser environment with experimental browser build. Includes TypeScript type definitions. Features automatic heartbeats, custom auth for Bilibili Open Live platform, and multiple protocol versions (1, 2, 3) for compression.