floating-live 0.14.11 → 0.15.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/LICENSE +5 -670
  2. package/README.md +3 -34
  3. package/{src/abstract → dist/core}/LiveRoom.d.ts +1 -3
  4. package/{src/abstract → dist/core}/LiveRoom.js +6 -6
  5. package/{src/abstract → dist/core}/Reglist.d.ts +1 -1
  6. package/dist/core/index.d.ts +2 -0
  7. package/dist/core/index.js +18 -0
  8. package/dist/index.d.ts +6 -0
  9. package/{index.js → dist/index.js} +7 -7
  10. package/{src/index.d.ts → dist/live.d.ts} +0 -3
  11. package/{src/index.js → dist/live.js} +0 -2
  12. package/{src → dist}/module/ModCommand.d.ts +2 -2
  13. package/{src → dist}/module/ModCommand.js +1 -1
  14. package/{src → dist}/module/ModMessage.d.ts +2 -2
  15. package/{src → dist}/module/ModMessage.js +1 -1
  16. package/{src → dist}/module/ModPlugin.d.ts +1 -1
  17. package/{src → dist}/module/ModRoom.d.ts +3 -5
  18. package/{src → dist}/module/ModRoom.js +1 -10
  19. package/{src → dist}/module/ModState.d.ts +2 -2
  20. package/{src → dist}/module/ModState.js +1 -1
  21. package/{src → dist}/types/index.d.ts +0 -1
  22. package/{src → dist}/types/index.js +0 -1
  23. package/{src → dist}/types/message.d.ts +2 -2
  24. package/{src → dist}/types/plugin.d.ts +1 -1
  25. package/{src → dist}/types/room.d.ts +1 -1
  26. package/package.json +29 -15
  27. package/index.d.ts +0 -6
  28. package/plugin/acfun/acfunLive.d.ts +0 -74
  29. package/plugin/acfun/acfunLive.js +0 -279
  30. package/plugin/acfun/index.d.ts +0 -3
  31. package/plugin/acfun/index.js +0 -16
  32. package/plugin/bilibili/index.d.ts +0 -6
  33. package/plugin/bilibili/index.js +0 -45
  34. package/plugin/bilibili/parser.d.ts +0 -6
  35. package/plugin/bilibili/parser.js +0 -397
  36. package/plugin/bilibili/room.d.ts +0 -77
  37. package/plugin/bilibili/room.js +0 -261
  38. package/plugin/bilibili/types.d.ts +0 -424
  39. package/plugin/bilibili/types.js +0 -2
  40. package/plugin/bilibili/utils.d.ts +0 -17
  41. package/plugin/bilibili/utils.js +0 -137
  42. package/plugin/chatPrint/chatPrint.d.ts +0 -20
  43. package/plugin/chatPrint/chatPrint.js +0 -116
  44. package/plugin/chatPrint/index.d.ts +0 -7
  45. package/plugin/chatPrint/index.js +0 -10
  46. package/plugin/consoleEvent/index.d.ts +0 -6
  47. package/plugin/consoleEvent/index.js +0 -51
  48. package/plugin/msgSave/index.d.ts +0 -10
  49. package/plugin/msgSave/index.js +0 -81
  50. package/plugin/msgSave/msgSave.d.ts +0 -83
  51. package/plugin/msgSave/msgSave.js +0 -168
  52. package/src/module/ModAuth.d.ts +0 -10
  53. package/src/module/ModAuth.js +0 -35
  54. package/src/types/auth.d.ts +0 -19
  55. package/src/types/auth.js +0 -2
  56. package/test/type/bilibili_getInfoByRoom.d.ts +0 -492
  57. /package/{src/abstract → dist/core}/Reglist.js +0 -0
  58. /package/{src/enum.d.ts → dist/enums.d.ts} +0 -0
  59. /package/{src/enum.js → dist/enums.js} +0 -0
  60. /package/{src → dist}/module/ModPlugin.js +0 -0
  61. /package/{src → dist}/types/message.js +0 -0
  62. /package/{src → dist}/types/plugin.js +0 -0
  63. /package/{src → dist}/types/room.js +0 -0
  64. /package/{src → dist}/utils.d.ts +0 -0
  65. /package/{src → dist}/utils.js +0 -0
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Floating Live
2
2
  一个用于处理和保存直播弹幕的Node.js小工具,开箱即用。
3
3
 
4
+ 本体无弹幕获取功能,需要配合[floating-live-danmaku](https://github.com/Minteea/floating-live-danmaku)中的弹幕获取插件使用。
5
+
4
6
  目前支持bilibili和AcFun的直播弹幕,不同平台的弹幕会转换为同一种格式便于保存。
5
7
 
6
8
  项目仍在开发中,功能尚未完善,目前除了记录保存直播弹幕外暂时没有别的用处啦,敬请期待。
@@ -18,7 +20,7 @@ npm install floating-live
18
20
  // 导入FloatingLive
19
21
  const { FloatingLive } = require("floating-live")
20
22
  // 导入bilibili房间生成插件
21
- const bilibili = require("floating-live/plugin/bilibili")
23
+ const bilibili = require("@floating-live/bilibili/plugin")
22
24
 
23
25
  // 创建一个FloatingLive实例
24
26
  const live = new FloatingLive()
@@ -28,36 +30,3 @@ live.plugin.register(bilibili)
28
30
  // 添加房间并自动打开
29
31
  live.room.add("bilibili", 6, true)
30
32
  ```
31
-
32
- ### 拆包即用模式
33
- * 下载并安装 `Node.js` ,建议下载最新LTS版本(如果已经安装可跳过这一步)。
34
- * 下载该项目的zip压缩包,解压,并在项目根目录下新建一个名为 `save` 的文件夹。
35
- * 在项目根目录的控制台输入下列命令,安装所有依赖包。
36
- ```
37
- npm install
38
- ```
39
- #### 运行Demo文件
40
- * 打开demo/demo.ts
41
- ``` typescript
42
- // ...
43
- const config = {
44
- rooms: [
45
- {
46
- platform: "bilibili", // 直播平台
47
- id: 2064239, // 直播间号
48
- },
49
- ],
50
- };
51
- // ...
52
- ```
53
- * 根据需要修改直播平台和直播间号,目前支持的 `platform` 值有:`acfun`、`bilibili`(注意是小写),也可以通过自定义插件添加直播平台
54
- * 在项目根目录的控制台输入下列命令:
55
- ```
56
- npm run test
57
- ```
58
- 即可接收来自平台的直播弹幕。
59
-
60
- ## 感谢
61
- ### 使用开源库
62
- * [simon300000/bilibili-live-ws](https://github.com/simon300000/bilibili-live-ws/)
63
- * [ACFUN-FOSS/ac-danmu](https://github.com/ACFUN-FOSS/ac-danmu.js)
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { EventEmitter } from "events";
3
- import { RoomStatus } from "../enum";
3
+ import { RoomStatus } from "../enums";
4
4
  import { RoomDetail, RoomInfo, RoomStatsInfo } from "../types";
5
5
  import { Message, UserInfo } from "../types/message";
6
6
  export declare abstract class LiveRoom extends EventEmitter implements RoomInfo {
@@ -33,8 +33,6 @@ export declare abstract class LiveRoom extends EventEmitter implements RoomInfo
33
33
  abstract close(): void;
34
34
  /** 从服务器获取信息 */
35
35
  abstract getInfo(): Promise<void>;
36
- /** 设置用户凭据 */
37
- setAuth?(auth: string): void;
38
36
  /** 销毁事件 */
39
37
  protected onDestory?(): void;
40
38
  /** 销毁 */
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LiveRoom = void 0;
4
4
  const events_1 = require("events");
5
- const enum_1 = require("../enum");
5
+ const enums_1 = require("../enums");
6
6
  class LiveRoom extends events_1.EventEmitter {
7
7
  constructor() {
8
8
  super();
9
9
  /** 直播状态 */
10
- this.status = enum_1.RoomStatus.off;
10
+ this.status = enums_1.RoomStatus.off;
11
11
  /** 时间戳 */
12
12
  this.timestamp = 0;
13
13
  /** 房间是否打开 */
@@ -25,9 +25,9 @@ class LiveRoom extends events_1.EventEmitter {
25
25
  // 直播结束消息 => 先发送消息再更改状态
26
26
  switch (msg.type) {
27
27
  case "live_start":
28
- this.status = enum_1.RoomStatus.live;
28
+ this.status = enums_1.RoomStatus.live;
29
29
  this.timestamp = msg.timestamp;
30
- this.emit("status", enum_1.RoomStatus.live, {
30
+ this.emit("status", enums_1.RoomStatus.live, {
31
31
  timestamp: msg.timestamp,
32
32
  id: msg.info.id,
33
33
  });
@@ -43,9 +43,9 @@ class LiveRoom extends events_1.EventEmitter {
43
43
  case "live_end":
44
44
  case "live_cut":
45
45
  this.emit("msg", msg);
46
- this.status = msg.status || enum_1.RoomStatus.off;
46
+ this.status = msg.status || enums_1.RoomStatus.off;
47
47
  this.timestamp = msg.timestamp;
48
- this.emit("status", msg.status || enum_1.RoomStatus.off, {
48
+ this.emit("status", msg.status || enums_1.RoomStatus.off, {
49
49
  timestamp: msg.timestamp,
50
50
  });
51
51
  return;
@@ -1,4 +1,4 @@
1
- import { FloatingLive } from "..";
1
+ import { FloatingLive } from "../live";
2
2
  /** 插件可注册对象模块 */
3
3
  export declare class Reglist<T> {
4
4
  /** 功能列表 */
@@ -0,0 +1,2 @@
1
+ export * from "./LiveRoom";
2
+ export * from "./Reglist";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./LiveRoom"), exports);
18
+ __exportStar(require("./Reglist"), exports);
@@ -0,0 +1,6 @@
1
+ export { FloatingLive } from "./live";
2
+ export * from "./types";
3
+ export * from "./enums";
4
+ export * from "./core/LiveRoom";
5
+ export * from "./core/Reglist";
6
+ export * from "./utils";
@@ -15,10 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.FloatingLive = void 0;
18
- var src_1 = require("./src");
19
- Object.defineProperty(exports, "FloatingLive", { enumerable: true, get: function () { return src_1.FloatingLive; } });
20
- __exportStar(require("./src/types"), exports);
21
- __exportStar(require("./src/enum"), exports);
22
- __exportStar(require("./src/abstract/LiveRoom"), exports);
23
- __exportStar(require("./src/abstract/Reglist"), exports);
24
- __exportStar(require("./src/utils"), exports);
18
+ var live_1 = require("./live");
19
+ Object.defineProperty(exports, "FloatingLive", { enumerable: true, get: function () { return live_1.FloatingLive; } });
20
+ __exportStar(require("./types"), exports);
21
+ __exportStar(require("./enums"), exports);
22
+ __exportStar(require("./core/LiveRoom"), exports);
23
+ __exportStar(require("./core/Reglist"), exports);
24
+ __exportStar(require("./utils"), exports);
@@ -2,7 +2,6 @@
2
2
  import { EventEmitter } from "events";
3
3
  import { ModPlugin } from "./module/ModPlugin";
4
4
  import { ModRoom } from "./module/ModRoom";
5
- import { ModAuth } from "./module/ModAuth";
6
5
  import { ModMessage } from "./module/ModMessage";
7
6
  import { ModState } from "./module/ModState";
8
7
  import ModCommand from "./module/ModCommand";
@@ -11,8 +10,6 @@ export declare class FloatingLive extends EventEmitter {
11
10
  room: ModRoom;
12
11
  /** 消息处理模块 */
13
12
  message: ModMessage;
14
- /** 用户登录凭据模块 */
15
- auth: ModAuth;
16
13
  /** 插件处理模块 */
17
14
  plugin: ModPlugin<this>;
18
15
  /** 命令模块 */
@@ -7,7 +7,6 @@ exports.FloatingLive = void 0;
7
7
  const events_1 = require("events");
8
8
  const ModPlugin_1 = require("./module/ModPlugin");
9
9
  const ModRoom_1 = require("./module/ModRoom");
10
- const ModAuth_1 = require("./module/ModAuth");
11
10
  const ModMessage_1 = require("./module/ModMessage");
12
11
  const ModState_1 = require("./module/ModState");
13
12
  const ModCommand_1 = __importDefault(require("./module/ModCommand"));
@@ -21,7 +20,6 @@ class FloatingLive extends events_1.EventEmitter {
21
20
  this.plugin = new ModPlugin_1.ModPlugin(this);
22
21
  this.room = new ModRoom_1.ModRoom(this);
23
22
  this.message = new ModMessage_1.ModMessage(this);
24
- this.auth = new ModAuth_1.ModAuth(this);
25
23
  this.init();
26
24
  }
27
25
  /** 初始化 */
@@ -1,5 +1,5 @@
1
- import { FloatingLive } from "..";
2
- import { Reglist } from "../abstract/Reglist";
1
+ import { FloatingLive } from "../live";
2
+ import { Reglist } from "../core/Reglist";
3
3
  export default class ModCommand extends Reglist<(...args: any[]) => any> {
4
4
  constructor(main: FloatingLive);
5
5
  /** 批量注册命令 */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const Reglist_1 = require("../abstract/Reglist");
3
+ const Reglist_1 = require("../core/Reglist");
4
4
  class ModCommand extends Reglist_1.Reglist {
5
5
  constructor(main) {
6
6
  super(main, "command");
@@ -1,6 +1,6 @@
1
1
  import { Message } from "../types/message";
2
- import { FloatingLive } from "..";
3
- import { Reglist } from "../abstract/Reglist";
2
+ import { FloatingLive } from "../live";
3
+ import { Reglist } from "../core/Reglist";
4
4
  export declare class ModMessage {
5
5
  main: FloatingLive;
6
6
  handler: Reglist<(msg: Message.All) => void>;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ModMessage = void 0;
4
- const Reglist_1 = require("../abstract/Reglist");
4
+ const Reglist_1 = require("../core/Reglist");
5
5
  class ModMessage {
6
6
  constructor(main) {
7
7
  this.main = main;
@@ -1,4 +1,4 @@
1
- import { FloatingLive } from "..";
1
+ import { FloatingLive } from "../live";
2
2
  import { FloatingLivePlugin } from "../types/plugin";
3
3
  export declare class ModPlugin<T extends FloatingLive> {
4
4
  private current;
@@ -1,6 +1,6 @@
1
- import { Reglist } from "../abstract/Reglist";
2
- import { LiveRoom } from "../abstract/LiveRoom";
3
- import { FloatingLive } from "..";
1
+ import { Reglist } from "../core/Reglist";
2
+ import { LiveRoom } from "../core/LiveRoom";
3
+ import { FloatingLive } from "../live";
4
4
  import { RoomInfo } from "../types";
5
5
  /** 直播间监听实例控制器 */
6
6
  export declare class ModRoom {
@@ -10,8 +10,6 @@ export declare class ModRoom {
10
10
  private configs;
11
11
  generator: Reglist<(id: string | number, open?: boolean, config?: object) => LiveRoom>;
12
12
  constructor(main: FloatingLive);
13
- /** 设置登录凭据 */
14
- setAuth(platform: string, auth: string): void;
15
13
  /** 设置房间配置 */
16
14
  setConfig(platform: string, config: any): void;
17
15
  /** 生成房间 */
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ModRoom = void 0;
4
- const Reglist_1 = require("../abstract/Reglist");
4
+ const Reglist_1 = require("../core/Reglist");
5
5
  /** 直播间监听实例控制器 */
6
6
  class ModRoom {
7
7
  constructor(main) {
@@ -35,15 +35,6 @@ class ModRoom {
35
35
  },
36
36
  });
37
37
  }
38
- /** 设置登录凭据 */
39
- setAuth(platform, auth) {
40
- this.auths.set(platform, auth);
41
- this.roomMap.forEach((room) => {
42
- if (room.platform == platform) {
43
- room.setAuth?.(auth);
44
- }
45
- });
46
- }
47
38
  /** 设置房间配置 */
48
39
  setConfig(platform, config) {
49
40
  this.configs.set(platform, config);
@@ -1,5 +1,5 @@
1
- import { FloatingLive } from "..";
2
- import { Reglist } from "../abstract/Reglist";
1
+ import { FloatingLive } from "../live";
2
+ import { Reglist } from "../core/Reglist";
3
3
  export declare class ModState extends Reglist<() => object> {
4
4
  constructor(main: FloatingLive);
5
5
  generate(): Record<string, any>;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ModState = void 0;
4
- const Reglist_1 = require("../abstract/Reglist");
4
+ const Reglist_1 = require("../core/Reglist");
5
5
  class ModState extends Reglist_1.Reglist {
6
6
  constructor(main) {
7
7
  super(main, "state");
@@ -1,4 +1,3 @@
1
1
  export * from "./message";
2
2
  export * from "./plugin";
3
3
  export * from "./room";
4
- export * from "./auth";
@@ -17,4 +17,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./message"), exports);
18
18
  __exportStar(require("./plugin"), exports);
19
19
  __exportStar(require("./room"), exports);
20
- __exportStar(require("./auth"), exports);
@@ -1,5 +1,5 @@
1
- import { ImageSize, UserType } from "../enum";
2
- import { DanmakuMode, RoomStatus } from "../enum";
1
+ import { ImageSize, UserType } from "../enums";
2
+ import { DanmakuMode, RoomStatus } from "../enums";
3
3
  import { RoomDetail, RoomStatsInfo } from "./room";
4
4
  export declare namespace Message {
5
5
  interface Base {
@@ -1,4 +1,4 @@
1
- import { FloatingLive } from "..";
1
+ import { FloatingLive } from "../live";
2
2
  /** 插件模块, 加载时调用 */
3
3
  export declare type FloatingLivePlugin<C extends object = object, E extends object | void = object | void> = () => {
4
4
  /** 插件名称 */
@@ -1,4 +1,4 @@
1
- import { RoomStatus } from "../enum";
1
+ import { RoomStatus } from "../enums";
2
2
  import { UserInfo } from "./message";
3
3
  export interface RoomInfo {
4
4
  /** 平台id */
package/package.json CHANGED
@@ -1,33 +1,47 @@
1
1
  {
2
2
  "name": "floating-live",
3
- "version": "0.14.11",
3
+ "version": "0.15.0-beta.1",
4
4
  "type": "commonjs",
5
- "main": "index.js",
6
- "types": "index.d.ts",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
7
  "author": "Minteea",
8
8
  "license": "GPLv3",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "require": "./dist/index.js"
13
+ },
14
+ "./core": {
15
+ "types": "./dist/core/index.d.ts",
16
+ "require": "./dist/core/index.js"
17
+ },
18
+ "./types": {
19
+ "types": "./dist/types/index.d.ts",
20
+ "require": "./dist/types/index.js"
21
+ },
22
+ "./enums": {
23
+ "types": "./dist/enums.d.ts",
24
+ "require": "./dist/enums.js"
25
+ },
26
+ "./utils": {
27
+ "types": "./dist/utils.d.ts",
28
+ "require": "./dist/utils.js"
29
+ }
30
+ },
9
31
  "scripts": {
10
32
  "tsc": "tsc -b",
11
- "clear": "rimraf index.js index.d.ts src/**/*.js src/**/*.d.ts plugin/**/*.js plugin/**/*.d.ts",
33
+ "clear": "rimraf dist",
12
34
  "test": "npm run clear && ts-node demo/demo.ts",
13
35
  "build-test": "npm run build && node demo/demo.js",
14
36
  "build": "npm run clear && npm run tsc",
15
37
  "prepare": "npm run build"
16
38
  },
17
- "dependencies": {
18
- "@types/qrcode": "^1.5.2",
19
- "acfun-live-danmaku": "^0.6.1",
20
- "axios": "^1.4.0",
21
- "bilibili-live-ws": "^6.3.1",
22
- "fs-extra": "^11.1.0",
23
- "qrcode": "^1.5.3"
24
- },
25
39
  "devDependencies": {
26
- "@types/fs-extra": "^9.0.13",
27
- "@types/websocket": "^1.0.5",
28
- "@types/ws": "^8.5.3",
29
40
  "rimraf": "^3.0.2",
30
41
  "ts-node": "^10.9.1",
31
42
  "typescript": "^4.8.4"
43
+ },
44
+ "peerDependencies": {
45
+ "events": "^3.3.0"
32
46
  }
33
47
  }
package/index.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export { FloatingLive } from "./src";
2
- export * from "./src/types";
3
- export * from "./src/enum";
4
- export * from "./src/abstract/LiveRoom";
5
- export * from "./src/abstract/Reglist";
6
- export * from "./src/utils";
@@ -1,74 +0,0 @@
1
- import { RoomDetail } from "../..";
2
- import { MedalInfo, UserInfo } from "../..";
3
- import AcClient from "acfun-live-danmaku/client";
4
- import { LiveRoom, RoomStatsInfo } from "../..";
5
- declare type ZtLiveUserInfo = {
6
- userIdentity: {
7
- managerType?: number;
8
- };
9
- badge?: string;
10
- nickname: string;
11
- userId: string;
12
- avatar: [
13
- {
14
- url: string;
15
- }
16
- ];
17
- };
18
- declare class acfunLive extends LiveRoom {
19
- /** 平台id */
20
- readonly platform: string;
21
- /** 房间id */
22
- readonly id: number;
23
- /** 直播展示信息 */
24
- detail: RoomDetail;
25
- /** 直播数据信息 */
26
- stats: RoomStatsInfo;
27
- /** 主播信息 */
28
- anchor: UserInfo;
29
- /** 直播间弹幕api模块 */
30
- client: AcClient | null;
31
- /** 是否为打开状态 */
32
- opened: boolean;
33
- /** 是否连接上服务器 */
34
- connected: boolean;
35
- private wsInit;
36
- /** 直播间是否可用 */
37
- get available(): boolean;
38
- constructor(id: number, open?: boolean);
39
- getInfo(): Promise<void>;
40
- /** 开启直播间监听 */
41
- open(): Promise<void>;
42
- /** 初始化直播服务端监听 */
43
- private initWS;
44
- /** 关闭直播间监听 */
45
- close(): void;
46
- destroy(): void;
47
- /** 根据守护徽章字符串获取粉丝牌信息 */
48
- getMedal(badge?: string): MedalInfo | null;
49
- getUser(user: ZtLiveUserInfo): UserInfo;
50
- /** 文本信息(Comment) */
51
- msg_Comment(data: {
52
- sendTimeMs: string;
53
- userInfo: ZtLiveUserInfo;
54
- content: any;
55
- }): void;
56
- /** 礼物信息(Gift) */
57
- msg_Gift(data: {
58
- sendTimeMs: string;
59
- user: ZtLiveUserInfo;
60
- giftName: any;
61
- giftId: string;
62
- count: number;
63
- value: string;
64
- }): void;
65
- /** 互动信息 */
66
- msg_Interact(data: {
67
- sendTimeMs: string;
68
- userInfo: ZtLiveUserInfo;
69
- }, type: "entry" | "like" | "follow" | "share" | "join"): void;
70
- msg_LiveClosed(): void;
71
- msg_LiveBanned(): void;
72
- msg_DisplayInfo(data: any): void;
73
- }
74
- export default acfunLive;