@realsee/live 0.6.11-dev.1 → 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 +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +18 -8
- package/dist/index.es.js.map +1 -1
- package/dist/live/controller.d.ts +1 -0
- package/dist/live/live.d.ts +12 -0
- 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/types/EventType.html +1 -1
- package/docs/types/KeyframeTypes.html +1 -1
- package/docs/types/LiveEventType.html +43 -13
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -857,9 +857,7 @@ class vr extends ue {
|
|
|
857
857
|
* @param event
|
|
858
858
|
*/
|
|
859
859
|
s(this, "_handleCloseEvent", (e) => {
|
|
860
|
-
O.info(
|
|
861
|
-
`live room closed bacause of ${e.code}-${e.reason || nr(e.code)}`
|
|
862
|
-
), this.state = x.CLOSED;
|
|
860
|
+
O.info(`live room closed bacause of ${e.code}-${e.reason || nr(e.code)}`), this.state = x.CLOSED;
|
|
863
861
|
});
|
|
864
862
|
/**
|
|
865
863
|
* 处理房间正在关闭事件(这个时候可能是断网了)
|
|
@@ -872,8 +870,8 @@ class vr extends ue {
|
|
|
872
870
|
* 连接中
|
|
873
871
|
* @param event
|
|
874
872
|
*/
|
|
875
|
-
s(this, "_handleConnectingEvent", () => {
|
|
876
|
-
O.info("live room is connecting"), this.state = x.CONNECTING;
|
|
873
|
+
s(this, "_handleConnectingEvent", (e) => {
|
|
874
|
+
O.info("live room is connecting"), this.state = x.CONNECTING, e.detail.reconnects > 0 && this.emit("reconnecting", e.detail);
|
|
877
875
|
});
|
|
878
876
|
/**
|
|
879
877
|
* 连接发送异常
|
|
@@ -1019,14 +1017,26 @@ class yr extends ue {
|
|
|
1019
1017
|
* 添加带看控制的事件监听
|
|
1020
1018
|
*/
|
|
1021
1019
|
s(this, "_addLiveControllerEventListeners", () => {
|
|
1022
|
-
this._controller.on("stateChange", this._handleStateChange), this._controller.on("message", this._handleMessage);
|
|
1020
|
+
this._controller.on("stateChange", this._handleStateChange), this._controller.on("message", this._handleMessage), this._controller.on("reconnecting", this._handleReconnecting), this._controller.on("reconnected", this._handleReconnected);
|
|
1023
1021
|
});
|
|
1024
1022
|
/**
|
|
1025
1023
|
* 移除带看控制的事件监听
|
|
1026
1024
|
*/
|
|
1027
1025
|
s(this, "_removeLiveControllerEventListeners", () => {
|
|
1028
|
-
this._controller.off("stateChange", this._handleStateChange), this._controller.off("message", this._handleMessage);
|
|
1026
|
+
this._controller.off("stateChange", this._handleStateChange), this._controller.off("message", this._handleMessage), this._controller.off("reconnecting", this._handleReconnecting), this._controller.off("reconnected", this._handleReconnected);
|
|
1029
1027
|
});
|
|
1028
|
+
/**
|
|
1029
|
+
* 重连中事件
|
|
1030
|
+
* @param detail
|
|
1031
|
+
* @returns
|
|
1032
|
+
*/
|
|
1033
|
+
s(this, "_handleReconnecting", (e) => this.emit("reconnecting", e));
|
|
1034
|
+
/**
|
|
1035
|
+
* 重连成功事件
|
|
1036
|
+
* @param detail
|
|
1037
|
+
* @returns
|
|
1038
|
+
*/
|
|
1039
|
+
s(this, "_handleReconnected", (e) => this.emit("reconnected", e));
|
|
1030
1040
|
/**
|
|
1031
1041
|
* 带看状态变化
|
|
1032
1042
|
* @param state
|
|
@@ -1164,7 +1174,7 @@ class yr extends ue {
|
|
|
1164
1174
|
});
|
|
1165
1175
|
/**
|
|
1166
1176
|
* 退出带看
|
|
1167
|
-
* @returns
|
|
1177
|
+
* @returns
|
|
1168
1178
|
*/
|
|
1169
1179
|
s(this, "exit", async () => this.close());
|
|
1170
1180
|
/**
|