@realsee/live 0.5.0-alpha.12 → 0.5.0-alpha.15

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.
@@ -51415,7 +51415,7 @@
51415
51415
  this._handleMessage = (liveMsg) => __awaiter$$(this, void 0, void 0, function* () {
51416
51416
  var _b, _c, _d, _e, _f, _g;
51417
51417
  if (typeof liveMsg === 'object') {
51418
- const { command, data, frontRequestId, code, message } = liveMsg;
51418
+ const { command, data = {}, frontRequestId, code, message } = liveMsg;
51419
51419
  if (code === 'SUCCESS') {
51420
51420
  switch (command) {
51421
51421
  /**
@@ -51585,8 +51585,8 @@
51585
51585
  }
51586
51586
  const { force = false } = options;
51587
51587
  // 检测一下麦克风权限,hack
51588
- if (this._options.rtc && this._options.jsBridge) {
51589
- const res = yield this._options.jsBridge.detectMicro();
51588
+ if (this._options.rtc) {
51589
+ const res = yield this._options.rtc.detectMicro();
51590
51590
  if (!res) {
51591
51591
  return new Error('Failed to obtain microphone authorization');
51592
51592
  }
@@ -54392,11 +54392,11 @@
54392
54392
  * @deprecated
54393
54393
  * @returns
54394
54394
  */
54395
- const unsafe__useLiveInstance = () => useLiveInstance();
54395
+ const unsafe__useLiveInstance = () => live;
54396
54396
  /**
54397
54397
  * 使用rtc实例
54398
54398
  */
54399
- const useRTCInstance = () => useLiveInstance().$RTC;
54399
+ const useRTCInstance = () => live.$RTC;
54400
54400
  /**
54401
54401
  * 不建议这样使用
54402
54402
  * @deprecated
@@ -54406,7 +54406,7 @@
54406
54406
  /**
54407
54407
  * 带看连接操作
54408
54408
  */
54409
- const useConnect = () => (options) => __awaiter$$(this, void 0, void 0, function* () { return yield useLiveInstance().connect(options); });
54409
+ const useConnect = () => (options) => __awaiter$$(this, void 0, void 0, function* () { return yield live.connect(options); });
54410
54410
  /**
54411
54411
  *
54412
54412
  * @param name