@realsee/live 0.4.0-beta.2 → 0.4.0-beta.5
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/live/controller.d.ts +2 -2
- package/dist/realsee-live.cjs.development.js +14 -7
- package/dist/realsee-live.cjs.development.js.map +1 -1
- package/dist/realsee-live.cjs.production.js +1 -1
- package/dist/realsee-live.cjs.production.js.map +1 -1
- package/dist/realsee-live.esm.js +14 -7
- package/dist/realsee-live.esm.js.map +1 -1
- package/dist/realsee-live.umd.development.js +14 -7
- package/dist/realsee-live.umd.development.js.map +1 -1
- package/dist/realsee-live.umd.production.js +1 -1
- package/dist/realsee-live.umd.production.js.map +1 -1
- package/package.json +1 -1
package/dist/realsee-live.esm.js
CHANGED
|
@@ -1056,6 +1056,7 @@ class LiveController {
|
|
|
1056
1056
|
clearInterval(this.healthCheckId);
|
|
1057
1057
|
this.healthCheckId = undefined;
|
|
1058
1058
|
}
|
|
1059
|
+
return true;
|
|
1059
1060
|
};
|
|
1060
1061
|
/**
|
|
1061
1062
|
* 销毁WebSocket相关依赖。
|
|
@@ -1081,6 +1082,7 @@ class LiveController {
|
|
|
1081
1082
|
}
|
|
1082
1083
|
this.webSocket.close();
|
|
1083
1084
|
this.webSocket = undefined;
|
|
1085
|
+
return true;
|
|
1084
1086
|
};
|
|
1085
1087
|
this.options = Object.assign({ autoConnect: true, healthCheck: 3000 }, options);
|
|
1086
1088
|
}
|
|
@@ -1255,12 +1257,16 @@ function createLive(options) {
|
|
|
1255
1257
|
};
|
|
1256
1258
|
class LiveTpl extends Subscribe {
|
|
1257
1259
|
constructor() {
|
|
1258
|
-
var _a, _b
|
|
1260
|
+
var _a, _b;
|
|
1259
1261
|
super();
|
|
1260
1262
|
this.keyframes = new Subscribe();
|
|
1261
|
-
const jsBridge = ((
|
|
1262
|
-
|
|
1263
|
-
|
|
1263
|
+
const jsBridge = (() => {
|
|
1264
|
+
if (options.jsBridge)
|
|
1265
|
+
return options.jsBridge;
|
|
1266
|
+
if (options.useBuiltInJsBridge)
|
|
1267
|
+
return new JSBridge();
|
|
1268
|
+
return undefined;
|
|
1269
|
+
})();
|
|
1264
1270
|
liveController.options.jsBridge = jsBridge;
|
|
1265
1271
|
// 没有传rtc实例时
|
|
1266
1272
|
if (!options.rtc) {
|
|
@@ -1269,7 +1275,7 @@ function createLive(options) {
|
|
|
1269
1275
|
if (!options.getVoiceSign) {
|
|
1270
1276
|
throw new Error('GetVoiceSign method must be passed when using built-in RTC instances');
|
|
1271
1277
|
}
|
|
1272
|
-
const getVoiceSign = (
|
|
1278
|
+
const getVoiceSign = (_a = options.getVoiceSign) !== null && _a !== void 0 ? _a : unimplementedGetVoiceSign;
|
|
1273
1279
|
switch (options.rtcType) {
|
|
1274
1280
|
case RTCType.RealseeVRWebViewRTC: {
|
|
1275
1281
|
// 内置的 VRWebViewRTC
|
|
@@ -1307,7 +1313,7 @@ function createLive(options) {
|
|
|
1307
1313
|
if (!options.getVoiceSign) {
|
|
1308
1314
|
throw new Error('GetVoiceSign method must be passed when using built-in RTC instances');
|
|
1309
1315
|
}
|
|
1310
|
-
const getVoiceSign = (
|
|
1316
|
+
const getVoiceSign = (_b = options.getVoiceSign) !== null && _b !== void 0 ? _b : unimplementedGetVoiceSign;
|
|
1311
1317
|
if (!jsBridge) {
|
|
1312
1318
|
throw new Error('jsBridge instance must be passed when using built-in RTC instances');
|
|
1313
1319
|
}
|
|
@@ -1487,7 +1493,8 @@ function createLive(options) {
|
|
|
1487
1493
|
async exit() {
|
|
1488
1494
|
/** 退出强制关闭语音(?) */
|
|
1489
1495
|
await this.$RTC.quit();
|
|
1490
|
-
|
|
1496
|
+
await this.updateStatus(BuiltinEventType.RoomChange, BuiltinActionType.RoomClose, {});
|
|
1497
|
+
return liveController.dispose();
|
|
1491
1498
|
}
|
|
1492
1499
|
async connect(options = {}) {
|
|
1493
1500
|
// 连接 WebSocket 前验证麦克风权限
|