@realsee/live 0.5.0-alpha.11 → 0.5.0-alpha.14

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
  /**
@@ -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
@@ -54430,17 +54430,17 @@
54430
54430
  */
54431
54431
  function useLiveAction() {
54432
54432
  const live = useLiveInstance();
54433
- const connect = React.useCallback((options) => __awaiter$$(this, void 0, void 0, function* () { return yield live.connect(options); }), [live]);
54434
- const toggleMicro = React.useCallback((microStatus) => live.toggleMicro(microStatus), [live]);
54435
- const broadcast = React.useCallback((data, toUserIds, timeout = 0) => __awaiter$$(this, void 0, void 0, function* () { return yield live.broadcast(data, toUserIds, timeout); }), [live]);
54436
- const exit = React.useCallback(() => __awaiter$$(this, void 0, void 0, function* () { return yield live.exit(); }), [live]);
54437
- const kick = React.useCallback((toUserIds) => __awaiter$$(this, void 0, void 0, function* () { return yield live.kick(toUserIds); }), [live]);
54438
- const forbidMicro = React.useCallback((micro, toUserIds = []) => __awaiter$$(this, void 0, void 0, function* () { return yield live.forbidMicro(micro, toUserIds); }), [live]);
54439
- const forbidSync = React.useCallback((sync, toUserIds = []) => live.forbidSync(sync, toUserIds), [live]);
54440
- const getFramesByKey = React.useCallback((key) => live.getFramesByKey(key), [live]);
54441
- const sendKeyframe = React.useCallback((key, frame) => live.sendKeyframe(key, frame), [live]);
54442
- const setSelfInfo = React.useCallback((userInfo) => live.setSelfInfo(userInfo), [live]);
54443
- const updateStatus = React.useCallback((evtType, atnType, status, toUserIds) => live.updateStatus(evtType, atnType, status, toUserIds), [live]);
54433
+ const connect = (options) => __awaiter$$(this, void 0, void 0, function* () { return yield live.connect(options); });
54434
+ const toggleMicro = (microStatus) => live.toggleMicro(microStatus);
54435
+ const broadcast = (data, toUserIds, timeout = 0) => __awaiter$$(this, void 0, void 0, function* () { return yield live.broadcast(data, toUserIds, timeout); });
54436
+ const exit = () => __awaiter$$(this, void 0, void 0, function* () { return yield live.exit(); });
54437
+ const kick = (toUserIds) => __awaiter$$(this, void 0, void 0, function* () { return yield live.kick(toUserIds); });
54438
+ const forbidMicro = (micro, toUserIds = []) => __awaiter$$(this, void 0, void 0, function* () { return yield live.forbidMicro(micro, toUserIds); });
54439
+ const forbidSync = (sync, toUserIds = []) => live.forbidSync(sync, toUserIds);
54440
+ const getFramesByKey = (key) => live.getFramesByKey(key);
54441
+ const sendKeyframe = (key, frame) => live.sendKeyframe(key, frame);
54442
+ const setSelfInfo = (userInfo) => live.setSelfInfo(userInfo);
54443
+ const updateStatus = (evtType, atnType, status, toUserIds) => live.updateStatus(evtType, atnType, status, toUserIds);
54444
54444
  return {
54445
54445
  connect,
54446
54446
  broadcast,
@@ -54494,11 +54494,11 @@
54494
54494
  }
54495
54495
  function useRTCAction() {
54496
54496
  const live = useLiveInstance();
54497
- const join = React.useCallback((options) => live.$RTC.join(options), [live]);
54498
- const quit = React.useCallback(() => live.$RTC.quit(), [live]);
54499
- const shock = React.useCallback(() => { var _a, _b; return (_b = (_a = live.$RTC).shock) === null || _b === void 0 ? void 0 : _b.call(_a); }, [live]);
54500
- const toggleMicro = React.useCallback((flag) => live.$RTC.toggleMicro(flag), [live]);
54501
- const detectMicro = React.useCallback(() => live.$RTC.detectMicro(), [live]);
54497
+ const join = (options) => live.$RTC.join(options);
54498
+ const quit = () => live.$RTC.quit();
54499
+ const shock = () => { var _a, _b; return (_b = (_a = live.$RTC).shock) === null || _b === void 0 ? void 0 : _b.call(_a); };
54500
+ const toggleMicro = (flag) => live.$RTC.toggleMicro(flag);
54501
+ const detectMicro = () => live.$RTC.detectMicro();
54502
54502
  return {
54503
54503
  join,
54504
54504
  quit,