Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pcrab/pblive-lib


https://github.com/pcrab/pblive-lib

Last synced: 10 days ago
JSON representation

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));
},
});
```