fcr-ui-scene 3.2.0 → 3.3.0
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/installer/icons/favicon.ico +0 -0
- package/installer/icons/favicon.png +0 -0
- package/installer/mac/entitlements.mac.plist +16 -0
- package/lib/common/device-store.d.ts +1 -1
- package/lib/common/device-store.js +11 -3
- package/lib/common/event-store.d.ts +17 -1
- package/lib/common/event-store.js +38 -5
- package/lib/common/security-store.d.ts +14 -4
- package/lib/common/security-store.js +149 -30
- package/lib/electron/bootstrap-dev.d.ts +1 -0
- package/lib/electron/bootstrap-dev.js +51 -0
- package/lib/electron/bootstrap-sdk.d.ts +1 -0
- package/lib/electron/bootstrap-sdk.js +56 -0
- package/lib/electron/bootstrap.d.ts +1 -0
- package/lib/electron/bootstrap.js +56 -0
- package/lib/electron/default-options.js +1 -1
- package/lib/electron/dev.d.ts +1 -0
- package/lib/electron/dev.js +51 -0
- package/lib/electron/injections.d.ts +1 -1
- package/lib/electron/injections.js +3 -6
- package/lib/electron/main.js +4 -16
- package/lib/electron/plugins/meeting-state.d.ts +2 -0
- package/lib/electron/plugins/meeting-state.js +39 -0
- package/lib/electron/preload.js +1 -1
- package/lib/fragments/control-bar/control-bar-store.d.ts +34 -1
- package/lib/fragments/control-bar/control-bar-store.js +371 -79
- package/lib/fragments/control-bar/device/index.js +5 -3
- package/lib/fragments/control-bar/index.css +15 -10
- package/lib/fragments/control-bar/index.js +18 -0
- package/lib/fragments/control-bar/meeting-details/meeting-detail.css +109 -0
- package/lib/fragments/control-bar/meeting-details/meeting-details-portal.d.ts +3 -0
- package/lib/fragments/control-bar/meeting-details/meeting-details-portal.js +60 -0
- package/lib/fragments/control-bar/meeting-details/meeting-details.d.ts +2 -0
- package/lib/fragments/control-bar/meeting-details/meeting-details.js +179 -0
- package/lib/fragments/control-bar/more-actions/index.css +53 -0
- package/lib/fragments/control-bar/more-actions/index.js +72 -37
- package/lib/fragments/control-bar/security-content/index.css +10 -0
- package/lib/fragments/control-bar/security-content/index.js +40 -18
- package/lib/fragments/control-bar/view.js +8 -2
- package/lib/login-confirm-dialog.d.ts +12 -0
- package/lib/login-confirm-dialog.js +80 -0
- package/lib/modules/action-bar/action-bar-collapes-items.js +5 -5
- package/lib/modules/action-bar/chat/index.js +5 -5
- package/lib/modules/action-bar/device/index.css +7 -2
- package/lib/modules/action-bar/device/index.js +4 -4
- package/lib/modules/action-bar/index.css +59 -12
- package/lib/modules/action-bar/index.d.ts +3 -2
- package/lib/modules/action-bar/index.dev.js +1 -1
- package/lib/modules/action-bar/index.js +21 -0
- package/lib/modules/action-bar/leave/assign-host.d.ts +3 -0
- package/lib/modules/action-bar/leave/assign-host.js +2 -4
- package/lib/modules/action-bar/leave/index.js +29 -6
- package/lib/modules/action-bar/leave/leave-meeting.d.ts +11 -0
- package/lib/modules/action-bar/leave/leave-meeting.js +25 -16
- package/lib/modules/action-bar/more/poppover-content.js +4 -4
- package/lib/modules/action-bar/participants/index.css +12 -0
- package/lib/modules/action-bar/participants/index.js +21 -14
- package/lib/modules/action-bar/screen-share/index.js +5 -1
- package/lib/modules/action-bar/screen-share/submenu.js +16 -22
- package/lib/modules/action-bar/security/drop-menu.js +90 -13
- package/lib/modules/action-bar/store.d.ts +38 -6
- package/lib/modules/action-bar/store.js +487 -95
- package/lib/modules/action-bar/view.js +65 -42
- package/lib/modules/chat/chat-bar/index.js +39 -27
- package/lib/modules/chat/chat-select/index.css +14 -4
- package/lib/modules/chat/chat.d.ts +1 -2
- package/lib/modules/chat/chat.js +184 -105
- package/lib/modules/chat/index.css +49 -0
- package/lib/modules/chat/index.d.ts +2 -2
- package/lib/modules/chat/index.dev.js +1 -1
- package/lib/modules/chat/index.js +13 -8
- package/lib/modules/chat/message-list.js +59 -48
- package/lib/modules/chat/store.d.ts +48 -2
- package/lib/modules/chat/store.js +258 -45
- package/lib/modules/connection-gateway/index.d.ts +2 -1
- package/lib/modules/connection-gateway/store.d.ts +6 -3
- package/lib/modules/connection-gateway/store.js +5 -1
- package/lib/modules/device-pretest/audio-preview/speaker-control.js +1 -1
- package/lib/modules/device-pretest/index.css +0 -4
- package/lib/modules/device-pretest/settings/beauty.js +17 -6
- package/lib/modules/device-pretest/store.js +7 -11
- package/lib/modules/dialog/components/chat/electron.js +2 -1
- package/lib/modules/dialog/components/confirm/electron.js +5 -3
- package/lib/modules/dialog/components/connection-gateway/electron.js +3 -1
- package/lib/modules/dialog/components/connection-gateway/index.css +0 -2
- package/lib/modules/dialog/components/device-setting/electron.js +3 -1
- package/lib/modules/dialog/components/device-setting/index.css +0 -1
- package/lib/modules/dialog/components/operation-waiting-room/electron.d.ts +5 -0
- package/lib/modules/dialog/components/operation-waiting-room/electron.js +89 -0
- package/lib/modules/dialog/components/operation-waiting-room/index.css +44 -0
- package/lib/modules/dialog/components/operation-waiting-room/index.d.ts +5 -0
- package/lib/modules/dialog/components/operation-waiting-room/index.js +156 -0
- package/lib/modules/dialog/components/participant/electron.js +2 -1
- package/lib/modules/dialog/components/remove-admit-waiting-room/electron.d.ts +5 -0
- package/lib/modules/dialog/components/remove-admit-waiting-room/electron.js +89 -0
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.css +50 -0
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.d.ts +5 -0
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.js +90 -0
- package/lib/modules/dialog/components/whiteboard/index.js +2 -1
- package/lib/modules/dialog/dialogs.js +17 -13
- package/lib/modules/dialog/index.css +2 -0
- package/lib/modules/dialog/store.d.ts +4 -0
- package/lib/modules/dialog/store.js +16 -2
- package/lib/modules/event-notification/context.d.ts +2 -0
- package/lib/modules/event-notification/context.js +9 -0
- package/lib/modules/event-notification/index.css +58 -0
- package/lib/modules/event-notification/index.d.ts +13 -0
- package/lib/modules/event-notification/index.js +48 -0
- package/lib/modules/event-notification/store.d.ts +17 -0
- package/lib/modules/event-notification/store.js +133 -0
- package/lib/modules/event-notification/view.d.ts +5 -0
- package/lib/modules/event-notification/view.js +114 -0
- package/lib/modules/invite/index.css +4 -4
- package/lib/modules/invite/pstn-invite.js +1 -0
- package/lib/modules/layout/components/Gallery.js +7 -1
- package/lib/modules/layout/components/Layout.js +82 -57
- package/lib/modules/layout/components/index.css +33 -6
- package/lib/modules/layout/index.css +30 -0
- package/lib/modules/layout/member-window/index.js +9 -3
- package/lib/modules/layout/store.d.ts +19 -2
- package/lib/modules/layout/store.js +177 -70
- package/lib/modules/layout/video-window-datasource.d.ts +1 -1
- package/lib/modules/layout/video-window-datasource.js +1 -1
- package/lib/modules/live-streaming/index.dev.js +1 -1
- package/lib/modules/participant/attendee/index.d.ts +12 -3
- package/lib/modules/participant/attendee/index.js +132 -30
- package/lib/modules/participant/index.css +20 -0
- package/lib/modules/participant/index.d.ts +5 -2
- package/lib/modules/participant/index.dev.js +1 -1
- package/lib/modules/participant/index.js +27 -0
- package/lib/modules/participant/room-control-drop-menu/index.css +37 -0
- package/lib/modules/participant/store.d.ts +30 -5
- package/lib/modules/participant/store.js +347 -74
- package/lib/modules/participant/view.js +133 -34
- package/lib/modules/setting/index.css +1 -5
- package/lib/modules/setting/index.dev.js +1 -1
- package/lib/modules/setting/store.d.ts +2 -2
- package/lib/modules/setting/store.js +3 -8
- package/lib/modules/setting/translate-settings/translate-settings.js +1 -1
- package/lib/modules/setting/video-settings/index.css +9 -6
- package/lib/modules/share-screen/index.d.ts +2 -0
- package/lib/modules/share-screen/index.dev.js +3 -2
- package/lib/modules/share-screen/selection/index.css +2 -0
- package/lib/modules/share-screen/store.d.ts +6 -3
- package/lib/modules/share-screen/store.js +170 -129
- package/lib/modules/state-bar/index.css +2 -2
- package/lib/modules/state-bar/index.d.ts +2 -2
- package/lib/modules/state-bar/index.dev.js +1 -1
- package/lib/modules/state-bar/meeting-detail.css +6 -4
- package/lib/modules/state-bar/meeting-details.js +29 -3
- package/lib/modules/state-bar/meeting-network-state.css +14 -3
- package/lib/modules/state-bar/meeting-network-state.js +10 -4
- package/lib/modules/state-bar/recording.js +3 -5
- package/lib/modules/state-bar/store.d.ts +4 -2
- package/lib/modules/state-bar/store.js +18 -3
- package/lib/modules/state-bar/view.js +1 -6
- package/lib/modules/video-window/index.css +1 -0
- package/lib/modules/video-window/store.d.ts +2 -2
- package/lib/modules/video-window/store.js +14 -11
- package/lib/modules/waiting-room-layout/context.d.ts +2 -0
- package/lib/modules/waiting-room-layout/context.js +9 -0
- package/lib/modules/waiting-room-layout/index.css +71 -0
- package/lib/modules/waiting-room-layout/index.d.ts +8 -0
- package/lib/modules/waiting-room-layout/index.js +47 -0
- package/lib/modules/waiting-room-layout/store.d.ts +30 -0
- package/lib/modules/waiting-room-layout/store.js +189 -0
- package/lib/modules/waiting-room-layout/type.d.ts +0 -0
- package/lib/modules/waiting-room-layout/type.js +1 -0
- package/lib/modules/waiting-room-layout/view.d.ts +3 -0
- package/lib/modules/waiting-room-layout/view.js +67 -0
- package/lib/modules/whiteboard/app.js +0 -6
- package/lib/modules/whiteboard/components/control-bar/index.css +3 -0
- package/lib/modules/whiteboard/components/multi-window/index.js +6 -1
- package/lib/modules/whiteboard/components/progress/electron.js +2 -1
- package/lib/modules/whiteboard/components/switch-theme/index.css +4 -0
- package/lib/modules/whiteboard/components/switch-theme/index.d.ts +2 -1
- package/lib/modules/whiteboard/components/switch-theme/index.js +20 -15
- package/lib/modules/whiteboard/components/switch-theme/item.d.ts +1 -0
- package/lib/modules/whiteboard/components/switch-theme/item.js +9 -2
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +14 -10
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/store.js +3 -0
- package/lib/modules/whiteboard/context.d.ts +4 -0
- package/lib/modules/whiteboard/context.js +4 -2
- package/lib/modules/whiteboard/index.js +22 -6
- package/lib/plugins/browser-runtime-plugin.js +1 -1
- package/lib/plugins/module-dev-plugin.js +8 -6
- package/lib/runtime.d.ts +1 -1
- package/lib/translations/enUS.d.ts +449 -6
- package/lib/translations/enUS.js +485 -32
- package/lib/translations/zhCN.d.ts +447 -6
- package/lib/translations/zhCN.js +468 -17
- package/lib/type.d.ts +6 -2
- package/lib/ui-manager.d.ts +7 -3
- package/lib/ui-manager.js +576 -139
- package/lib/ui-scene.d.ts +1 -0
- package/lib/ui-scene.js +26 -21
- package/lib/utilities/constant.d.ts +43 -4
- package/lib/utilities/constant.js +41 -1
- package/lib/utilities/parameters.js +2 -2
- package/lib/utilities/renderer.d.ts +1 -0
- package/lib/utilities/renderer.js +6 -2
- package/package.json +14 -14
- package/public/assets/fcr_defaultpage.png +0 -0
- package/public/assets/login_confirm.png +0 -0
- package/public/index.html +29 -11
- package/dist/132.js +0 -2
- package/dist/132.js.LICENSE.txt +0 -311
- package/dist/651.js +0 -2
- package/dist/651.js.LICENSE.txt +0 -1
- package/dist/73.js +0 -1
- package/dist/index.html +0 -13
- package/dist/main.da7c203ab32d15742cfe.css +0 -11760
- package/dist/main.js +0 -2
- package/dist/main.js.LICENSE.txt +0 -254
- package/dist/worker-entry.worker.js.LICENSE.txt +0 -13
- package/lib/modules/device-pretest/settings/index.css +0 -15
- package/lib/modules/participant/attendee/participants-more-action.d.ts +0 -18
- package/lib/modules/participant/attendee/participants-more-action.js +0 -278
package/lib/ui-manager.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/es.symbol.js");
|
|
4
4
|
require("core-js/modules/es.array.filter.js");
|
|
5
|
-
require("core-js/modules/es.array.for-each.js");
|
|
6
5
|
require("core-js/modules/es.array.push.js");
|
|
7
6
|
require("core-js/modules/es.object.define-properties.js");
|
|
8
7
|
require("core-js/modules/es.object.define-property.js");
|
|
@@ -10,11 +9,7 @@ require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
|
10
9
|
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
11
10
|
require("core-js/modules/es.object.keys.js");
|
|
12
11
|
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
13
|
-
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
14
|
-
require("core-js/modules/esnext.iterator.constructor.js");
|
|
15
12
|
require("core-js/modules/esnext.iterator.filter.js");
|
|
16
|
-
require("core-js/modules/esnext.iterator.for-each.js");
|
|
17
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
18
13
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
19
14
|
Object.defineProperty(exports, "__esModule", {
|
|
20
15
|
value: true
|
|
@@ -22,10 +17,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
22
17
|
exports.DefaultSceneUIManager = void 0;
|
|
23
18
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
24
19
|
require("core-js/modules/es.array.concat.js");
|
|
20
|
+
require("core-js/modules/es.array.for-each.js");
|
|
25
21
|
require("core-js/modules/es.array.join.js");
|
|
26
22
|
require("core-js/modules/es.object.to-string.js");
|
|
27
23
|
require("core-js/modules/es.promise.js");
|
|
28
24
|
require("core-js/modules/es.promise.finally.js");
|
|
25
|
+
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
26
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
27
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
28
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
29
29
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
30
30
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
31
31
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
@@ -36,6 +36,7 @@ var _logger = require("agora-foundation/lib/logger");
|
|
|
36
36
|
var _agoraEduCore = require("agora-edu-core");
|
|
37
37
|
var _deviceStore = require("./common/device-store");
|
|
38
38
|
var _layout = require("./modules/layout");
|
|
39
|
+
var _waitingRoomLayout = require("./modules/waiting-room-layout");
|
|
39
40
|
var _chat = require("./modules/chat");
|
|
40
41
|
var _eventStore = require("./common/event-store");
|
|
41
42
|
var _securityStore = require("./common/security-store");
|
|
@@ -61,7 +62,7 @@ var _type3 = require("agora-rte-sdk/lib/core/rtc/type");
|
|
|
61
62
|
var _type4 = require("agora-rte-sdk/lib/core/scene/type");
|
|
62
63
|
var _type5 = require("agora-rte-sdk/lib/type");
|
|
63
64
|
var _devicePretest = require("./modules/device-pretest");
|
|
64
|
-
var
|
|
65
|
+
var _context9 = require("./modules/device-pretest/context");
|
|
65
66
|
var _whiteboard = require("./modules/whiteboard");
|
|
66
67
|
var _whiteboard2 = require("./modules/dialog/components/whiteboard");
|
|
67
68
|
var _participant2 = require("./modules/dialog/components/participant");
|
|
@@ -76,11 +77,21 @@ var _videoTrackRenderContext = require("./utilities/video-track-render-context")
|
|
|
76
77
|
var _shareScreenSelection = require("./modules/dialog/components/share-screen-selection");
|
|
77
78
|
var _parameters = require("./utilities/parameters");
|
|
78
79
|
var _deviceSetting = _interopRequireDefault(require("./modules/dialog/components/device-setting"));
|
|
80
|
+
var _loginConfirmDialog = require("./login-confirm-dialog");
|
|
81
|
+
var _dialog2 = require("agora-ui-foundation/lib/components/dialog");
|
|
82
|
+
var _type6 = require("agora-edu-core/lib/room-control/type");
|
|
83
|
+
var _type7 = require("agora-edu-core/lib/room-control/privilege-control/type");
|
|
84
|
+
var _operationWaitingRoom = require("./modules/dialog/components/operation-waiting-room");
|
|
85
|
+
var _eventNotification = require("./modules/event-notification");
|
|
86
|
+
var _removeAdmitWaitingRoom = require("./modules/dialog/components/remove-admit-waiting-room");
|
|
87
|
+
var _lodash = require("lodash");
|
|
79
88
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
80
89
|
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; }
|
|
81
90
|
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; }
|
|
82
91
|
var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/function () {
|
|
83
|
-
|
|
92
|
+
// @internal
|
|
93
|
+
|
|
94
|
+
function DefaultSceneUIManager(_sceneConfig, _coreConfig, _engine, _observable) {
|
|
84
95
|
var _this$_sceneConfig$re;
|
|
85
96
|
(0, _classCallCheck2["default"])(this, DefaultSceneUIManager);
|
|
86
97
|
// @internal
|
|
@@ -92,17 +103,17 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
|
|
|
92
103
|
// @internal
|
|
93
104
|
(0, _defineProperty2["default"])(this, "_userObserver", {});
|
|
94
105
|
// @internal
|
|
106
|
+
(0, _defineProperty2["default"])(this, "_waitingRoomUserObserver", {});
|
|
107
|
+
// @internal
|
|
95
108
|
(0, _defineProperty2["default"])(this, "_roomObserver", {});
|
|
109
|
+
// @internal
|
|
110
|
+
(0, _defineProperty2["default"])(this, "_disposers", []);
|
|
96
111
|
this._sceneConfig = _sceneConfig;
|
|
97
112
|
this._coreConfig = _coreConfig;
|
|
98
113
|
this._engine = _engine;
|
|
99
|
-
this._roomControl = _roomControl;
|
|
100
114
|
this._observable = _observable;
|
|
101
115
|
this._uiEventStore = new _eventStore.FcrUIEventStore();
|
|
102
116
|
this._deviceStore = new _deviceStore.FcrDeviceStore(_sceneConfig.userName, this._engine.getDesktopMediaControl());
|
|
103
|
-
window.addEventListener('beforeunload', function () {
|
|
104
|
-
window.runtime.releaseAllWindows();
|
|
105
|
-
});
|
|
106
117
|
var _ref = (_this$_sceneConfig$re = this._sceneConfig.resource) !== null && _this$_sceneConfig$re !== void 0 ? _this$_sceneConfig$re : {
|
|
107
118
|
virtualBackgroundImages: [],
|
|
108
119
|
virtualBackgroundVideos: []
|
|
@@ -135,6 +146,34 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
|
|
|
135
146
|
if (openDefaultMicrophone) {
|
|
136
147
|
this._deviceStore.openFirstMicrophone();
|
|
137
148
|
}
|
|
149
|
+
var joinRoom = /*#__PURE__*/function () {
|
|
150
|
+
var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
151
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
152
|
+
while (1) switch (_context.prev = _context.next) {
|
|
153
|
+
case 0:
|
|
154
|
+
return _context.abrupt("return", _this._engine.login().then(function () {
|
|
155
|
+
return _this._handleJoinRoom();
|
|
156
|
+
}).then(function (type) {
|
|
157
|
+
if (type === _type6.FcrRoomType.Mainroom) {
|
|
158
|
+
_this._renderRoomUi(dom);
|
|
159
|
+
} else {
|
|
160
|
+
_this._renderWaitingRoomUi(dom);
|
|
161
|
+
}
|
|
162
|
+
}).then(function () {
|
|
163
|
+
_this._observable.notifyObservers('onLaunchSuccess', _this._sceneConfig.roomId);
|
|
164
|
+
})["catch"](function (e) {
|
|
165
|
+
_this._observable.notifyObservers('onLaunchFailure', _this._sceneConfig.roomId, e);
|
|
166
|
+
}));
|
|
167
|
+
case 1:
|
|
168
|
+
case "end":
|
|
169
|
+
return _context.stop();
|
|
170
|
+
}
|
|
171
|
+
}, _callee);
|
|
172
|
+
}));
|
|
173
|
+
return function joinRoom() {
|
|
174
|
+
return _ref2.apply(this, arguments);
|
|
175
|
+
};
|
|
176
|
+
}();
|
|
138
177
|
if (!skipPretest) {
|
|
139
178
|
var joining = false;
|
|
140
179
|
this._renderDevicePretestUi(dom,
|
|
@@ -142,9 +181,7 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
|
|
|
142
181
|
function () {
|
|
143
182
|
if (joining) return;
|
|
144
183
|
joining = true;
|
|
145
|
-
|
|
146
|
-
_this._renderRoomUi(dom);
|
|
147
|
-
})["finally"](function () {
|
|
184
|
+
joinRoom()["finally"](function () {
|
|
148
185
|
joining = false;
|
|
149
186
|
});
|
|
150
187
|
},
|
|
@@ -153,9 +190,7 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
|
|
|
153
190
|
_this._observable.notifyObservers('onLaunchCancel', _this._sceneConfig.roomId);
|
|
154
191
|
});
|
|
155
192
|
} else {
|
|
156
|
-
|
|
157
|
-
_this._renderRoomUi(dom);
|
|
158
|
-
});
|
|
193
|
+
joinRoom();
|
|
159
194
|
}
|
|
160
195
|
}
|
|
161
196
|
}, {
|
|
@@ -185,60 +220,47 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
|
|
|
185
220
|
(_this$_deviceStreamSt = this._deviceStreamStore) === null || _this$_deviceStreamSt === void 0 || _this$_deviceStreamSt.release();
|
|
186
221
|
this._deviceStore.release();
|
|
187
222
|
this._uiEventStore.release();
|
|
223
|
+
this._disposers.forEach(function (dispose) {
|
|
224
|
+
return dispose();
|
|
225
|
+
});
|
|
188
226
|
}
|
|
189
227
|
}, {
|
|
190
228
|
key: "_handleJoinRoom",
|
|
191
229
|
value: function () {
|
|
192
|
-
var _handleJoinRoom2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
193
|
-
var
|
|
194
|
-
return _regenerator["default"].wrap(function
|
|
195
|
-
while (1) switch (
|
|
230
|
+
var _handleJoinRoom2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
231
|
+
var _this2 = this;
|
|
232
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
233
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
196
234
|
case 0:
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
userRole: config.userRole,
|
|
223
|
-
roomToken: config.roomToken,
|
|
224
|
-
userProperties: config.userProperties,
|
|
225
|
-
streamLatency: _agoraEduCore.FcrStreamLatencyLevel.ULTRA_LOW,
|
|
226
|
-
createStreamConfigs: streams
|
|
227
|
-
});
|
|
228
|
-
case 9:
|
|
229
|
-
this._observable.notifyObservers('onLaunchSuccess', this._sceneConfig.roomId);
|
|
230
|
-
_context.next = 16;
|
|
231
|
-
break;
|
|
232
|
-
case 12:
|
|
233
|
-
_context.prev = 12;
|
|
234
|
-
_context.t0 = _context["catch"](6);
|
|
235
|
-
this._observable.notifyObservers('onLaunchFailure', this._sceneConfig.roomId, _context.t0);
|
|
236
|
-
throw _context.t0;
|
|
237
|
-
case 16:
|
|
235
|
+
return _context2.abrupt("return", this._createRoomControl(this._sceneConfig.roomId).then(function (room) {
|
|
236
|
+
var _room$getRoomInfo;
|
|
237
|
+
if (((_room$getRoomInfo = room.getRoomInfo()) === null || _room$getRoomInfo === void 0 ? void 0 : _room$getRoomInfo.roomType) === _type6.FcrRoomType.Mainroom) {
|
|
238
|
+
_this2._mainRoomControl = room;
|
|
239
|
+
_this2._mainRoomControl.addObserver(_this2._roomObserver);
|
|
240
|
+
// 如果已经有等候室管理员权限 再次创建房间
|
|
241
|
+
_this2._judgeWaitingRoomPremissionAndCreateRoomControl();
|
|
242
|
+
// @ts-ignore
|
|
243
|
+
window.__mainRoom_control = room;
|
|
244
|
+
return _type6.FcrRoomType.Mainroom;
|
|
245
|
+
} else {
|
|
246
|
+
_this2._waitingRoomControl = room;
|
|
247
|
+
_this2._waitingRoomControl.addObserver(_this2._roomObserver);
|
|
248
|
+
// @ts-ignore
|
|
249
|
+
window.__waitingRoom_control = room;
|
|
250
|
+
room.sendRoomMessage({
|
|
251
|
+
messageKey: _type2.RoomMessageKey.USER_WAITING_ROOM_JOINED
|
|
252
|
+
}, false);
|
|
253
|
+
return _type6.FcrRoomType.Waitingroom;
|
|
254
|
+
}
|
|
255
|
+
})["catch"](function (e) {
|
|
256
|
+
_this2._observable.notifyObservers('onLaunchFailure', _this2._sceneConfig.roomId, e);
|
|
257
|
+
throw e;
|
|
258
|
+
}));
|
|
259
|
+
case 1:
|
|
238
260
|
case "end":
|
|
239
|
-
return
|
|
261
|
+
return _context2.stop();
|
|
240
262
|
}
|
|
241
|
-
},
|
|
263
|
+
}, _callee2, this);
|
|
242
264
|
}));
|
|
243
265
|
function _handleJoinRoom() {
|
|
244
266
|
return _handleJoinRoom2.apply(this, arguments);
|
|
@@ -248,12 +270,12 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
|
|
|
248
270
|
}, {
|
|
249
271
|
key: "_renderDevicePretestUi",
|
|
250
272
|
value: function _renderDevicePretestUi(dom, onJoin, _onExit) {
|
|
251
|
-
var
|
|
273
|
+
var _this3 = this;
|
|
252
274
|
var store = this._deviceStore;
|
|
253
275
|
var pretestStore = new _store.FcrPretestStore({
|
|
254
276
|
deviceStore: store
|
|
255
277
|
});
|
|
256
|
-
_reactDom["default"].render(/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
278
|
+
_reactDom["default"].render(/*#__PURE__*/(0, _jsxRuntime.jsx)(_context9.PretestStoreContext.Provider, {
|
|
257
279
|
value: pretestStore,
|
|
258
280
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
259
281
|
style: {
|
|
@@ -269,11 +291,12 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
|
|
|
269
291
|
meetingHostName: ''
|
|
270
292
|
},
|
|
271
293
|
onClick: function onClick() {
|
|
272
|
-
|
|
294
|
+
_this3._deviceStore.actionsBeforeJoin();
|
|
273
295
|
pretestStore.release();
|
|
274
296
|
onJoin();
|
|
275
297
|
},
|
|
276
298
|
onExit: function onExit() {
|
|
299
|
+
pretestStore.release();
|
|
277
300
|
_onExit();
|
|
278
301
|
}
|
|
279
302
|
})
|
|
@@ -283,60 +306,54 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
|
|
|
283
306
|
}, {
|
|
284
307
|
key: "_renderRoomUi",
|
|
285
308
|
value: function _renderRoomUi(dom) {
|
|
286
|
-
var
|
|
309
|
+
var _this4 = this;
|
|
287
310
|
/**
|
|
288
311
|
* Common Stores
|
|
289
312
|
*/
|
|
290
313
|
var deviceStore = this._deviceStore;
|
|
291
314
|
var uiEventStore = this._uiEventStore;
|
|
292
|
-
|
|
315
|
+
if (!this._mainRoomControl) {
|
|
316
|
+
this.logger.error('Cannot render room ui without mainroom control');
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
var securityStore = new _securityStore.FcrSecurityStore(this._mainRoomControl.getPrivilegeControl(), this._mainRoomControl.getUserControl(), this._mainRoomControl.getStreamControl(), this._mainRoomControl.getRoomSessionControl(), uiEventStore);
|
|
293
320
|
this._securityStore = securityStore;
|
|
294
321
|
var deviceStreamStore = new _deviceStreamStore.FcrDeviceStreamStore({
|
|
295
322
|
mediaControl: this._engine.getDesktopMediaControl(),
|
|
296
|
-
roomControl: this.
|
|
323
|
+
roomControl: this._mainRoomControl,
|
|
297
324
|
securityStore: securityStore,
|
|
298
325
|
deviceStore: deviceStore,
|
|
299
326
|
uiEventStore: uiEventStore
|
|
300
327
|
});
|
|
301
328
|
this._deviceStreamStore = deviceStreamStore;
|
|
302
|
-
this._layoutModule = new _layout.LayoutUIModule({
|
|
303
|
-
deviceStore: deviceStore,
|
|
304
|
-
uiEventStore: uiEventStore,
|
|
305
|
-
mediaControl: this._engine.getDesktopMediaControl(),
|
|
306
|
-
userControl: this._roomControl.getUserControl(),
|
|
307
|
-
streamControl: this._roomControl.getStreamControl(),
|
|
308
|
-
securityStore: securityStore,
|
|
309
|
-
chatRoomControl: this._roomControl.getChatRoomControl(),
|
|
310
|
-
whiteBoardControl: this._roomControl.getBoardControl()
|
|
311
|
-
});
|
|
312
329
|
this._chatModule = new _chat.ChatUIModule({
|
|
313
|
-
roomControl: this.
|
|
330
|
+
roomControl: this._mainRoomControl,
|
|
314
331
|
uiEventStore: uiEventStore,
|
|
315
332
|
securityStore: securityStore
|
|
316
333
|
});
|
|
317
334
|
this._actionBarUIModule = new _actionBar.FcrActionBarUIModule({
|
|
318
|
-
roomControl: this.
|
|
319
|
-
userControl: this.
|
|
335
|
+
roomControl: this._mainRoomControl,
|
|
336
|
+
userControl: this._mainRoomControl.getUserControl(),
|
|
320
337
|
uiEventStore: uiEventStore,
|
|
321
338
|
securityStore: securityStore,
|
|
322
|
-
streamControl: this.
|
|
339
|
+
streamControl: this._mainRoomControl.getStreamControl(),
|
|
323
340
|
deviceStore: deviceStore,
|
|
324
341
|
deviceStreamStore: deviceStreamStore,
|
|
325
342
|
mediaControl: this._engine.getDesktopMediaControl()
|
|
326
343
|
});
|
|
327
344
|
this._audioStreamUIModule = new _audioStream.AudioStreamUIModule({
|
|
328
|
-
streamControl: this.
|
|
329
|
-
userControl: this.
|
|
345
|
+
streamControl: this._mainRoomControl.getStreamControl(),
|
|
346
|
+
userControl: this._mainRoomControl.getUserControl(),
|
|
330
347
|
deviceStreamStore: deviceStreamStore
|
|
331
348
|
});
|
|
332
349
|
this._dialogModule = new _dialog.DialogUIModule({
|
|
333
350
|
uiEventStore: uiEventStore,
|
|
334
|
-
userInfo: this.
|
|
351
|
+
userInfo: this._mainRoomControl.getUserControl().getLocalUser(),
|
|
335
352
|
securityStore: securityStore,
|
|
336
|
-
userControl: this.
|
|
337
|
-
chatRoomControl: this.
|
|
353
|
+
userControl: this._mainRoomControl.getUserControl(),
|
|
354
|
+
chatRoomControl: this._mainRoomControl.getChatRoomControl(),
|
|
338
355
|
deviceStore: deviceStore,
|
|
339
|
-
streamControl: this.
|
|
356
|
+
streamControl: this._mainRoomControl.getStreamControl()
|
|
340
357
|
});
|
|
341
358
|
this._settingUIModule = new _setting.SettingUIModule({
|
|
342
359
|
mediaControl: this._engine.getDesktopMediaControl(),
|
|
@@ -344,11 +361,11 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
|
|
|
344
361
|
uiEventStore: uiEventStore,
|
|
345
362
|
deviceStore: deviceStore,
|
|
346
363
|
monitorControl: this._engine.getMonitorControl(),
|
|
347
|
-
streamControl: this.
|
|
348
|
-
roomControl: this.
|
|
364
|
+
streamControl: this._mainRoomControl.getStreamControl(),
|
|
365
|
+
roomControl: this._mainRoomControl
|
|
349
366
|
});
|
|
350
367
|
this._stateBarUIModule = new _stateBar.StateBarUIModule({
|
|
351
|
-
roomControl: this.
|
|
368
|
+
roomControl: this._mainRoomControl,
|
|
352
369
|
uiEventStore: uiEventStore,
|
|
353
370
|
securityStore: securityStore,
|
|
354
371
|
config: this._sceneConfig
|
|
@@ -356,8 +373,12 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
|
|
|
356
373
|
this._eventToastUIModule = new _eventToast.EventToastUIModule({
|
|
357
374
|
uiEventStore: uiEventStore
|
|
358
375
|
});
|
|
376
|
+
this._eventNotificationUIModule = new _eventNotification.EventNotificationUIModule({
|
|
377
|
+
uiEventStore: uiEventStore,
|
|
378
|
+
privilegeControl: this._mainRoomControl.getPrivilegeControl()
|
|
379
|
+
});
|
|
359
380
|
this._participantsModule = new _participant.ParticipantUIModule({
|
|
360
|
-
roomControl: this.
|
|
381
|
+
roomControl: this._mainRoomControl,
|
|
361
382
|
engine: this._engine,
|
|
362
383
|
peerSessionControl: this._engine.getPeerSessionControl(),
|
|
363
384
|
securityStore: securityStore,
|
|
@@ -366,83 +387,85 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
|
|
|
366
387
|
deviceStreamStore: deviceStreamStore
|
|
367
388
|
});
|
|
368
389
|
this._shareScreenModule = new _shareScreen.ShareScreenUIModule({
|
|
369
|
-
roomControl: this.
|
|
390
|
+
roomControl: this._mainRoomControl,
|
|
370
391
|
mediaControl: this._engine.getDesktopMediaControl(),
|
|
371
392
|
deviceStore: deviceStore,
|
|
372
393
|
deviceStreamStore: deviceStreamStore,
|
|
373
394
|
securityStore: securityStore,
|
|
374
|
-
uiEventStore: uiEventStore
|
|
395
|
+
uiEventStore: uiEventStore,
|
|
396
|
+
config: this._sceneConfig
|
|
375
397
|
});
|
|
376
398
|
this._liveStreamingUIModule = new _liveStreaming.LiveStreamingUIModule({
|
|
377
|
-
roomControl: this.
|
|
399
|
+
roomControl: this._mainRoomControl,
|
|
378
400
|
uiEventStore: uiEventStore
|
|
379
401
|
});
|
|
380
402
|
this._videoWindowModule = new _videoWindow.VideoWindowUIModule({
|
|
381
403
|
uiEventStore: uiEventStore,
|
|
382
404
|
mediaControl: this._engine.getDesktopMediaControl(),
|
|
383
|
-
userControl: this.
|
|
384
|
-
streamControl: this.
|
|
405
|
+
userControl: this._mainRoomControl.getUserControl(),
|
|
406
|
+
streamControl: this._mainRoomControl.getStreamControl(),
|
|
385
407
|
securityStore: securityStore,
|
|
386
408
|
deviceStore: deviceStore,
|
|
387
409
|
deviceStreamStore: deviceStreamStore
|
|
388
410
|
});
|
|
389
411
|
this._connectionGatewayUIModule = new _connectionGateway.ConnectionGatewayUIModule({
|
|
390
|
-
roomControl: this.
|
|
412
|
+
roomControl: this._mainRoomControl,
|
|
391
413
|
uiEventStore: uiEventStore,
|
|
392
|
-
deviceStore: this._deviceStore
|
|
414
|
+
deviceStore: this._deviceStore,
|
|
415
|
+
mediaControl: this._engine.getDesktopMediaControl()
|
|
393
416
|
});
|
|
394
417
|
this._inviteUIModule = new _invite.InviteUIModule({
|
|
395
|
-
roomControl: this.
|
|
418
|
+
roomControl: this._mainRoomControl,
|
|
396
419
|
uiEventStore: uiEventStore
|
|
397
420
|
});
|
|
398
421
|
this._whiteBoradUIModule = new _whiteboard.FcrWhiteboardUIModule({
|
|
399
|
-
roomControl: this.
|
|
422
|
+
roomControl: this._mainRoomControl,
|
|
400
423
|
uiEventStore: uiEventStore,
|
|
401
|
-
userControl: this.
|
|
402
|
-
whiteboardControl: this.
|
|
403
|
-
streamControl: this.
|
|
424
|
+
userControl: this._mainRoomControl.getUserControl(),
|
|
425
|
+
whiteboardControl: this._mainRoomControl.getBoardControl(),
|
|
426
|
+
streamControl: this._mainRoomControl.getStreamControl(),
|
|
404
427
|
securityStore: securityStore
|
|
405
428
|
});
|
|
406
429
|
this._dialogModule.addDialogs([{
|
|
407
430
|
key: _constant.DialogKey.DEVICE_SETTINGS,
|
|
408
431
|
component: function component() {
|
|
409
|
-
var
|
|
432
|
+
var _this4$_settingUIModu;
|
|
410
433
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_deviceSetting["default"], {
|
|
411
|
-
children: (
|
|
434
|
+
children: (_this4$_settingUIModu = _this4._settingUIModule) === null || _this4$_settingUIModu === void 0 ? void 0 : _this4$_settingUIModu.getComponent()
|
|
412
435
|
}, "DeviceSettingDialog");
|
|
413
436
|
}
|
|
414
437
|
}, {
|
|
415
438
|
key: _constant.DialogKey.PARTICIPANT,
|
|
416
439
|
component: function component() {
|
|
417
|
-
var
|
|
440
|
+
var _this4$_participantsM;
|
|
418
441
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_participant2.ParticipantDialog, {
|
|
419
|
-
children: (
|
|
442
|
+
children: (_this4$_participantsM = _this4._participantsModule) === null || _this4$_participantsM === void 0 ? void 0 : _this4$_participantsM.getComponent()
|
|
420
443
|
}, "ParticipantDialog");
|
|
421
444
|
}
|
|
422
445
|
}, {
|
|
423
446
|
key: _constant.DialogKey.LIVE_STREAMING,
|
|
424
447
|
component: function component() {
|
|
425
|
-
var
|
|
448
|
+
var _this4$_liveStreaming;
|
|
426
449
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_dialogs.LiveStreamingDialog, {
|
|
427
450
|
title: "Push the meeting to the specified live platform",
|
|
428
|
-
children: (
|
|
451
|
+
children: (_this4$_liveStreaming = _this4._liveStreamingUIModule) === null || _this4$_liveStreaming === void 0 ? void 0 : _this4$_liveStreaming.getComponent()
|
|
429
452
|
}, "LiveStreamingDialog");
|
|
430
453
|
}
|
|
431
454
|
}, {
|
|
432
455
|
key: _constant.DialogKey.INVITE,
|
|
433
456
|
component: function component() {
|
|
434
|
-
var
|
|
457
|
+
var _this4$_inviteUIModul;
|
|
435
458
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_dialogs.InviteDialog, {
|
|
436
|
-
children: (
|
|
459
|
+
children: (_this4$_inviteUIModul = _this4._inviteUIModule) === null || _this4$_inviteUIModul === void 0 ? void 0 : _this4$_inviteUIModul.getComponent()
|
|
437
460
|
}, "InviteDialog");
|
|
438
461
|
}
|
|
439
462
|
}, {
|
|
440
463
|
key: _constant.DialogKey.CHAT,
|
|
441
464
|
component: function component() {
|
|
442
|
-
var
|
|
465
|
+
var _this4$_chatModule, _this4$_chatModule2;
|
|
443
466
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_chat2.ChatDialog, {
|
|
444
|
-
chatAction: (
|
|
445
|
-
children: (
|
|
467
|
+
chatAction: (_this4$_chatModule = _this4._chatModule) === null || _this4$_chatModule === void 0 ? void 0 : _this4$_chatModule.getActionsComponent(),
|
|
468
|
+
children: (_this4$_chatModule2 = _this4._chatModule) === null || _this4$_chatModule2 === void 0 ? void 0 : _this4$_chatModule2.getComponent({
|
|
446
469
|
singling: true
|
|
447
470
|
})
|
|
448
471
|
}, "ChatDialog");
|
|
@@ -466,51 +489,87 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
|
|
|
466
489
|
}, {
|
|
467
490
|
key: _constant.DialogKey.VIDEO_WINDOW,
|
|
468
491
|
component: function component() {
|
|
469
|
-
var
|
|
492
|
+
var _this4$_videoWindowMo;
|
|
470
493
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_dialogs.VideoWindowDialog, {
|
|
471
|
-
children: (
|
|
494
|
+
children: (_this4$_videoWindowMo = _this4._videoWindowModule) === null || _this4$_videoWindowMo === void 0 ? void 0 : _this4$_videoWindowMo.getComponent()
|
|
472
495
|
}, "VideoWindowDialog");
|
|
473
496
|
}
|
|
474
497
|
}, {
|
|
475
498
|
key: _constant.DialogKey.CONNECTION_GATEWAY,
|
|
476
499
|
component: function component() {
|
|
477
|
-
var
|
|
500
|
+
var _this4$_connectionGat;
|
|
478
501
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_connectionGateway2.ConnectionGatewayDialog, {
|
|
479
|
-
children: (
|
|
502
|
+
children: (_this4$_connectionGat = _this4._connectionGatewayUIModule) === null || _this4$_connectionGat === void 0 ? void 0 : _this4$_connectionGat.getComponent()
|
|
480
503
|
}, "ConnectionGatewayDialog");
|
|
481
504
|
}
|
|
482
505
|
}, {
|
|
483
506
|
key: _constant.DialogKey.WHITEBOARD,
|
|
484
507
|
component: function component() {
|
|
485
|
-
return
|
|
486
|
-
module:
|
|
508
|
+
return _this4._whiteBoradUIModule ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_whiteboard2.WhiteboardElectronDialog, {
|
|
509
|
+
module: _this4._whiteBoradUIModule
|
|
487
510
|
}, "WhiteboardDialog") : /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {});
|
|
488
511
|
}
|
|
489
512
|
}, {
|
|
490
513
|
key: _constant.DialogKey.SHARE_SCREEN,
|
|
491
514
|
component: function component(params) {
|
|
492
|
-
var
|
|
515
|
+
var _this4$_shareScreenMo;
|
|
493
516
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_shareScreenSelection.ShareScreenSelectronDialog, {
|
|
494
517
|
params: params,
|
|
495
|
-
children: (
|
|
518
|
+
children: (_this4$_shareScreenMo = _this4._shareScreenModule) === null || _this4$_shareScreenMo === void 0 ? void 0 : _this4$_shareScreenMo.getSelectionComponent()
|
|
496
519
|
}, "ShareScreenSelection");
|
|
497
520
|
}
|
|
498
521
|
}, {
|
|
499
522
|
key: _constant.DialogKey.CONTROL_BAR,
|
|
500
523
|
component: function component() {
|
|
501
|
-
var
|
|
502
|
-
return (
|
|
524
|
+
var _this4$_shareScreenMo2;
|
|
525
|
+
return (_this4$_shareScreenMo2 = _this4._shareScreenModule) === null || _this4$_shareScreenMo2 === void 0 ? void 0 : _this4$_shareScreenMo2.getComponent();
|
|
526
|
+
}
|
|
527
|
+
}, {
|
|
528
|
+
key: _constant.DialogKey.WAITING_ROOM,
|
|
529
|
+
component: function component(params) {
|
|
530
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_operationWaitingRoom.OperationWaitingRoomDialog, {
|
|
531
|
+
params: params
|
|
532
|
+
}, 'WaitingRoom');
|
|
533
|
+
}
|
|
534
|
+
}, {
|
|
535
|
+
key: _constant.DialogKey.WAITING_ROOM_SINGLE_REMOVE,
|
|
536
|
+
component: function component(params) {
|
|
537
|
+
var _this4$_participantsM2;
|
|
538
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_removeAdmitWaitingRoom.RemoveAdmitWaitingRoomDialog, {
|
|
539
|
+
params: params,
|
|
540
|
+
children: (_this4$_participantsM2 = _this4._participantsModule) === null || _this4$_participantsM2 === void 0 ? void 0 : _this4$_participantsM2.getWaitingRoomDialog(params)
|
|
541
|
+
}, 'WaitingRoomSingleRemove');
|
|
542
|
+
}
|
|
543
|
+
}, {
|
|
544
|
+
key: _constant.DialogKey.WAITING_ROOM_ALL_REMOVE,
|
|
545
|
+
component: function component(params) {
|
|
546
|
+
var _this4$_participantsM3;
|
|
547
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_removeAdmitWaitingRoom.RemoveAdmitWaitingRoomDialog, {
|
|
548
|
+
params: params,
|
|
549
|
+
children: (_this4$_participantsM3 = _this4._participantsModule) === null || _this4$_participantsM3 === void 0 ? void 0 : _this4$_participantsM3.getWaitingRoomDialog(params)
|
|
550
|
+
}, 'WaitingRoomAllRemove');
|
|
551
|
+
}
|
|
552
|
+
}, {
|
|
553
|
+
key: _constant.DialogKey.WAITING_ROOM_ALL_ADMIT,
|
|
554
|
+
component: function component(params) {
|
|
555
|
+
var _this4$_participantsM4;
|
|
556
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_removeAdmitWaitingRoom.RemoveAdmitWaitingRoomDialog, {
|
|
557
|
+
params: params,
|
|
558
|
+
children: (_this4$_participantsM4 = _this4._participantsModule) === null || _this4$_participantsM4 === void 0 ? void 0 : _this4$_participantsM4.getWaitingRoomDialog(params)
|
|
559
|
+
}, 'WaitingRoomAllAdmit');
|
|
503
560
|
}
|
|
504
561
|
}]);
|
|
505
562
|
this._layoutModule = new _layout.LayoutUIModule({
|
|
506
563
|
deviceStore: this._deviceStore,
|
|
507
564
|
uiEventStore: uiEventStore,
|
|
508
565
|
mediaControl: this._engine.getDesktopMediaControl(),
|
|
509
|
-
userControl: this.
|
|
510
|
-
streamControl: this.
|
|
566
|
+
userControl: this._mainRoomControl.getUserControl(),
|
|
567
|
+
streamControl: this._mainRoomControl.getStreamControl(),
|
|
511
568
|
securityStore: securityStore,
|
|
512
|
-
chatRoomControl: this.
|
|
513
|
-
whiteBoardControl: this.
|
|
569
|
+
chatRoomControl: this._mainRoomControl.getChatRoomControl(),
|
|
570
|
+
whiteBoardControl: this._mainRoomControl.getBoardControl(),
|
|
571
|
+
privilegeControl: this._mainRoomControl.getPrivilegeControl(),
|
|
572
|
+
roomControl: this._mainRoomControl
|
|
514
573
|
});
|
|
515
574
|
var layoutComponent = this._layoutModule.getComponent({
|
|
516
575
|
chat: this._chatModule.getComponent(),
|
|
@@ -518,20 +577,20 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
|
|
|
518
577
|
participant: this._participantsModule.getComponent(),
|
|
519
578
|
actionBar: this._actionBarUIModule.getComponent(),
|
|
520
579
|
stateBar: this._stateBarUIModule.getComponent(),
|
|
521
|
-
layers: [this._dialogModule.getComponent(), this._eventToastUIModule.getComponent()],
|
|
580
|
+
layers: [this._dialogModule.getComponent(), this._eventToastUIModule.getComponent(), this._eventNotificationUIModule.getComponent()],
|
|
522
581
|
whiteboard: this._whiteBoradUIModule.getComponent()
|
|
523
582
|
});
|
|
524
583
|
this._eventObserver = {
|
|
525
584
|
onEvent: function onEvent(action, payload) {
|
|
526
585
|
if (action === _constant.UIAction.EXIT_ROOM) {
|
|
527
|
-
|
|
586
|
+
_this4._observable.notifyObservers('onExited', _this4._sceneConfig.roomId, payload.reason, _this4._mainRoomControl);
|
|
528
587
|
}
|
|
529
588
|
}
|
|
530
589
|
};
|
|
531
590
|
this._engineObserver = {
|
|
532
591
|
onConnectionStateUpdated: function onConnectionStateUpdated(state) {
|
|
533
592
|
if (state === _agoraEduCore.FcrConnectionState.ABORTED) {
|
|
534
|
-
|
|
593
|
+
_this4._observable.notifyObservers('onExited', _this4._sceneConfig.roomId, _type.FcrUIExitReason.ABORTED);
|
|
535
594
|
}
|
|
536
595
|
if (state === _agoraEduCore.FcrConnectionState.CONNECTED) {
|
|
537
596
|
uiEventStore.sendEvent(_constant.UIAction.ENGINE_RECONNECTED);
|
|
@@ -540,24 +599,90 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
|
|
|
540
599
|
};
|
|
541
600
|
this._userObserver = {
|
|
542
601
|
onLocalUserKickedOut: function onLocalUserKickedOut(roomId) {
|
|
543
|
-
|
|
602
|
+
_dialog2.FcrDialogApi.open({
|
|
603
|
+
id: 'login-confirm-dialog-kick-out',
|
|
604
|
+
dialogProps: {
|
|
605
|
+
content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_loginConfirmDialog.LoginConfirmDialog, {
|
|
606
|
+
title: (0, _i18n.transI18n)('fmt_popup_button_leavemeeting'),
|
|
607
|
+
desc: (0, _i18n.transI18n)('fmt_leave_tips_removetip'),
|
|
608
|
+
btnTxt: (0, _i18n.transI18n)('fmt_waitingroom_attendie_popup_button_gotit'),
|
|
609
|
+
id: "login-confirm-dialog-kick-out",
|
|
610
|
+
onConfirm: function onConfirm() {
|
|
611
|
+
_this4._observable.notifyObservers('onExited', roomId, _type.FcrUIExitReason.KICKED_OUT);
|
|
612
|
+
}
|
|
613
|
+
}),
|
|
614
|
+
width: 360,
|
|
615
|
+
closable: false,
|
|
616
|
+
rootClassName: 'login-confirm-dialog'
|
|
617
|
+
}
|
|
618
|
+
});
|
|
619
|
+
},
|
|
620
|
+
onUserInfoUpdated: function onUserInfoUpdated(roomId, event) {
|
|
621
|
+
// 权限变更的时候
|
|
622
|
+
if (_this4._mainRoomControl && event.modifiedUser.userId === _this4._mainRoomControl.getUserControl().getLocalUser().userId) {
|
|
623
|
+
_this4._sceneConfig.userRole = event.modifiedUser.userRole;
|
|
624
|
+
_this4._judgeWaitingRoomPremissionAndCreateRoomControl();
|
|
625
|
+
}
|
|
544
626
|
}
|
|
545
627
|
};
|
|
546
628
|
this._roomObserver = {
|
|
629
|
+
onLocalUserMovedToWaitingRoom: function () {
|
|
630
|
+
var _onLocalUserMovedToWaitingRoom = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(roomId, event) {
|
|
631
|
+
var _this4$_mainRoomContr, info, enable, room;
|
|
632
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
633
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
634
|
+
case 0:
|
|
635
|
+
if (!_this4._mainRoomControl) {
|
|
636
|
+
_context3.next = 14;
|
|
637
|
+
break;
|
|
638
|
+
}
|
|
639
|
+
_this4$_mainRoomContr = _this4._mainRoomControl.getPrivilegeControl().getSecurityInfo(_type7.FcrSecurityAction.WaitingRoom), info = _this4$_mainRoomContr.info, enable = _this4$_mainRoomContr.enable;
|
|
640
|
+
_context3.next = 4;
|
|
641
|
+
return _this4._mainRoomControl.leave();
|
|
642
|
+
case 4:
|
|
643
|
+
_this4._mainRoomControl.removeObserver(_this4._roomObserver);
|
|
644
|
+
if (!info) {
|
|
645
|
+
_context3.next = 14;
|
|
646
|
+
break;
|
|
647
|
+
}
|
|
648
|
+
_context3.next = 8;
|
|
649
|
+
return _this4._createRoomControl(info.payload.roomUuid);
|
|
650
|
+
case 8:
|
|
651
|
+
room = _context3.sent;
|
|
652
|
+
_this4._waitingRoomControl = room;
|
|
653
|
+
// @ts-ignore
|
|
654
|
+
window.__waitingRoom_control = room;
|
|
655
|
+
_reactDom["default"].unmountComponentAtNode(dom);
|
|
656
|
+
_this4._uiEventStore.showToast({
|
|
657
|
+
type: 'error',
|
|
658
|
+
message: (0, _i18n.transI18n)('fmt_waitingroom_attendie_overview_label__toast_move_to_waitingroom')
|
|
659
|
+
});
|
|
660
|
+
_this4._renderWaitingRoomUi(dom);
|
|
661
|
+
case 14:
|
|
662
|
+
case "end":
|
|
663
|
+
return _context3.stop();
|
|
664
|
+
}
|
|
665
|
+
}, _callee3);
|
|
666
|
+
}));
|
|
667
|
+
function onLocalUserMovedToWaitingRoom(_x, _x2) {
|
|
668
|
+
return _onLocalUserMovedToWaitingRoom.apply(this, arguments);
|
|
669
|
+
}
|
|
670
|
+
return onLocalUserMovedToWaitingRoom;
|
|
671
|
+
}(),
|
|
547
672
|
onRoomStateUpdated: function onRoomStateUpdated(roomId, state) {
|
|
548
673
|
if (state === _type2.FcrRoomState.Closed) {
|
|
549
|
-
|
|
674
|
+
_this4._observable.notifyObservers('onExited', roomId, _type.FcrUIExitReason.CLOSE_ROOM);
|
|
550
675
|
}
|
|
551
676
|
}
|
|
552
677
|
};
|
|
553
678
|
uiEventStore.addObserver(this._eventObserver);
|
|
554
679
|
this._engine.addObserver(this._engineObserver);
|
|
555
|
-
this.
|
|
556
|
-
this.
|
|
680
|
+
this._mainRoomControl.addObserver(this._roomObserver);
|
|
681
|
+
this._mainRoomControl.getUserControl().addObserver(this._userObserver);
|
|
557
682
|
_reactDom["default"].render(/*#__PURE__*/(0, _jsxRuntime.jsx)(_videoTrackRenderContext.FcrVideoTrackRenderContext.Provider, {
|
|
558
683
|
value: {
|
|
559
684
|
deviceStore: this._deviceStore,
|
|
560
|
-
streamControl: this.
|
|
685
|
+
streamControl: this._mainRoomControl.getStreamControl()
|
|
561
686
|
},
|
|
562
687
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
563
688
|
style: {
|
|
@@ -568,5 +693,317 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
|
|
|
568
693
|
})
|
|
569
694
|
}), dom);
|
|
570
695
|
}
|
|
696
|
+
}, {
|
|
697
|
+
key: "_renderWaitingRoomUi",
|
|
698
|
+
value: function _renderWaitingRoomUi(dom) {
|
|
699
|
+
var _this5 = this;
|
|
700
|
+
var deviceStore = this._deviceStore;
|
|
701
|
+
if (this._waitingRoomControl) {
|
|
702
|
+
this._waitingRoomLayoutModule = new _waitingRoomLayout.WaitingRoomLayout({
|
|
703
|
+
deviceStore: deviceStore,
|
|
704
|
+
userControl: this._waitingRoomControl.getUserControl()
|
|
705
|
+
});
|
|
706
|
+
var uiEventStore = this._uiEventStore;
|
|
707
|
+
this._eventObserver = {
|
|
708
|
+
onEvent: function onEvent(action, payload) {
|
|
709
|
+
if (action === _constant.UIAction.EXIT_ROOM) {
|
|
710
|
+
_this5._observable.notifyObservers('onExited', _this5._sceneConfig.roomId, payload.reason, _this5._waitingRoomControl);
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
};
|
|
714
|
+
uiEventStore.addObserver(this._eventObserver);
|
|
715
|
+
var securityStore = new _securityStore.FcrSecurityStore(this._waitingRoomControl.getPrivilegeControl(), this._waitingRoomControl.getUserControl(), this._waitingRoomControl.getStreamControl(), this._waitingRoomControl.getRoomSessionControl(), uiEventStore);
|
|
716
|
+
var deviceStreamStore = new _deviceStreamStore.FcrDeviceStreamStore({
|
|
717
|
+
mediaControl: this._engine.getDesktopMediaControl(),
|
|
718
|
+
roomControl: this._waitingRoomControl,
|
|
719
|
+
securityStore: securityStore,
|
|
720
|
+
deviceStore: deviceStore,
|
|
721
|
+
uiEventStore: uiEventStore
|
|
722
|
+
});
|
|
723
|
+
this._stateBarUIModule = new _stateBar.StateBarUIModule({
|
|
724
|
+
roomControl: this._waitingRoomControl,
|
|
725
|
+
uiEventStore: uiEventStore,
|
|
726
|
+
securityStore: securityStore,
|
|
727
|
+
config: this._sceneConfig
|
|
728
|
+
});
|
|
729
|
+
this._actionBarUIModule = new _actionBar.FcrActionBarUIModule({
|
|
730
|
+
roomControl: this._waitingRoomControl,
|
|
731
|
+
userControl: this._waitingRoomControl.getUserControl(),
|
|
732
|
+
uiEventStore: uiEventStore,
|
|
733
|
+
securityStore: securityStore,
|
|
734
|
+
streamControl: this._waitingRoomControl.getStreamControl(),
|
|
735
|
+
deviceStore: deviceStore,
|
|
736
|
+
deviceStreamStore: deviceStreamStore,
|
|
737
|
+
mediaControl: this._engine.getDesktopMediaControl()
|
|
738
|
+
});
|
|
739
|
+
this._chatModule = new _chat.ChatUIModule({
|
|
740
|
+
roomControl: this._waitingRoomControl,
|
|
741
|
+
uiEventStore: uiEventStore,
|
|
742
|
+
securityStore: securityStore
|
|
743
|
+
});
|
|
744
|
+
var layoutComponent = this._waitingRoomLayoutModule.getComponent({
|
|
745
|
+
chat: this._chatModule.getComponent(),
|
|
746
|
+
stateBar: this._stateBarUIModule.getComponent(),
|
|
747
|
+
actionBar: this._actionBarUIModule.getComponent()
|
|
748
|
+
});
|
|
749
|
+
this._roomObserver = {
|
|
750
|
+
onLocalUserMovedToMainRoom: function () {
|
|
751
|
+
var _onLocalUserMovedToMainRoom = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5(roomId, event) {
|
|
752
|
+
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
753
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
754
|
+
case 0:
|
|
755
|
+
_dialog2.FcrDialogApi.open({
|
|
756
|
+
id: 'login-confirm-dialog-move-mainroom',
|
|
757
|
+
dialogProps: {
|
|
758
|
+
content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_loginConfirmDialog.LoginConfirmDialog, {
|
|
759
|
+
title: (0, _i18n.transI18n)('fmt_waitingroom_mobile_notice_popup_label_about_join'),
|
|
760
|
+
desc: (0, _i18n.transI18n)('fmt_waitingroom_mobile_notice_popup_label_quick_join'),
|
|
761
|
+
id: "login-confirm-dialog-move-mainroom",
|
|
762
|
+
btnTxt: (0, _i18n.transI18n)('fmt_waitingroom_mobile_notice_popup_button_join_now_no_count'),
|
|
763
|
+
isShowCoutDown: true,
|
|
764
|
+
showImg: false,
|
|
765
|
+
onConfirm: /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
|
766
|
+
var room;
|
|
767
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
768
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
769
|
+
case 0:
|
|
770
|
+
if (!_this5._waitingRoomControl) {
|
|
771
|
+
_context4.next = 10;
|
|
772
|
+
break;
|
|
773
|
+
}
|
|
774
|
+
_context4.next = 3;
|
|
775
|
+
return _this5._waitingRoomControl.leave();
|
|
776
|
+
case 3:
|
|
777
|
+
room = _this5._engine.createMainRoomControl(roomId.split('-')[0]);
|
|
778
|
+
_context4.next = 6;
|
|
779
|
+
return room.joinWithTicket(_objectSpread(_objectSpread({}, _this5._getJoinRoomOption()), {}, {
|
|
780
|
+
ticket: (0, _lodash.get)(event.changedProperties, 'security.ticket')
|
|
781
|
+
}));
|
|
782
|
+
case 6:
|
|
783
|
+
_this5._mainRoomControl = room;
|
|
784
|
+
// @ts-ignore
|
|
785
|
+
window.__mainRoom_control = room;
|
|
786
|
+
_reactDom["default"].unmountComponentAtNode(dom);
|
|
787
|
+
_this5._renderRoomUi(dom);
|
|
788
|
+
case 10:
|
|
789
|
+
case "end":
|
|
790
|
+
return _context4.stop();
|
|
791
|
+
}
|
|
792
|
+
}, _callee4);
|
|
793
|
+
}))
|
|
794
|
+
}),
|
|
795
|
+
width: 360,
|
|
796
|
+
closable: false,
|
|
797
|
+
rootClassName: 'login-confirm-dialog'
|
|
798
|
+
}
|
|
799
|
+
});
|
|
800
|
+
case 1:
|
|
801
|
+
case "end":
|
|
802
|
+
return _context5.stop();
|
|
803
|
+
}
|
|
804
|
+
}, _callee5);
|
|
805
|
+
}));
|
|
806
|
+
function onLocalUserMovedToMainRoom(_x3, _x4) {
|
|
807
|
+
return _onLocalUserMovedToMainRoom.apply(this, arguments);
|
|
808
|
+
}
|
|
809
|
+
return onLocalUserMovedToMainRoom;
|
|
810
|
+
}(),
|
|
811
|
+
onRoomStateUpdated: function onRoomStateUpdated(roomId, state) {
|
|
812
|
+
if (state === _type2.FcrRoomState.Closed) {
|
|
813
|
+
_this5._observable.notifyObservers('onExited', roomId, _type.FcrUIExitReason.CLOSE_ROOM);
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
};
|
|
817
|
+
this._waitingRoomUserObserver = {
|
|
818
|
+
onLocalUserKickedOut: function onLocalUserKickedOut(roomId) {
|
|
819
|
+
_dialog2.FcrDialogApi.open({
|
|
820
|
+
id: 'login-confirm-dialog-kick-out',
|
|
821
|
+
dialogProps: {
|
|
822
|
+
content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_loginConfirmDialog.LoginConfirmDialog, {
|
|
823
|
+
title: (0, _i18n.transI18n)('fmt_popup_button_leavemeeting'),
|
|
824
|
+
desc: (0, _i18n.transI18n)('fmt_leave_tips_removetip'),
|
|
825
|
+
id: "login-confirm-dialog-kick-out",
|
|
826
|
+
btnTxt: (0, _i18n.transI18n)('fmt_waitingroom_attendie_popup_button_gotit'),
|
|
827
|
+
onConfirm: function onConfirm() {
|
|
828
|
+
_this5._observable.notifyObservers('onExited', roomId, _type.FcrUIExitReason.KICKED_OUT);
|
|
829
|
+
}
|
|
830
|
+
}),
|
|
831
|
+
width: 360,
|
|
832
|
+
closable: false,
|
|
833
|
+
rootClassName: 'login-confirm-dialog'
|
|
834
|
+
}
|
|
835
|
+
});
|
|
836
|
+
}
|
|
837
|
+
};
|
|
838
|
+
this._waitingRoomControl.addObserver(this._roomObserver);
|
|
839
|
+
this._waitingRoomControl.getUserControl().addObserver(this._waitingRoomUserObserver);
|
|
840
|
+
_reactDom["default"].render(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
841
|
+
style: {
|
|
842
|
+
width: '100vw',
|
|
843
|
+
height: '100vh'
|
|
844
|
+
},
|
|
845
|
+
children: layoutComponent
|
|
846
|
+
}), dom);
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
}, {
|
|
850
|
+
key: "_getJoinRoomOption",
|
|
851
|
+
value: function _getJoinRoomOption() {
|
|
852
|
+
var config = this._sceneConfig;
|
|
853
|
+
var streams = [{
|
|
854
|
+
videoSourceState: this._deviceStore.cameraEnabled ? _type3.AgoraRtcMediaSourceState.STARTED : _type3.AgoraRtcMediaSourceState.STOPPED,
|
|
855
|
+
audioSourceState: this._deviceStore.microphoneEnabled ? _type3.AgoraRtcMediaSourceState.STARTED : _type3.AgoraRtcMediaSourceState.STOPPED,
|
|
856
|
+
videoSourceId: this._deviceStore.currentDeviceId.cameraDeviceId,
|
|
857
|
+
audioSourceId: this._deviceStore.currentDeviceId.microphoneDeviceId,
|
|
858
|
+
streamName: 'default',
|
|
859
|
+
streamType: _type4.AgoraRteMediaStreamType.BOTH,
|
|
860
|
+
videoSourceType: _type5.AgoraRteVideoSourceType.CAMERA,
|
|
861
|
+
audioSourceType: _type5.AgoraRteAudioSourceType.MICROPHONE
|
|
862
|
+
}];
|
|
863
|
+
if (config.userRole === _type2.FcrUserRole.ROBOT) {
|
|
864
|
+
streams = [];
|
|
865
|
+
}
|
|
866
|
+
return {
|
|
867
|
+
userName: config.userName,
|
|
868
|
+
userRole: config.userRole,
|
|
869
|
+
userProperties: config.userProperties,
|
|
870
|
+
streamLatency: _agoraEduCore.FcrStreamLatencyLevel.ULTRA_LOW,
|
|
871
|
+
createStreamConfigs: streams,
|
|
872
|
+
roomToken: config.roomToken,
|
|
873
|
+
password: config.password
|
|
874
|
+
};
|
|
875
|
+
}
|
|
876
|
+
}, {
|
|
877
|
+
key: "_createRoomControl",
|
|
878
|
+
value: function () {
|
|
879
|
+
var _createRoomControl2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7(roomId) {
|
|
880
|
+
var _this6 = this;
|
|
881
|
+
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
882
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
883
|
+
case 0:
|
|
884
|
+
return _context7.abrupt("return", new Promise(/*#__PURE__*/function () {
|
|
885
|
+
var _ref4 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6(resolve, reject) {
|
|
886
|
+
var engine, room;
|
|
887
|
+
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
888
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
889
|
+
case 0:
|
|
890
|
+
engine = _this6._engine;
|
|
891
|
+
if (engine) {
|
|
892
|
+
_context6.next = 3;
|
|
893
|
+
break;
|
|
894
|
+
}
|
|
895
|
+
return _context6.abrupt("return");
|
|
896
|
+
case 3:
|
|
897
|
+
_context6.prev = 3;
|
|
898
|
+
_context6.next = 6;
|
|
899
|
+
return engine.createRoomControlAndJoin(roomId, _this6._getJoinRoomOption());
|
|
900
|
+
case 6:
|
|
901
|
+
room = _context6.sent;
|
|
902
|
+
resolve(room);
|
|
903
|
+
_context6.next = 14;
|
|
904
|
+
break;
|
|
905
|
+
case 10:
|
|
906
|
+
_context6.prev = 10;
|
|
907
|
+
_context6.t0 = _context6["catch"](3);
|
|
908
|
+
if (_context6.t0.code === '730403100') {
|
|
909
|
+
_dialog2.FcrDialogApi.open({
|
|
910
|
+
id: 'login-confirm-dialog-error',
|
|
911
|
+
dialogProps: {
|
|
912
|
+
content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_loginConfirmDialog.LoginConfirmDialog, {
|
|
913
|
+
desc: (0, _i18n.transI18n)('fmt_waitingroom_attendie_popup_label_removed'),
|
|
914
|
+
id: "login-confirm-dialog-error",
|
|
915
|
+
btnTxt: (0, _i18n.transI18n)('fmt_waitingroom_attendie_popup_button_gotit')
|
|
916
|
+
}),
|
|
917
|
+
width: 360,
|
|
918
|
+
closable: false,
|
|
919
|
+
rootClassName: 'login-confirm-dialog'
|
|
920
|
+
}
|
|
921
|
+
});
|
|
922
|
+
}
|
|
923
|
+
reject(_context6.t0);
|
|
924
|
+
case 14:
|
|
925
|
+
case "end":
|
|
926
|
+
return _context6.stop();
|
|
927
|
+
}
|
|
928
|
+
}, _callee6, null, [[3, 10]]);
|
|
929
|
+
}));
|
|
930
|
+
return function (_x6, _x7) {
|
|
931
|
+
return _ref4.apply(this, arguments);
|
|
932
|
+
};
|
|
933
|
+
}()));
|
|
934
|
+
case 1:
|
|
935
|
+
case "end":
|
|
936
|
+
return _context7.stop();
|
|
937
|
+
}
|
|
938
|
+
}, _callee7);
|
|
939
|
+
}));
|
|
940
|
+
function _createRoomControl(_x5) {
|
|
941
|
+
return _createRoomControl2.apply(this, arguments);
|
|
942
|
+
}
|
|
943
|
+
return _createRoomControl;
|
|
944
|
+
}()
|
|
945
|
+
}, {
|
|
946
|
+
key: "_judgeWaitingRoomPremissionAndCreateRoomControl",
|
|
947
|
+
value: function () {
|
|
948
|
+
var _judgeWaitingRoomPremissionAndCreateRoomControl2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8() {
|
|
949
|
+
var _this$_mainRoomContro, info, isWaitingRoomManager, waitingRoomId, room, securityStore;
|
|
950
|
+
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
|
951
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
952
|
+
case 0:
|
|
953
|
+
if (this._mainRoomControl) {
|
|
954
|
+
_context8.next = 2;
|
|
955
|
+
break;
|
|
956
|
+
}
|
|
957
|
+
return _context8.abrupt("return");
|
|
958
|
+
case 2:
|
|
959
|
+
_this$_mainRoomContro = this._mainRoomControl.getPrivilegeControl().getSecurityInfo(_type7.FcrSecurityAction.WaitingRoom), info = _this$_mainRoomContro.info;
|
|
960
|
+
isWaitingRoomManager = this._mainRoomControl.getPrivilegeControl().getLocalUserPermissionInfo(_type7.FcrPermissionAction.WaitingRoomOpen).enable;
|
|
961
|
+
if (!isWaitingRoomManager) {
|
|
962
|
+
_context8.next = 16;
|
|
963
|
+
break;
|
|
964
|
+
}
|
|
965
|
+
if (!info) {
|
|
966
|
+
_context8.next = 14;
|
|
967
|
+
break;
|
|
968
|
+
}
|
|
969
|
+
waitingRoomId = info.payload.roomUuid;
|
|
970
|
+
room = this._engine.createWaitingRoomControl(waitingRoomId);
|
|
971
|
+
_context8.next = 10;
|
|
972
|
+
return room.join(this._getJoinRoomOption());
|
|
973
|
+
case 10:
|
|
974
|
+
this._waitingRoomControl = room;
|
|
975
|
+
// @ts-ignore
|
|
976
|
+
window.__waitingRoom_control = room;
|
|
977
|
+
securityStore = new _securityStore.FcrSecurityStore(this._waitingRoomControl.getPrivilegeControl(), this._waitingRoomControl.getUserControl(), this._waitingRoomControl.getStreamControl(), this._waitingRoomControl.getRoomSessionControl(), this._uiEventStore);
|
|
978
|
+
this._uiEventStore.sendEvent(_constant.UIAction.WAITING_ROOM_CREATED, {
|
|
979
|
+
room: room,
|
|
980
|
+
securityStore: securityStore
|
|
981
|
+
});
|
|
982
|
+
case 14:
|
|
983
|
+
_context8.next = 17;
|
|
984
|
+
break;
|
|
985
|
+
case 16:
|
|
986
|
+
this._destroyWaitingRoom();
|
|
987
|
+
case 17:
|
|
988
|
+
case "end":
|
|
989
|
+
return _context8.stop();
|
|
990
|
+
}
|
|
991
|
+
}, _callee8, this);
|
|
992
|
+
}));
|
|
993
|
+
function _judgeWaitingRoomPremissionAndCreateRoomControl() {
|
|
994
|
+
return _judgeWaitingRoomPremissionAndCreateRoomControl2.apply(this, arguments);
|
|
995
|
+
}
|
|
996
|
+
return _judgeWaitingRoomPremissionAndCreateRoomControl;
|
|
997
|
+
}()
|
|
998
|
+
}, {
|
|
999
|
+
key: "_destroyWaitingRoom",
|
|
1000
|
+
value: function _destroyWaitingRoom() {
|
|
1001
|
+
var _this$_waitingRoomCon;
|
|
1002
|
+
(_this$_waitingRoomCon = this._waitingRoomControl) === null || _this$_waitingRoomCon === void 0 || _this$_waitingRoomCon.leave();
|
|
1003
|
+
this._waitingRoomControl = undefined;
|
|
1004
|
+
this._uiEventStore.sendEvent(_constant.UIAction.WAITING_ROOM_DESTROYED);
|
|
1005
|
+
// @ts-ignore
|
|
1006
|
+
window.__waitingRoom_control = undefined;
|
|
1007
|
+
}
|
|
571
1008
|
}]);
|
|
572
1009
|
}();
|