kuaishou-danmaku

1.0.2 • Public • Published

这个一个抖音直连的应用 可以直接获取抖音直播间的弹幕 node 端

yarn add douyin-danmaku

const { live, handleMessage, PLATFORM } = require("./bundle.js");
(async () => {
  let ws = await live({
    roomNumber: "80017709309",
    platform: PLATFORM.douyin,
    isBrowser: true,// 
    cb: (msg) => {
      console.log(msg);
    },
  });

  setTimeout(() => {
    // 如果是 isBrowser=false 必须先removeAllListeners 才能close成功
    // 如果是 isBrowser=true 就没必要removeAllListeners 这样才能页面关闭成功
    ws.removeAllListeners();
    ws.close();
  }, 5000);
})();

Readme

Keywords

none

Package Sidebar

Install

npm i kuaishou-danmaku

Weekly Downloads

3

Version

1.0.2

License

ISC

Unpacked Size

170 kB

Total Files

3

Last publish

Collaborators

  • artiely