floating-live 0.16.0-alpha.12 → 0.16.0-alpha.13

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.
@@ -26,15 +26,17 @@ export declare abstract class LiveRoom extends CustomEventEmitter implements Liv
26
26
  /** 房间连接状态 */
27
27
  connection: LiveConnectionStatus;
28
28
  /** 房间是否可用 */
29
- abstract available: boolean;
29
+ available: boolean;
30
30
  /** 打开连接 */
31
31
  abstract open(): void;
32
32
  /** 关闭连接 */
33
33
  abstract close(): void;
34
34
  /** 更新房间数据 */
35
- abstract update(): Promise<void>;
35
+ abstract update(): Promise<LiveRoomData>;
36
36
  /** 从服务器获取房间数据 */
37
- abstract fetchData?(): Promise<void>;
37
+ abstract fetchData?(): Promise<LiveRoomData>;
38
+ /** 设置房间数据 */
39
+ abstract setData?(data: LiveRoomData): LiveRoomData;
38
40
  /** 销毁 */
39
41
  destroy(): void;
40
42
  /** 销毁事件 */
package/dist/live/room.js CHANGED
@@ -11,6 +11,8 @@ export class LiveRoom extends CustomEventEmitter {
11
11
  this.opened = false;
12
12
  /** 房间连接状态 */
13
13
  this.connection = LiveConnectionStatus.off;
14
+ /** 房间是否可用 */
15
+ this.available = false;
14
16
  }
15
17
  /** 销毁 */
16
18
  destroy() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "floating-live",
3
- "version": "0.16.0-alpha.12",
3
+ "version": "0.16.0-alpha.13",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",