@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.
Files changed (52) hide show
  1. package/README.md +22 -0
  2. package/dist/realsee-live.cjs.development.js +10 -8
  3. package/dist/realsee-live.cjs.development.js.map +1 -1
  4. package/dist/realsee-live.cjs.production.js +1 -1
  5. package/dist/realsee-live.cjs.production.js.map +1 -1
  6. package/dist/realsee-live.esm.js +10 -8
  7. package/dist/realsee-live.esm.js.map +1 -1
  8. package/dist/realsee-live.umd.development.js +10 -8
  9. package/dist/realsee-live.umd.development.js.map +1 -1
  10. package/dist/realsee-live.umd.production.js +1 -1
  11. package/dist/realsee-live.umd.production.js.map +1 -1
  12. package/dist/typings/react/LiveReact.d.ts +2 -0
  13. package/docs/.nojekyll +1 -0
  14. package/docs/assets/custom.css +43 -0
  15. package/docs/assets/highlight.css +120 -0
  16. package/docs/assets/icons.css +1043 -0
  17. package/docs/assets/icons.png +0 -0
  18. package/docs/assets/icons@2x.png +0 -0
  19. package/docs/assets/main.js +52 -0
  20. package/docs/assets/search.js +1 -0
  21. package/docs/assets/style.css +1414 -0
  22. package/docs/assets/widgets.png +0 -0
  23. package/docs/assets/widgets@2x.png +0 -0
  24. package/docs/classes/BrowserRTC.html +68 -0
  25. package/docs/classes/BrowserRTC4Chime.html +76 -0
  26. package/docs/classes/CoreRTC.html +70 -0
  27. package/docs/classes/VRWebViewRTC.html +68 -0
  28. package/docs/enums/BuiltInRTCType.html +1 -0
  29. package/docs/enums/BuiltinActionType.html +15 -0
  30. package/docs/enums/BuiltinEventType.html +7 -0
  31. package/docs/enums/Command.html +7 -0
  32. package/docs/enums/MemUserStatus.html +1 -0
  33. package/docs/enums/MicroStatus.html +3 -0
  34. package/docs/enums/RTCJoinedInfoCodeEnum.html +11 -0
  35. package/docs/enums/RTCType.html +3 -0
  36. package/docs/enums/UserStatus.html +9 -0
  37. package/docs/enums/WebSocketCloseError.html +19 -0
  38. package/docs/enums/WebSocketErrorType.html +1 -0
  39. package/docs/enums/WebSocketState.html +13 -0
  40. package/docs/index.html +386 -0
  41. package/docs/interfaces/AttendeeResponse.html +1 -0
  42. package/docs/interfaces/GetVoiceSignReturnType.html +3 -0
  43. package/docs/interfaces/Live.html +116 -0
  44. package/docs/interfaces/LiveOptions.html +39 -0
  45. package/docs/interfaces/LiveReact.html +52 -0
  46. package/docs/interfaces/MeetingResponse.html +1 -0
  47. package/docs/interfaces/MeetingSessionConfigurationOptions.html +1 -0
  48. package/docs/interfaces/RTCJoinedInfo.html +3 -0
  49. package/docs/interfaces/RTCProtocol.html +70 -0
  50. package/docs/interfaces/VRWebViewRTCOptions.html +1 -0
  51. package/docs/modules.html +133 -0
  52. package/package.json +5 -2
@@ -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 = (_a = options.getVoiceSign) !== null && _a !== void 0 ? _a : unimplementedGetVoiceSign;
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 (!options.jsBridge) {
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: options.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 = (_b = options.getVoiceSign) !== null && _b !== void 0 ? _b : unimplementedGetVoiceSign;
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,