@realsee/live 0.4.0-alpha.4 → 0.4.0-beta.2
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/README.md +22 -0
- package/dist/realsee-live.cjs.development.js +10 -8
- 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 +10 -8
- package/dist/realsee-live.esm.js.map +1 -1
- package/dist/realsee-live.umd.development.js +10 -8
- 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/dist/typings/react/LiveReact.d.ts +2 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/custom.css +43 -0
- package/docs/assets/highlight.css +120 -0
- package/docs/assets/icons.css +1043 -0
- package/docs/assets/icons.png +0 -0
- package/docs/assets/icons@2x.png +0 -0
- package/docs/assets/main.js +52 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1414 -0
- package/docs/assets/widgets.png +0 -0
- package/docs/assets/widgets@2x.png +0 -0
- package/docs/classes/BrowserRTC.html +68 -0
- package/docs/classes/BrowserRTC4Chime.html +76 -0
- package/docs/classes/CoreRTC.html +70 -0
- package/docs/classes/VRWebViewRTC.html +68 -0
- package/docs/enums/BuiltInRTCType.html +1 -0
- package/docs/enums/BuiltinActionType.html +15 -0
- package/docs/enums/BuiltinEventType.html +7 -0
- package/docs/enums/Command.html +7 -0
- package/docs/enums/MemUserStatus.html +1 -0
- package/docs/enums/MicroStatus.html +3 -0
- package/docs/enums/RTCJoinedInfoCodeEnum.html +11 -0
- package/docs/enums/RTCType.html +3 -0
- package/docs/enums/UserStatus.html +9 -0
- package/docs/enums/WebSocketCloseError.html +19 -0
- package/docs/enums/WebSocketErrorType.html +1 -0
- package/docs/enums/WebSocketState.html +13 -0
- package/docs/index.html +386 -0
- package/docs/interfaces/AttendeeResponse.html +1 -0
- package/docs/interfaces/GetVoiceSignReturnType.html +3 -0
- package/docs/interfaces/Live.html +116 -0
- package/docs/interfaces/LiveOptions.html +39 -0
- package/docs/interfaces/LiveReact.html +52 -0
- package/docs/interfaces/MeetingResponse.html +1 -0
- package/docs/interfaces/MeetingSessionConfigurationOptions.html +1 -0
- package/docs/interfaces/RTCJoinedInfo.html +3 -0
- package/docs/interfaces/RTCProtocol.html +70 -0
- package/docs/interfaces/VRWebViewRTCOptions.html +1 -0
- package/docs/modules.html +133 -0
- package/package.json +5 -2
package/dist/realsee-live.esm.js
CHANGED
|
@@ -1258,6 +1258,10 @@ function createLive(options) {
|
|
|
1258
1258
|
var _a, _b, _c;
|
|
1259
1259
|
super();
|
|
1260
1260
|
this.keyframes = new Subscribe();
|
|
1261
|
+
const jsBridge = ((_a = options.jsBridge) !== null && _a !== void 0 ? _a : options.useBuiltInJsBridge)
|
|
1262
|
+
? new JSBridge()
|
|
1263
|
+
: undefined;
|
|
1264
|
+
liveController.options.jsBridge = jsBridge;
|
|
1261
1265
|
// 没有传rtc实例时
|
|
1262
1266
|
if (!options.rtc) {
|
|
1263
1267
|
// 取指定的内部rtc类型
|
|
@@ -1265,15 +1269,15 @@ function createLive(options) {
|
|
|
1265
1269
|
if (!options.getVoiceSign) {
|
|
1266
1270
|
throw new Error('GetVoiceSign method must be passed when using built-in RTC instances');
|
|
1267
1271
|
}
|
|
1268
|
-
const getVoiceSign = (
|
|
1272
|
+
const getVoiceSign = (_b = options.getVoiceSign) !== null && _b !== void 0 ? _b : unimplementedGetVoiceSign;
|
|
1269
1273
|
switch (options.rtcType) {
|
|
1270
1274
|
case RTCType.RealseeVRWebViewRTC: {
|
|
1271
1275
|
// 内置的 VRWebViewRTC
|
|
1272
|
-
if (!
|
|
1276
|
+
if (!jsBridge) {
|
|
1273
1277
|
throw new Error('JsBridge instance must be passed when using built-in VRWebViewRTC instances');
|
|
1274
1278
|
}
|
|
1275
1279
|
liveController.options.rtc = new VRWebViewRTC({
|
|
1276
|
-
jsBridge
|
|
1280
|
+
jsBridge,
|
|
1277
1281
|
getVoiceSign,
|
|
1278
1282
|
});
|
|
1279
1283
|
break;
|
|
@@ -1303,14 +1307,10 @@ function createLive(options) {
|
|
|
1303
1307
|
if (!options.getVoiceSign) {
|
|
1304
1308
|
throw new Error('GetVoiceSign method must be passed when using built-in RTC instances');
|
|
1305
1309
|
}
|
|
1306
|
-
const getVoiceSign = (
|
|
1307
|
-
const jsBridge = ((_c = options.jsBridge) !== null && _c !== void 0 ? _c : options.useBuiltInJsBridge)
|
|
1308
|
-
? new JSBridge()
|
|
1309
|
-
: null;
|
|
1310
|
+
const getVoiceSign = (_c = options.getVoiceSign) !== null && _c !== void 0 ? _c : unimplementedGetVoiceSign;
|
|
1310
1311
|
if (!jsBridge) {
|
|
1311
1312
|
throw new Error('jsBridge instance must be passed when using built-in RTC instances');
|
|
1312
1313
|
}
|
|
1313
|
-
options.jsBridge = jsBridge;
|
|
1314
1314
|
// vrwebview 默认
|
|
1315
1315
|
if ((isRealseeVRWebview && (isAndroid || isIOS)) || isWxMiniProgram) {
|
|
1316
1316
|
liveController.options.rtc = new VRWebViewRTC({
|
|
@@ -1622,6 +1622,7 @@ function createLive(options) {
|
|
|
1622
1622
|
function createLiveReact(options) {
|
|
1623
1623
|
const LiveContext = React.createContext(null);
|
|
1624
1624
|
const live = createLive(options);
|
|
1625
|
+
const jsBridge = live.jsBridge;
|
|
1625
1626
|
function LiveProvider(props) {
|
|
1626
1627
|
return (React.createElement(LiveContext.Provider, { value: props.live || live }, props.children));
|
|
1627
1628
|
}
|
|
@@ -1817,6 +1818,7 @@ function createLiveReact(options) {
|
|
|
1817
1818
|
}
|
|
1818
1819
|
return {
|
|
1819
1820
|
live,
|
|
1821
|
+
jsBridge,
|
|
1820
1822
|
LiveProvider,
|
|
1821
1823
|
unsafe__useLiveInstance,
|
|
1822
1824
|
unsafe__useRTCInstance,
|