Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pcrab/pblive-lib
https://github.com/pcrab/pblive-lib
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/pcrab/pblive-lib
- Owner: Pcrab
- License: mit
- Created: 2022-09-15T10:26:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-18T10:13:07.000Z (about 1 year ago)
- Last Synced: 2024-12-26T07:36:28.735Z (10 days ago)
- Language: TypeScript
- Size: 622 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PBlive
This is a simple bilibili live helper library, highly inspired by [danmu-console-helper](https://github.com/ddiu8081/danmu-console-helper).
## Usage
```typescript
import open from "@pcrab/pblive-lib"const roomId = 81004; // https://live.bilibili.com/81004
open(roomId);
```You can add handlers for different events.
```typescript
import open from "@pcrab/pblive-lib"open(81004, {
onDanmuMsg: (danmu) => {
console.log(JSON.stringify(danmu));
},
});
```