fcr-core 3.10.5 → 3.10.6

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 (127) hide show
  1. package/lib/engine/index.js +108 -102
  2. package/lib/imports.js +0 -1
  3. package/lib/index.d.ts +1 -1
  4. package/lib/media-control/desktop.js +13 -22
  5. package/lib/media-control/mobile.js +13 -22
  6. package/lib/monitor-control/index.js +7 -17
  7. package/lib/peer-session/index.js +121 -120
  8. package/lib/plugins/chat/chatroom.js +96 -119
  9. package/lib/plugins/chat/connector.js +48 -69
  10. package/lib/remote-control/index.js +216 -194
  11. package/lib/room-control/ability-control/index.js +10 -20
  12. package/lib/room-control/application-control/index.js +75 -82
  13. package/lib/room-control/group-control/index.js +30 -31
  14. package/lib/room-control/helpers/board-init-info-helper.js +10 -16
  15. package/lib/room-control/helpers/validation-helper.js +1 -1
  16. package/lib/room-control/index.js +51 -70
  17. package/lib/room-control/infinity-room-control/index.js +19 -27
  18. package/lib/room-control/interpreter-control/index.js +65 -77
  19. package/lib/room-control/interpreter-control/room.js +4 -6
  20. package/lib/room-control/join-before-host-waitingroom-control/index.js +4 -6
  21. package/lib/room-control/mainroom-control/index.js +25 -37
  22. package/lib/room-control/privilege-control/helper.js +13 -28
  23. package/lib/room-control/privilege-control/index.js +28 -36
  24. package/lib/room-control/room-connector-control/index.js +47 -52
  25. package/lib/room-control/room-control-factory.js +12 -10
  26. package/lib/room-control/room-session/index.js +74 -77
  27. package/lib/room-control/shared-cache.js +56 -63
  28. package/lib/room-control/sharing-control/index.js +57 -65
  29. package/lib/room-control/stream-control/index.js +238 -203
  30. package/lib/room-control/stream-control/type.d.ts +11 -1
  31. package/lib/room-control/stt-control/de-compress-gzip.js +0 -10
  32. package/lib/room-control/stt-control/index.js +86 -93
  33. package/lib/room-control/user-control/index.js +155 -162
  34. package/lib/room-control/waitingroom-control/index.js +9 -18
  35. package/lib/room-control/whiteboard-control/utils.js +2 -4
  36. package/lib/room-control/whiteboard-control-v1/board-subwindow.js +1 -2
  37. package/lib/room-control/whiteboard-control-v1/board-window.js +103 -120
  38. package/lib/room-control/whiteboard-control-v1/factory.js +4 -7
  39. package/lib/room-control/whiteboard-control-v1/index.js +67 -80
  40. package/lib/room-control/whiteboard-control-v1/mount-manager.js +2 -4
  41. package/lib/room-control/whiteboard-control-v1/utils.js +14 -17
  42. package/lib/room-control/whiteboard-control-v2/annotation-control/control.js +10 -14
  43. package/lib/room-control/whiteboard-control-v2/annotation-control/factory.js +8 -17
  44. package/lib/room-control/whiteboard-control-v2/base/index.js +53 -61
  45. package/lib/room-control/whiteboard-control-v2/base/main-window.js +30 -39
  46. package/lib/room-control/whiteboard-control-v2/utils.js +10 -10
  47. package/lib/room-control/whiteboard-control-v2/whiteboard-control/control.js +33 -45
  48. package/lib/room-control/whiteboard-control-v2/whiteboard-control/factory.js +11 -27
  49. package/lib/room-control/widget-control/index.js +33 -43
  50. package/lib/room-router/index.js +58 -66
  51. package/lib/service/api.js +548 -446
  52. package/lib/struct.js +2 -5
  53. package/lib/type.d.ts +1 -1
  54. package/lib/utilities/abortable-retry.js +0 -3
  55. package/lib/utilities/collection.js +11 -15
  56. package/lib/utilities/error-helpers.js +27 -34
  57. package/lib/utilities/error.js +3 -4
  58. package/lib/utilities/join-helper.js +31 -37
  59. package/lib/utilities/logger.js +5 -8
  60. package/lib/utilities/parameters.js +10 -21
  61. package/lib/utilities/retry-helpers.js +0 -1
  62. package/lib/utilities/stream.js +11 -16
  63. package/lib/utilities/user.js +3 -4
  64. package/lib/utilities/validate-params.js +1 -1
  65. package/lib/utilities/video-encoder-config.js +5 -10
  66. package/lib-es/engine/index.js +108 -102
  67. package/lib-es/media-control/desktop.js +13 -22
  68. package/lib-es/media-control/mobile.js +13 -22
  69. package/lib-es/monitor-control/index.js +7 -16
  70. package/lib-es/peer-session/index.js +121 -120
  71. package/lib-es/plugins/chat/chatroom.js +95 -118
  72. package/lib-es/plugins/chat/connector.js +47 -67
  73. package/lib-es/remote-control/index.js +216 -194
  74. package/lib-es/room-control/ability-control/index.js +10 -19
  75. package/lib-es/room-control/application-control/index.js +75 -81
  76. package/lib-es/room-control/group-control/index.js +30 -31
  77. package/lib-es/room-control/helpers/board-init-info-helper.js +10 -15
  78. package/lib-es/room-control/helpers/validation-helper.js +1 -1
  79. package/lib-es/room-control/index.js +51 -69
  80. package/lib-es/room-control/infinity-room-control/index.js +19 -26
  81. package/lib-es/room-control/interpreter-control/index.js +65 -77
  82. package/lib-es/room-control/interpreter-control/room.js +4 -5
  83. package/lib-es/room-control/join-before-host-waitingroom-control/index.js +4 -5
  84. package/lib-es/room-control/mainroom-control/index.js +25 -37
  85. package/lib-es/room-control/privilege-control/helper.js +13 -27
  86. package/lib-es/room-control/privilege-control/index.js +28 -36
  87. package/lib-es/room-control/room-connector-control/index.js +47 -52
  88. package/lib-es/room-control/room-control-factory.js +12 -10
  89. package/lib-es/room-control/room-session/index.js +74 -77
  90. package/lib-es/room-control/shared-cache.js +56 -62
  91. package/lib-es/room-control/sharing-control/index.js +57 -64
  92. package/lib-es/room-control/stream-control/index.js +240 -205
  93. package/lib-es/room-control/stt-control/de-compress-gzip.js +0 -10
  94. package/lib-es/room-control/stt-control/index.js +86 -93
  95. package/lib-es/room-control/user-control/index.js +155 -162
  96. package/lib-es/room-control/waitingroom-control/index.js +9 -18
  97. package/lib-es/room-control/whiteboard-control/utils.js +2 -4
  98. package/lib-es/room-control/whiteboard-control-v1/board-subwindow.js +1 -2
  99. package/lib-es/room-control/whiteboard-control-v1/board-window.js +103 -120
  100. package/lib-es/room-control/whiteboard-control-v1/factory.js +4 -6
  101. package/lib-es/room-control/whiteboard-control-v1/index.js +67 -80
  102. package/lib-es/room-control/whiteboard-control-v1/mount-manager.js +2 -3
  103. package/lib-es/room-control/whiteboard-control-v1/utils.js +14 -17
  104. package/lib-es/room-control/whiteboard-control-v2/annotation-control/control.js +10 -13
  105. package/lib-es/room-control/whiteboard-control-v2/annotation-control/factory.js +8 -16
  106. package/lib-es/room-control/whiteboard-control-v2/base/index.js +53 -60
  107. package/lib-es/room-control/whiteboard-control-v2/base/main-window.js +30 -39
  108. package/lib-es/room-control/whiteboard-control-v2/utils.js +10 -10
  109. package/lib-es/room-control/whiteboard-control-v2/whiteboard-control/control.js +33 -45
  110. package/lib-es/room-control/whiteboard-control-v2/whiteboard-control/factory.js +11 -26
  111. package/lib-es/room-control/widget-control/index.js +33 -42
  112. package/lib-es/room-router/index.js +58 -66
  113. package/lib-es/service/api.js +548 -445
  114. package/lib-es/struct.js +2 -4
  115. package/lib-es/utilities/abortable-retry.js +0 -3
  116. package/lib-es/utilities/collection.js +11 -14
  117. package/lib-es/utilities/error-helpers.js +26 -33
  118. package/lib-es/utilities/error.js +3 -4
  119. package/lib-es/utilities/join-helper.js +29 -36
  120. package/lib-es/utilities/logger.js +5 -7
  121. package/lib-es/utilities/parameters.js +10 -21
  122. package/lib-es/utilities/retry-helpers.js +0 -1
  123. package/lib-es/utilities/stream.js +11 -15
  124. package/lib-es/utilities/user.js +3 -4
  125. package/lib-es/utilities/validate-params.js +1 -1
  126. package/lib-es/utilities/video-encoder-config.js +5 -10
  127. package/package.json +4 -4
@@ -1,9 +1,6 @@
1
1
  "use strict";
2
2
 
3
- require("core-js/modules/es.symbol.description.js");
4
- require("core-js/modules/es.error.cause.js");
5
3
  require("core-js/modules/esnext.function.metadata.js");
6
- require("core-js/modules/esnext.iterator.filter.js");
7
4
  require("core-js/modules/esnext.map.delete-all.js");
8
5
  require("core-js/modules/esnext.map.emplace.js");
9
6
  require("core-js/modules/esnext.map.every.js");
@@ -19,7 +16,6 @@ require("core-js/modules/esnext.map.reduce.js");
19
16
  require("core-js/modules/esnext.map.some.js");
20
17
  require("core-js/modules/esnext.map.update.js");
21
18
  require("core-js/modules/esnext.symbol.metadata.js");
22
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
23
19
  Object.defineProperty(exports, "__esModule", {
24
20
  value: true
25
21
  });
@@ -29,9 +25,6 @@ require("core-js/modules/es.array.push.js");
29
25
  require("core-js/modules/es.json.stringify.js");
30
26
  require("core-js/modules/esnext.iterator.constructor.js");
31
27
  require("core-js/modules/esnext.iterator.for-each.js");
32
- require("core-js/modules/web.dom-collections.iterator.js");
33
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
34
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
35
28
  var _imports = require("../imports");
36
29
  var _type = require("../type");
37
30
  var _type2 = require("./type");
@@ -52,8 +45,7 @@ var _helpers = require("./helpers");
52
45
  var _sttControl = require("./stt-control");
53
46
  var _widgetControl = require("./widget-control");
54
47
  var _applicationControl = require("./application-control");
55
- var _FcrBaseRoomControlImpl;
56
- let _initProto, _joinDecs, _updateRoomPropertiesDecs, _updateIncrementRoomPropertiesDecs, _deleteRoomPropertiesDecs, _startCloudRecordingDecs, _startLiveStreamingDecs, _updateLiveStreamingLayoutDecs, _sendRoomMessageDecs, _ref; // Core SDK imports
48
+ let _initProto, _joinDecs, _updateRoomPropertiesDecs, _updateIncrementRoomPropertiesDecs, _deleteRoomPropertiesDecs, _startCloudRecordingDecs, _startLiveStreamingDecs, _updateLiveStreamingLayoutDecs, _sendRoomMessageDecs; // Core SDK imports
57
49
  // Service and API imports
58
50
  // Type definitions
59
51
  // Room control types and interfaces
@@ -61,8 +53,6 @@ let _initProto, _joinDecs, _updateRoomPropertiesDecs, _updateIncrementRoomProper
61
53
  // Error handling and utilities
62
54
  // Core state
63
55
  // Helpers and utilities
64
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
65
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
66
56
  function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function (e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O.static = l, O.private = f, f ? 2 === o ? k = function (e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function (e) { return e[n]; }, (o < 2 || 4 === o) && (F = function (e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == typeof P && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol.for("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function (t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
67
57
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
68
58
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
@@ -76,17 +66,19 @@ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side
76
66
  *
77
67
  * @internal
78
68
  */
79
- _ref = (_joinDecs = (0, _imports.trace)(['options']), _updateRoomPropertiesDecs = (0, _imports.trace)(['properties', 'cause']), _updateIncrementRoomPropertiesDecs = (0, _imports.trace)(['increments', 'cause']), _deleteRoomPropertiesDecs = (0, _imports.trace)(['properties', 'cause']), _startCloudRecordingDecs = (0, _imports.trace)(['config']), _startLiveStreamingDecs = (0, _imports.trace)(['data']), _updateLiveStreamingLayoutDecs = (0, _imports.trace)(['layoutType']), _sendRoomMessageDecs = (0, _imports.trace)(['payload', 'guaranteedDelivery']), "logger");
80
69
  class FcrBaseRoomControlImpl {
70
+ static {
71
+ [_initProto] = _applyDecs(this, [[_imports.trace, 2, "getSyncTimestamp"], [_imports.trace, 2, "getRoomInfo"], [_imports.trace, 2, "getRoomSchedule"], [_imports.trace, 2, "getLocalExDataSyncTypeList"], [_joinDecs, 2, "join"], [_imports.trace, 2, "leave"], [_imports.trace, 2, "release"], [_imports.trace, 2, "start"], [_imports.trace, 2, "end"], [_imports.trace, 2, "close"], [_imports.trace, 2, "getRoomState"], [_imports.trace, 2, "getRoomProperties"], [_imports.trace, 2, "getRoomPropertiesByKeyPath"], [_updateRoomPropertiesDecs, 2, "updateRoomProperties"], [_updateIncrementRoomPropertiesDecs, 2, "updateIncrementRoomProperties"], [_deleteRoomPropertiesDecs, 2, "deleteRoomProperties"], [_startCloudRecordingDecs, 2, "startCloudRecording"], [_imports.trace, 2, "pauseCloudRecording"], [_imports.trace, 2, "resumeCloudRecording"], [_imports.trace, 2, "stopCloudRecording"], [_imports.trace, 2, "getLiveStreamingState"], [_imports.trace, 2, "getLiveStreamingConfig"], [_startLiveStreamingDecs, 2, "startLiveStreaming"], [_updateLiveStreamingLayoutDecs, 2, "updateLiveStreamingLayout"], [_imports.trace, 2, "stopLiveStreaming"], [_imports.trace, 2, "getCloudRecordingState"], [_sendRoomMessageDecs, 2, "sendRoomMessage"]], []).e;
72
+ }
73
+ //@internal
74
+ [(_joinDecs = (0, _imports.trace)(['options']), _updateRoomPropertiesDecs = (0, _imports.trace)(['properties', 'cause']), _updateIncrementRoomPropertiesDecs = (0, _imports.trace)(['increments', 'cause']), _deleteRoomPropertiesDecs = (0, _imports.trace)(['properties', 'cause']), _startCloudRecordingDecs = (0, _imports.trace)(['config']), _startLiveStreamingDecs = (0, _imports.trace)(['data']), _updateLiveStreamingLayoutDecs = (0, _imports.trace)(['layoutType']), _sendRoomMessageDecs = (0, _imports.trace)(['payload', 'guaranteedDelivery']), "logger")] = (_initProto(this), (0, _logger.createLogger)({
75
+ prefix: 'FcrBaseRoomControlImpl'
76
+ }));
77
+ _observable = new _imports.AgoraObservable();
78
+ _joinRoomSuccess = false;
79
+ _joining = false;
80
+ _joinState = _helpers.ROOM_CONTROL_CONSTANTS.JOIN_STATE.CANCELED;
81
81
  constructor(_engine, _scene, _api, _config, _roomType, _chatConnection, _sharedCache, _chatRoomControl) {
82
- //@internal
83
- (0, _defineProperty2.default)(this, _ref, (_initProto(this), (0, _logger.createLogger)({
84
- prefix: 'FcrBaseRoomControlImpl'
85
- })));
86
- (0, _defineProperty2.default)(this, "_observable", new _imports.AgoraObservable());
87
- (0, _defineProperty2.default)(this, "_joinRoomSuccess", false);
88
- (0, _defineProperty2.default)(this, "_joining", false);
89
- (0, _defineProperty2.default)(this, "_joinState", _helpers.ROOM_CONTROL_CONSTANTS.JOIN_STATE.CANCELED);
90
82
  this._engine = _engine;
91
83
  this._scene = _scene;
92
84
  this._api = _api;
@@ -96,8 +88,9 @@ class FcrBaseRoomControlImpl {
96
88
  this._sharedCache = _sharedCache;
97
89
  this._chatRoomControl = _chatRoomControl;
98
90
  // 初始化 FcrJoinHelper
99
- const _this$_engine$getConf = this._engine.getConfig(),
100
- userId = _this$_engine$getConf.userId;
91
+ const {
92
+ userId
93
+ } = this._engine.getConfig();
101
94
  this._joinHelper = new _helpers.FcrJoinHelper(userId, this._scene, this._api);
102
95
  this._engineObserver = {
103
96
  onConnectionStateUpdated: state => {
@@ -109,9 +102,8 @@ class FcrBaseRoomControlImpl {
109
102
  };
110
103
  this._sceneObserver = {
111
104
  onJoinSceneSuccess: (sceneId, localUser) => {
112
- var _this$_chatRoomContro;
113
105
  this._joinRoomSuccess = true;
114
- (_this$_chatRoomContro = this._chatRoomControl) === null || _this$_chatRoomContro === void 0 || _this$_chatRoomContro.join();
106
+ this._chatRoomControl?.join();
115
107
  this._userControl = new _userControl.FcrUserControlImpl(this._scene, this._api, this._sharedCache);
116
108
  this._streamControl = new _streamControl.FcrStreamControlImpl(this._engine, this._scene, this._api, this._sharedCache);
117
109
  this._roomSessionControl = new _roomSession.FcrRoomSessionControlImpl(this, this._api, localUser.getLocalUserId());
@@ -145,33 +137,31 @@ class FcrBaseRoomControlImpl {
145
137
  this._observable.notifyObservers('onRoomMessageReceived', sceneId, message);
146
138
  const payload = message.payload;
147
139
  if (message.cmd === _helpers.ROOM_MESSAGE_COMMANDS.ROOM_ROUTE_SWITCH) {
148
- var _this$_userControl;
149
- const localUserRole = (_this$_userControl = this._userControl) === null || _this$_userControl === void 0 ? void 0 : _this$_userControl.getLocalUser().userRole;
140
+ const localUserRole = this._userControl?.getLocalUser().userRole;
150
141
  if (localUserRole && payload.targetRoles.includes(_type.FcrUserRoleToStringMap[localUserRole])) {
151
- var _this$_userControl2;
152
142
  this._observable.notifyObservers('onRoomRouteSwitched', {
153
143
  targetRouting: {
154
144
  roomId: payload.toRoom.roomUuid,
155
145
  roomType: payload.toRoom.roomType,
156
146
  isJoined: false
157
147
  },
158
- operatorUser: (_this$_userControl2 = this._userControl) === null || _this$_userControl2 === void 0 ? void 0 : _this$_userControl2.getUser(message.senderId)
148
+ operatorUser: this._userControl?.getUser(message.senderId)
159
149
  });
160
150
  this.leave();
161
151
  }
162
152
  }
163
153
  },
164
154
  onScenePropertiesUpdated: async (sceneId, event) => {
165
- var _event$cause, _event$cause2, _event$cause3, _event$cause4;
166
- if (((_event$cause = event.cause) === null || _event$cause === void 0 ? void 0 : _event$cause.cmd) === _helpers.ROOM_MESSAGE_COMMANDS.CLOUD_RECORDING) {
167
- const _ref2 = this._scene.getSceneProperties().record,
168
- state = _ref2.state,
169
- ready = _ref2.ready,
170
- onhold = _ref2.onhold;
155
+ if (event.cause?.cmd === _helpers.ROOM_MESSAGE_COMMANDS.CLOUD_RECORDING) {
156
+ const {
157
+ state,
158
+ ready,
159
+ onhold
160
+ } = this._scene.getSceneProperties().record;
171
161
  const recordState = this._formatRecordingState(state, ready, onhold);
172
162
  this._observable.notifyObservers('onCloudRecordingStateUpdated', sceneId, recordState);
173
163
  }
174
- if (((_event$cause2 = event.cause) === null || _event$cause2 === void 0 ? void 0 : _event$cause2.cmd) === _helpers.ROOM_MESSAGE_COMMANDS.ROOM_STATE_UPDATE) {
164
+ if (event.cause?.cmd === _helpers.ROOM_MESSAGE_COMMANDS.ROOM_STATE_UPDATE) {
175
165
  const schedule = event.changedProperties.schedule;
176
166
  if (schedule.state === _helpers.ROOM_STATE_VALUES.ENDED) {
177
167
  this._joinState = _helpers.ROOM_CONTROL_CONSTANTS.JOIN_STATE.CANCELED;
@@ -179,7 +169,7 @@ class FcrBaseRoomControlImpl {
179
169
  }
180
170
  this._observable.notifyObservers('onRoomStateUpdated', sceneId, schedule.state);
181
171
  }
182
- if (((_event$cause3 = event.cause) === null || _event$cause3 === void 0 ? void 0 : _event$cause3.cmd) === _helpers.ROOM_MESSAGE_COMMANDS.ROOM_PROPERTIES_UPDATE) {
172
+ if (event.cause?.cmd === _helpers.ROOM_MESSAGE_COMMANDS.ROOM_PROPERTIES_UPDATE) {
183
173
  const changedProperties = {};
184
174
  for (const key in event.changedProperties) {
185
175
  if (key.startsWith('flexProps')) {
@@ -188,17 +178,17 @@ class FcrBaseRoomControlImpl {
188
178
  }
189
179
  if (Object.keys(changedProperties).length > 0) {
190
180
  const structure = (0, _collection.convertToStructure)(changedProperties);
191
- this._observable.notifyObservers('onRoomPropertiesUpdated', sceneId, _objectSpread(_objectSpread({}, event), {}, {
181
+ this._observable.notifyObservers('onRoomPropertiesUpdated', sceneId, {
182
+ ...event,
192
183
  changedProperties: structure['flexProps']
193
- }));
184
+ });
194
185
  }
195
186
  }
196
- if (((_event$cause4 = event.cause) === null || _event$cause4 === void 0 ? void 0 : _event$cause4.cmd) === _helpers.ROOM_MESSAGE_COMMANDS.LIVE_STREAMING_UPDATE) {
197
- var _event$cause5;
187
+ if (event.cause?.cmd === _helpers.ROOM_MESSAGE_COMMANDS.LIVE_STREAMING_UPDATE) {
198
188
  let liveStreamingState = _type.FcrLiveStreamingState.STOPPED;
199
189
  let state = this._scene.getScenePropertiesByKeyPath('live.state');
200
190
  let pageUrl = this._scene.getScenePropertiesByKeyPath('live.pageUrl');
201
- const reason = (_event$cause5 = event.cause) === null || _event$cause5 === void 0 || (_event$cause5 = _event$cause5.data) === null || _event$cause5 === void 0 ? void 0 : _event$cause5.reason;
191
+ const reason = event.cause?.data?.reason;
202
192
  if (state === _helpers.LIVE_STREAMING_STATE_VALUES.STARTED) {
203
193
  liveStreamingState = _type.FcrLiveStreamingState.STARTED;
204
194
  }
@@ -209,8 +199,7 @@ class FcrBaseRoomControlImpl {
209
199
  }
210
200
  },
211
201
  onScenePropertiesDeleted: (sceneId, event) => {
212
- var _event$cause6;
213
- if (((_event$cause6 = event.cause) === null || _event$cause6 === void 0 ? void 0 : _event$cause6.cmd) === _helpers.ROOM_MESSAGE_COMMANDS.ROOM_PROPERTIES_UPDATE) {
202
+ if (event.cause?.cmd === _helpers.ROOM_MESSAGE_COMMANDS.ROOM_PROPERTIES_UPDATE) {
214
203
  this._observable.notifyObservers('onRoomPropertiesDeleted', sceneId, event);
215
204
  }
216
205
  },
@@ -233,8 +222,7 @@ class FcrBaseRoomControlImpl {
233
222
  }
234
223
  },
235
224
  onUserPropertiesUpdated: (_, event) => {
236
- var _event$cause7;
237
- if (((_event$cause7 = event.cause) === null || _event$cause7 === void 0 ? void 0 : _event$cause7.cmd) === _helpers.ROOM_MESSAGE_COMMANDS.USER_KICK_OUT && event.modifiedUser.userId === this._scene.localUser.getLocalUserId()) {
225
+ if (event.cause?.cmd === _helpers.ROOM_MESSAGE_COMMANDS.USER_KICK_OUT && event.modifiedUser.userId === this._scene.localUser.getLocalUserId()) {
238
226
  this._joinState = _helpers.ROOM_CONTROL_CONSTANTS.JOIN_STATE.CANCELED;
239
227
  this._cleanup();
240
228
  }
@@ -345,7 +333,6 @@ class FcrBaseRoomControlImpl {
345
333
  * @returns 房间信息,如果未加入房间则返回 undefined
346
334
  */
347
335
  getRoomInfo() {
348
- var _passwordInfo$payload;
349
336
  const sceneInfo = this._scene.getSceneInfo();
350
337
  // 检查是否已加入房间,避免在退出房间时访问已清除的 localUser
351
338
  if (!sceneInfo || !this._joinRoomSuccess) {
@@ -354,19 +341,18 @@ class FcrBaseRoomControlImpl {
354
341
  const passwordInfo = this._scene.getScenePropertiesByKeyPath('security.password');
355
342
  let shareLink;
356
343
  try {
357
- var _userProperties$info;
358
344
  const userProperties = this._scene.getUserPropertiesByUserId(this._scene.localUser.getLocalUserId());
359
- shareLink = userProperties === null || userProperties === void 0 || (_userProperties$info = userProperties.info) === null || _userProperties$info === void 0 ? void 0 : _userProperties$info.shareLink;
345
+ shareLink = userProperties?.info?.shareLink;
360
346
  } catch (e) {
361
347
  // localUser 可能在退出房间过程中被清除,
362
- this.logger.warn("getroomInfo error :".concat(JSON.stringify(e)));
348
+ this.logger.warn(`getroomInfo error :${JSON.stringify(e)}`);
363
349
  }
364
350
  const label = this._scene.getScenePropertiesByKeyPath('label');
365
351
  return {
366
352
  roomId: sceneInfo.sceneId,
367
353
  roomName: sceneInfo.sceneName,
368
354
  roomType: this._roomType,
369
- password: passwordInfo === null || passwordInfo === void 0 || (_passwordInfo$payload = passwordInfo.payload) === null || _passwordInfo$payload === void 0 ? void 0 : _passwordInfo$payload.text,
355
+ password: passwordInfo?.payload?.text,
370
356
  inviteLink: shareLink,
371
357
  label
372
358
  };
@@ -379,12 +365,11 @@ class FcrBaseRoomControlImpl {
379
365
  * @throws {FcrError} 如果未加入房间
380
366
  */
381
367
  getRoomSchedule() {
382
- var _schedule$duration, _schedule$startTime;
383
368
  (0, _helpers.validateRoomJoined)(this._joinRoomSuccess, 'get schedule info');
384
369
  const schedule = this._scene.getScenePropertiesByKeyPath('schedule');
385
370
  return {
386
- duration: (_schedule$duration = schedule.duration) !== null && _schedule$duration !== void 0 ? _schedule$duration : 0,
387
- startTime: Math.floor(((_schedule$startTime = schedule.startTime) !== null && _schedule$startTime !== void 0 ? _schedule$startTime : 0) / 1000)
371
+ duration: schedule.duration ?? 0,
372
+ startTime: Math.floor((schedule.startTime ?? 0) / 1000)
388
373
  };
389
374
  }
390
375
 
@@ -396,7 +381,7 @@ class FcrBaseRoomControlImpl {
396
381
  getLocalExDataSyncTypeList() {
397
382
  const localExDataSyncTypeList = this._scene.getLocalExDataSyncTypeList();
398
383
  const result = [];
399
- localExDataSyncTypeList === null || localExDataSyncTypeList === void 0 || localExDataSyncTypeList.forEach(syncTypeInfo => {
384
+ localExDataSyncTypeList?.forEach(syncTypeInfo => {
400
385
  const convertedType = this._convertAgoraRteExDataSyncTypeInfoToFcrExDataSyncType(syncTypeInfo);
401
386
  if (convertedType) {
402
387
  result.push(convertedType);
@@ -460,9 +445,7 @@ class FcrBaseRoomControlImpl {
460
445
  */
461
446
  async _executeJoinProcess(options) {
462
447
  const handleJoinAborted = this._createJoinAbortedHandler();
463
- const _await$to = await (0, _imports.to)(this._joinHelper.join(options, handleJoinAborted)),
464
- _await$to2 = (0, _slicedToArray2.default)(_await$to, 1),
465
- error = _await$to2[0];
448
+ const [error] = await (0, _imports.to)(this._joinHelper.join(options, handleJoinAborted));
466
449
  if (error) {
467
450
  throw error;
468
451
  }
@@ -491,7 +474,7 @@ class FcrBaseRoomControlImpl {
491
474
  async _handleRobotUserSetup(options) {
492
475
  if (options.userRole === _type.FcrUserRole.ROBOT) {
493
476
  const res = (0, _error.handleRequestError)(() => this._api.setCloudRecordingReady(this._scene.sceneId), _imports.ErrorModuleCode.FCR_ROOM, 'set cloud recording ready failed');
494
- this.logger.info("set cloud recording ready, response: ".concat((0, _imports.jsonstring)(res)));
477
+ this.logger.info(`set cloud recording ready, response: ${(0, _imports.jsonstring)(res)}`);
495
478
  }
496
479
  }
497
480
 
@@ -500,7 +483,7 @@ class FcrBaseRoomControlImpl {
500
483
  * @private
501
484
  */
502
485
  _handleJoinFailure(error) {
503
- this.logger.error("failed to join room: ".concat(error.message));
486
+ this.logger.error(`failed to join room: ${error.message}`);
504
487
  this._observable.notifyObservers('onJoinRoomFailure', this._scene.sceneId, error);
505
488
  }
506
489
 
@@ -631,10 +614,11 @@ class FcrBaseRoomControlImpl {
631
614
  return _type.FcrReturnCode.SUCCESS;
632
615
  }
633
616
  getCloudRecordingState() {
634
- const _ref3 = this._scene.getScenePropertiesByKeyPath('record'),
635
- state = _ref3.state,
636
- ready = _ref3.ready,
637
- onhold = _ref3.onhold;
617
+ const {
618
+ state,
619
+ ready,
620
+ onhold
621
+ } = this._scene.getScenePropertiesByKeyPath('record');
638
622
  return this._formatRecordingState(state, ready, onhold);
639
623
  }
640
624
  async sendRoomMessage(payload, guaranteedDelivery) {
@@ -659,8 +643,7 @@ class FcrBaseRoomControlImpl {
659
643
  this._engine.removeObserver(this._engineObserver);
660
644
  this._sharedCache.getRoomCache(this._scene.sceneId).clear();
661
645
  try {
662
- var _this$_chatRoomContro2, _this$sharingControl, _this$sharingControl2;
663
- return await Promise.all([(_this$_chatRoomContro2 = this._chatRoomControl) === null || _this$_chatRoomContro2 === void 0 ? void 0 : _this$_chatRoomContro2.leave(), (_this$sharingControl = this.sharingControl) === null || _this$sharingControl === void 0 ? void 0 : _this$sharingControl.getBoardControl().close(), (_this$sharingControl2 = this.sharingControl) === null || _this$sharingControl2 === void 0 ? void 0 : _this$sharingControl2.getAnnotationControl().close(), this._scene.leave()]);
646
+ return await Promise.all([this._chatRoomControl?.leave(), this.sharingControl?.getBoardControl().close(), this.sharingControl?.getAnnotationControl().close(), this._scene.leave()]);
664
647
  } finally {
665
648
  this._joinRoomSuccess = false;
666
649
  }
@@ -682,8 +665,9 @@ class FcrBaseRoomControlImpl {
682
665
  }
683
666
  async _liveStreamingAction(action, errorMessage) {
684
667
  try {
685
- const _await$action = await action(),
686
- code = _await$action.code;
668
+ const {
669
+ code
670
+ } = await action();
687
671
  if (code !== _helpers.RESPONSE_CODES.SUCCESS) {
688
672
  throw _helpers.liveStreamingErrorHelper.createNetworkError(errorMessage);
689
673
  }
@@ -706,8 +690,5 @@ class FcrBaseRoomControlImpl {
706
690
  * @internal
707
691
  */
708
692
  exports.FcrBaseRoomControlImpl = FcrBaseRoomControlImpl;
709
- _FcrBaseRoomControlImpl = FcrBaseRoomControlImpl;
710
- var _applyDecs$e = (0, _slicedToArray2.default)(_applyDecs(_FcrBaseRoomControlImpl, [[_imports.trace, 2, "getSyncTimestamp"], [_imports.trace, 2, "getRoomInfo"], [_imports.trace, 2, "getRoomSchedule"], [_imports.trace, 2, "getLocalExDataSyncTypeList"], [_joinDecs, 2, "join"], [_imports.trace, 2, "leave"], [_imports.trace, 2, "release"], [_imports.trace, 2, "start"], [_imports.trace, 2, "end"], [_imports.trace, 2, "close"], [_imports.trace, 2, "getRoomState"], [_imports.trace, 2, "getRoomProperties"], [_imports.trace, 2, "getRoomPropertiesByKeyPath"], [_updateRoomPropertiesDecs, 2, "updateRoomProperties"], [_updateIncrementRoomPropertiesDecs, 2, "updateIncrementRoomProperties"], [_deleteRoomPropertiesDecs, 2, "deleteRoomProperties"], [_startCloudRecordingDecs, 2, "startCloudRecording"], [_imports.trace, 2, "pauseCloudRecording"], [_imports.trace, 2, "resumeCloudRecording"], [_imports.trace, 2, "stopCloudRecording"], [_imports.trace, 2, "getLiveStreamingState"], [_imports.trace, 2, "getLiveStreamingConfig"], [_startLiveStreamingDecs, 2, "startLiveStreaming"], [_updateLiveStreamingLayoutDecs, 2, "updateLiveStreamingLayout"], [_imports.trace, 2, "stopLiveStreaming"], [_imports.trace, 2, "getCloudRecordingState"], [_sendRoomMessageDecs, 2, "sendRoomMessage"]], []).e, 1);
711
- _initProto = _applyDecs$e[0];
712
693
  class FcrSubRoomControlImpl extends FcrBaseRoomControlImpl {}
713
694
  exports.FcrSubRoomControlImpl = FcrSubRoomControlImpl;
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
 
3
- require("core-js/modules/es.symbol.description.js");
4
- require("core-js/modules/es.error.cause.js");
5
3
  require("core-js/modules/es.array.push.js");
6
4
  require("core-js/modules/esnext.function.metadata.js");
7
5
  require("core-js/modules/esnext.map.delete-all.js");
@@ -19,14 +17,10 @@ require("core-js/modules/esnext.map.reduce.js");
19
17
  require("core-js/modules/esnext.map.some.js");
20
18
  require("core-js/modules/esnext.map.update.js");
21
19
  require("core-js/modules/esnext.symbol.metadata.js");
22
- require("core-js/modules/web.dom-collections.iterator.js");
23
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
24
20
  Object.defineProperty(exports, "__esModule", {
25
21
  value: true
26
22
  });
27
23
  exports.FcrInfinityRoomControlImpl = void 0;
28
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
29
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
30
24
  var _ = require("..");
31
25
  var _imports = require("../../imports");
32
26
  var _type = require("../../type");
@@ -36,33 +30,37 @@ var _type2 = require("../type");
36
30
  var _boardInitInfoHelper = require("../helpers/board-init-info-helper");
37
31
  var _sharedStorage = require("../../utilities/shared-storage");
38
32
  var _utils = require("../whiteboard-control/utils");
39
- var _FcrInfinityRoomControlImpl;
40
33
  let _initProto;
41
34
  function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function (e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O.static = l, O.private = f, f ? 2 === o ? k = function (e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function (e) { return e[n]; }, (o < 2 || 4 === o) && (F = function (e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == typeof P && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol.for("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function (t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
42
35
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
43
36
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
44
37
  function _setFunctionName(e, t, n) { "symbol" == typeof t && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
45
38
  function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? typeof e : "null")); return e; }
46
- const sharedScheduler = _imports.AgoraScheduler.shared,
47
- Duration = _imports.AgoraScheduler.Duration;
39
+ const {
40
+ shared: sharedScheduler,
41
+ Duration
42
+ } = _imports.AgoraScheduler;
48
43
  /**
49
44
  * @internal
50
45
  */
51
46
  class FcrInfinityRoomControlImpl extends _.FcrBaseRoomControlImpl {
47
+ static {
48
+ [_initProto] = _applyDecs(this, [[_imports.trace, 2, "getAnnouncement"], [_imports.trace, 2, "join"], [_imports.trace, 2, "leave"], [_imports.bound, 2, "_onLocalUserPermissionInfoDeleted"]], [], 0, void 0, _.FcrBaseRoomControlImpl).e;
49
+ }
50
+ //@internal
51
+ logger = (_initProto(this), (0, _logger.createLogger)({
52
+ prefix: 'FcrInfinityRoomControlImpl'
53
+ }));
54
+ _privilegeObserver = {
55
+ onLocalUserPermissionInfoDeleted: this._onLocalUserPermissionInfoDeleted
56
+ };
52
57
  constructor(engine, scene, api, config, sharedCache, chatConnection, chatRoomControl, monitorControl) {
53
58
  super(engine, scene, api, config, _type2.FcrRoomType.Infinityroom, chatConnection, sharedCache, chatRoomControl);
54
- //@internal
55
- (0, _defineProperty2.default)(this, "logger", (_initProto(this), (0, _logger.createLogger)({
56
- prefix: 'FcrInfinityRoomControlImpl'
57
- })));
58
- (0, _defineProperty2.default)(this, "_privilegeObserver", {
59
- onLocalUserPermissionInfoDeleted: this._onLocalUserPermissionInfoDeleted
60
- });
61
59
  this._monitorControl = monitorControl;
62
60
  this._interpreterControl = new _interpreterControl.FcrInterpreterControlImpl(api, scene, config, engine, chatConnection, sharedCache);
63
61
  this._addLogObserver();
64
62
  (0, _boardInitInfoHelper.addBoardInitInfoObserver)(this._scene, this._api, this.logger);
65
- this.logger.info("initialized, room id: ".concat(this._scene.sceneId));
63
+ this.logger.info(`initialized, room id: ${this._scene.sceneId}`);
66
64
  }
67
65
  getAnnouncement() {
68
66
  const announcement = this._scene.getScenePropertiesByKeyPath('info.announcement');
@@ -93,8 +91,7 @@ class FcrInfinityRoomControlImpl extends _.FcrBaseRoomControlImpl {
93
91
  privilegeControl.removeObserver(this._privilegeObserver);
94
92
  return await super.leave();
95
93
  } finally {
96
- var _this$_logUploadTask;
97
- (_this$_logUploadTask = this._logUploadTask) === null || _this$_logUploadTask === void 0 || _this$_logUploadTask.stop();
94
+ this._logUploadTask?.stop();
98
95
  this._uploadLog();
99
96
  }
100
97
  }
@@ -116,12 +113,12 @@ class FcrInfinityRoomControlImpl extends _.FcrBaseRoomControlImpl {
116
113
  }
117
114
  _onLocalUserPermissionInfoDeleted(roomId, event) {
118
115
  if ((0, _utils.hasBoardWritePermission)(event.permissionInfo)) {
119
- this.logger.info("remove board write permission");
116
+ this.logger.info(`remove board write permission`);
120
117
 
121
118
  // this.getSharingControl().getBoardControl().getMainWindow()?.setWritable(false);
122
119
  }
123
120
  if ((0, _utils.hasAnnotationWritePermission)(event.permissionInfo)) {
124
- this.logger.info("remove annotation write permission");
121
+ this.logger.info(`remove annotation write permission`);
125
122
 
126
123
  // this.getSharingControl().getAnnotationControl().getMainWindow()?.setWritable(false);
127
124
  }
@@ -130,9 +127,4 @@ class FcrInfinityRoomControlImpl extends _.FcrBaseRoomControlImpl {
130
127
  this.addObserver((0, _logger.generateLogObserver)(this.logger, [['onCloudRecordingStateUpdated', ['roomId', 'state']], ['onJoinRoomFailure', ['roomId', 'error']], ['onJoinRoomSuccess', ['roomId']], ['onLiveStreamingStateUpdated', ['roomId', 'state', 'url', 'reason']], ['onRoomMessageReceived', ['roomId', 'message']], ['onRoomPropertiesDeleted', ['roomId', 'event']], ['onRoomPropertiesUpdated', ['roomId', 'event']], ['onRoomStateUpdated', ['roomId', 'state']]]));
131
128
  }
132
129
  }
133
- exports.FcrInfinityRoomControlImpl = FcrInfinityRoomControlImpl;
134
- _FcrInfinityRoomControlImpl = FcrInfinityRoomControlImpl;
135
- var _applyDecs$e = _applyDecs(_FcrInfinityRoomControlImpl, [[_imports.trace, 2, "getAnnouncement"], [_imports.trace, 2, "join"], [_imports.trace, 2, "leave"], [_imports.bound, 2, "_onLocalUserPermissionInfoDeleted"]], [], 0, void 0, _.FcrBaseRoomControlImpl).e;
136
- var _applyDecs$e2 = (0, _slicedToArray2.default)(_applyDecs$e, 1);
137
- _initProto = _applyDecs$e2[0];
138
- _applyDecs$e;
130
+ exports.FcrInfinityRoomControlImpl = FcrInfinityRoomControlImpl;