@realsee/live 0.6.11 → 0.6.12-alpha.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.
- package/dist/index.cjs.js +5 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +210 -189
- package/dist/index.es.js.map +1 -1
- package/dist/live/controller.d.ts +1 -0
- package/dist/live/createLiveReact.d.ts +1 -1
- package/dist/live/live.d.ts +18 -1
- package/dist/typings/live/EventType.d.ts +11 -0
- package/dist/utils/RobustWebSocket.d.ts +3 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/VRWebViewRTC.html +13 -13
- package/docs/functions/createLiveReact.html +8 -8
- package/docs/types/EventType.html +1 -1
- package/docs/types/KeyframeTypes.html +1 -1
- package/docs/types/LiveEventType.html +43 -13
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ import { Subscribe } from '../utils/subscribe';
|
|
|
5
5
|
export type LiveControllerEventMap = {
|
|
6
6
|
stateChange: (state: LiveState, prevState: LiveState) => void;
|
|
7
7
|
message: (message: LiveMsg) => void;
|
|
8
|
+
reconnecting: (detail: RobustWebSocketEventDetail) => void;
|
|
8
9
|
reconnected: (detail: RobustWebSocketEventDetail) => void;
|
|
9
10
|
};
|
|
10
11
|
export declare class LiveController extends Subscribe<LiveControllerEventMap> {
|
|
@@ -21,7 +21,7 @@ export declare function createLiveReact<KeyframesSnapshot extends Record<string,
|
|
|
21
21
|
useLiveAction: () => {
|
|
22
22
|
connect: (options: LiveConnectOptions) => Promise<boolean | Error>;
|
|
23
23
|
broadcast: (data: Record<string, any>, toUserIds: string | string[], timeout?: number) => Promise<unknown>;
|
|
24
|
-
exit: () => Promise<
|
|
24
|
+
exit: () => Promise<void>;
|
|
25
25
|
kick: (toUserIds: string | string[]) => Promise<boolean>;
|
|
26
26
|
toggleMicro: (microStatus: boolean) => Promise<boolean>;
|
|
27
27
|
forbidMicro: (micro: MicroStatus, toUserIds?: string | string[]) => Promise<boolean>;
|
package/dist/live/live.d.ts
CHANGED
|
@@ -92,6 +92,18 @@ export declare class Live<KeyframesSnapshot extends Record<string, any>> extends
|
|
|
92
92
|
* 移除带看控制的事件监听
|
|
93
93
|
*/
|
|
94
94
|
private _removeLiveControllerEventListeners;
|
|
95
|
+
/**
|
|
96
|
+
* 重连中事件
|
|
97
|
+
* @param detail
|
|
98
|
+
* @returns
|
|
99
|
+
*/
|
|
100
|
+
private _handleReconnecting;
|
|
101
|
+
/**
|
|
102
|
+
* 重连成功事件
|
|
103
|
+
* @param detail
|
|
104
|
+
* @returns
|
|
105
|
+
*/
|
|
106
|
+
private _handleReconnected;
|
|
95
107
|
/**
|
|
96
108
|
* 带看状态变化
|
|
97
109
|
* @param state
|
|
@@ -117,7 +129,12 @@ export declare class Live<KeyframesSnapshot extends Record<string, any>> extends
|
|
|
117
129
|
* 退出带看
|
|
118
130
|
* @returns
|
|
119
131
|
*/
|
|
120
|
-
|
|
132
|
+
_exit: () => Promise<boolean>;
|
|
133
|
+
/**
|
|
134
|
+
* 退出带看
|
|
135
|
+
* @returns
|
|
136
|
+
*/
|
|
137
|
+
exit: () => Promise<void>;
|
|
121
138
|
/**
|
|
122
139
|
* 关闭带看房间
|
|
123
140
|
* @param code
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RobustWebSocketEventDetail } from '../../utils/RobustWebSocket';
|
|
1
2
|
import { BuiltinMsg, LiveMsg } from './LiveMsg';
|
|
2
3
|
import { LiveState } from './LiveState';
|
|
3
4
|
import { UserInfo } from './UserInfo';
|
|
@@ -61,6 +62,16 @@ export type LiveEventType<KeyframesSnapshot> = {
|
|
|
61
62
|
* @param liveMsg
|
|
62
63
|
*/
|
|
63
64
|
'error'(liveMsg: LiveMsg): void;
|
|
65
|
+
/**
|
|
66
|
+
* 重新连接成功
|
|
67
|
+
* @param detail
|
|
68
|
+
*/
|
|
69
|
+
'reconnected'(detail: RobustWebSocketEventDetail): void;
|
|
70
|
+
/**
|
|
71
|
+
* 重新连接中
|
|
72
|
+
* @param detail
|
|
73
|
+
*/
|
|
74
|
+
'reconnecting'(detail: RobustWebSocketEventDetail): void;
|
|
64
75
|
};
|
|
65
76
|
/**
|
|
66
77
|
* 帧数据类型
|