fcr-ui-scene 3.3.0 → 3.3.1
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/dist/electron/app.js +148 -0
- package/dist/electron/bootstrap-dev.js +51 -0
- package/dist/electron/bootstrap-sdk.js +56 -0
- package/dist/electron/default-options.js +25 -0
- package/dist/electron/env.js +13 -0
- package/dist/electron/index.js +20 -0
- package/dist/electron/injections.js +702 -0
- package/dist/electron/logger.js +66 -0
- package/dist/electron/main.js +67 -0
- package/dist/electron/plugins/meeting-state.js +39 -0
- package/dist/electron/plugins/screenshot.js +49 -0
- package/dist/electron/preload.js +36 -0
- package/dist/electron/tools.js +66 -0
- package/dist/electron/window.js +124 -0
- package/lib/common/room-store.d.ts +55 -0
- package/lib/common/room-store.js +395 -0
- package/lib/creator.js +2 -0
- package/lib/electron/app.js +8 -0
- package/lib/electron/bootstrap-sdk.js +1 -0
- package/lib/electron/injections.d.ts +1 -0
- package/lib/electron/injections.js +4 -1
- package/lib/electron/preload.js +2 -1
- package/lib/modules/Interpreter/add-button/index.css +4 -0
- package/lib/modules/Interpreter/add-button/index.d.ts +11 -0
- package/lib/modules/Interpreter/add-button/index.js +41 -0
- package/lib/modules/Interpreter/config.d.ts +16 -0
- package/lib/modules/Interpreter/config.js +17 -0
- package/lib/modules/Interpreter/constant.d.ts +44 -0
- package/lib/modules/Interpreter/constant.js +60 -0
- package/lib/modules/Interpreter/context.d.ts +2 -0
- package/lib/modules/Interpreter/context.js +9 -0
- package/lib/modules/Interpreter/dialog-content/index.css +33 -0
- package/lib/modules/Interpreter/dialog-content/index.d.ts +8 -0
- package/lib/modules/Interpreter/dialog-content/index.js +34 -0
- package/lib/modules/Interpreter/footer/components/interpreter-btn/index.d.ts +5 -0
- package/lib/modules/Interpreter/footer/components/interpreter-btn/index.js +56 -0
- package/lib/modules/Interpreter/footer/components/set-btn/index.d.ts +5 -0
- package/lib/modules/Interpreter/footer/components/set-btn/index.js +46 -0
- package/lib/modules/Interpreter/footer/components/tooltip-wrapper/index.d.ts +6 -0
- package/lib/modules/Interpreter/footer/components/tooltip-wrapper/index.js +28 -0
- package/lib/modules/Interpreter/footer/index.css +10 -0
- package/lib/modules/Interpreter/footer/index.d.ts +3 -0
- package/lib/modules/Interpreter/footer/index.js +35 -0
- package/lib/modules/Interpreter/index.css +8 -0
- package/lib/modules/Interpreter/index.d.ts +21 -0
- package/lib/modules/Interpreter/index.js +110 -0
- package/lib/modules/Interpreter/interpreter-list/index.css +21 -0
- package/lib/modules/Interpreter/interpreter-list/index.d.ts +3 -0
- package/lib/modules/Interpreter/interpreter-list/index.js +65 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/index.css +31 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/index.d.ts +11 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/index.js +141 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_ar.png +0 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_cn.png +0 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_de.png +0 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_en.png +0 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_es.png +0 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_fr.png +0 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_hi.png +0 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_id.png +0 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_it.png +0 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_jp.png +0 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_ko.png +0 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_ms.png +0 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_pt.png +0 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_ru.png +0 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_th.png +0 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_tr.png +0 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_vi.png +0 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/index.d.ts +11 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/index.js +119 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.css +41 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.d.ts +12 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.js +118 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/index.css +34 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/index.d.ts +8 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/index.js +65 -0
- package/lib/modules/Interpreter/loading-wrapper/index.css +53 -0
- package/lib/modules/Interpreter/loading-wrapper/index.d.ts +6 -0
- package/lib/modules/Interpreter/loading-wrapper/index.js +28 -0
- package/lib/modules/Interpreter/store.d.ts +82 -0
- package/lib/modules/Interpreter/store.js +1382 -0
- package/lib/modules/Interpreter/view.d.ts +3 -0
- package/lib/modules/Interpreter/view.js +32 -0
- package/lib/modules/action-bar/Interpreter/index.d.ts +6 -0
- package/lib/modules/action-bar/Interpreter/index.js +44 -0
- package/lib/modules/action-bar/apps/appitems.d.ts +2 -0
- package/lib/modules/action-bar/apps/appitems.js +40 -0
- package/lib/modules/action-bar/apps/index.css +6 -0
- package/lib/modules/action-bar/apps/index.d.ts +4 -0
- package/lib/modules/action-bar/apps/index.js +58 -0
- package/lib/modules/action-bar/switch-input-language-room/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/switch-input-language-room/index.css +86 -0
- package/lib/modules/action-bar/switch-input-language-room/index.d.ts +17 -0
- package/lib/modules/action-bar/switch-input-language-room/index.js +145 -0
- package/lib/modules/action-bar/switch-output-language-room/drop-menu.d.ts +1 -0
- package/lib/modules/action-bar/switch-output-language-room/drop-menu.js +197 -0
- package/lib/modules/action-bar/switch-output-language-room/guide-tooltip/index.css +18 -0
- package/lib/modules/action-bar/switch-output-language-room/guide-tooltip/index.d.ts +8 -0
- package/lib/modules/action-bar/switch-output-language-room/guide-tooltip/index.js +59 -0
- package/lib/modules/action-bar/switch-output-language-room/index.d.ts +12 -0
- package/lib/modules/action-bar/switch-output-language-room/index.js +238 -0
- package/lib/modules/action-bar/switch-output-language-room/notification-bar/components/interpreter/index.css +54 -0
- package/lib/modules/action-bar/switch-output-language-room/notification-bar/components/interpreter/index.d.ts +8 -0
- package/lib/modules/action-bar/switch-output-language-room/notification-bar/components/interpreter/index.js +94 -0
- package/lib/modules/action-bar/switch-output-language-room/notification-bar/components/virtual-image/index.css +8 -0
- package/lib/modules/action-bar/switch-output-language-room/notification-bar/components/virtual-image/index.d.ts +4 -0
- package/lib/modules/action-bar/switch-output-language-room/notification-bar/components/virtual-image/index.js +31 -0
- package/lib/modules/action-bar/switch-output-language-room/notification-bar/dome.png +0 -0
- package/lib/modules/action-bar/switch-output-language-room/notification-bar/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/switch-output-language-room/notification-bar/index.css +71 -0
- package/lib/modules/action-bar/switch-output-language-room/notification-bar/index.d.ts +2 -0
- package/lib/modules/action-bar/switch-output-language-room/notification-bar/index.js +82 -0
- package/lib/modules/dialog/components/Interpreter/electron.d.ts +2 -0
- package/lib/modules/dialog/components/Interpreter/electron.js +72 -0
- package/lib/modules/dialog/components/Interpreter/index.css +30 -0
- package/lib/modules/dialog/components/Interpreter/index.d.ts +4 -0
- package/lib/modules/dialog/components/Interpreter/index.js +61 -0
- package/lib/modules/dialog/components/Interpreter/user-queue/index.css +36 -0
- package/lib/modules/dialog/components/Interpreter/user-queue/index.d.ts +3 -0
- package/lib/modules/dialog/components/Interpreter/user-queue/index.js +47 -0
- package/lib/modules/dialog/components/switch-language-channels/electron.d.ts +2 -0
- package/lib/modules/dialog/components/switch-language-channels/electron.js +72 -0
- package/lib/modules/dialog/components/switch-language-channels/index.css +30 -0
- package/lib/modules/dialog/components/switch-language-channels/index.d.ts +4 -0
- package/lib/modules/dialog/components/switch-language-channels/index.js +63 -0
- package/lib/modules/dialog/components/switch-language-channels/user-queue/index.css +36 -0
- package/lib/modules/dialog/components/switch-language-channels/user-queue/index.d.ts +3 -0
- package/lib/modules/dialog/components/switch-language-channels/user-queue/index.js +47 -0
- package/lib/modules/notification/context.d.ts +2 -0
- package/lib/modules/notification/context.js +9 -0
- package/lib/modules/notification/index.css +58 -0
- package/lib/modules/notification/index.d.ts +15 -0
- package/lib/modules/notification/index.js +51 -0
- package/lib/modules/notification/interpreter-status/index.css +72 -0
- package/lib/modules/notification/interpreter-status/index.d.ts +3 -0
- package/lib/modules/notification/interpreter-status/index.js +59 -0
- package/lib/modules/notification/store.d.ts +16 -0
- package/lib/modules/notification/store.js +127 -0
- package/lib/modules/notification/view.d.ts +10 -0
- package/lib/modules/notification/view.js +116 -0
- package/lib/modules/state-bar/meeting-details.js +4 -3
- package/lib/modules/state-bar/store.d.ts +1 -0
- package/lib/modules/state-bar/store.js +15 -3
- package/lib/modules/state-bar/view.js +6 -4
- package/lib/plugins/browser-runtime-plugin.js +4 -1
- package/lib/runtime.d.ts +1 -0
- package/package.json +5 -5
- package/public/index.html +7 -2
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.symbol.js");
|
|
4
|
+
require("core-js/modules/es.array.filter.js");
|
|
5
|
+
require("core-js/modules/es.array.for-each.js");
|
|
6
|
+
require("core-js/modules/es.array.push.js");
|
|
7
|
+
require("core-js/modules/es.object.define-properties.js");
|
|
8
|
+
require("core-js/modules/es.object.define-property.js");
|
|
9
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
10
|
+
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
11
|
+
require("core-js/modules/es.object.keys.js");
|
|
12
|
+
require("core-js/modules/es.object.to-string.js");
|
|
13
|
+
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
14
|
+
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
15
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
16
|
+
require("core-js/modules/esnext.iterator.filter.js");
|
|
17
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
18
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
19
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
20
|
+
Object.defineProperty(exports, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
exports.FcrRoomStore = void 0;
|
|
24
|
+
require("core-js/modules/es.array.join.js");
|
|
25
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
26
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
27
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
28
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
29
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
30
|
+
var _fcrCore = require("fcr-core");
|
|
31
|
+
var _logger = require("agora-foundation/lib/logger");
|
|
32
|
+
var _type = require("fcr-core/lib/room-control/type");
|
|
33
|
+
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
34
|
+
var _type2 = require("fcr-core/lib/room-control/privilege-control/type");
|
|
35
|
+
var _type3 = require("fcr-core/lib/type");
|
|
36
|
+
var _observable = require("agora-foundation/lib/utilities/observable");
|
|
37
|
+
var _type4 = require("agora-rte-sdk/lib/core/scene/type");
|
|
38
|
+
var _type5 = require("agora-rte-sdk/lib/core/rtc/type");
|
|
39
|
+
var _constant = require("../utilities/constant");
|
|
40
|
+
var _type6 = require("agora-rte-sdk/lib/type");
|
|
41
|
+
var _lodash = require("lodash");
|
|
42
|
+
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; }
|
|
43
|
+
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; }
|
|
44
|
+
var FcrRoomStore = exports.FcrRoomStore = /*#__PURE__*/function () {
|
|
45
|
+
function FcrRoomStore(_uiEventStore, _deviceStore, _sceneConfig, _engine) {
|
|
46
|
+
var _this = this;
|
|
47
|
+
(0, _classCallCheck2["default"])(this, FcrRoomStore);
|
|
48
|
+
(0, _defineProperty2["default"])(this, "logger", (0, _logger.getLogger)());
|
|
49
|
+
(0, _defineProperty2["default"])(this, "_observable", new _observable.AgoraObservable());
|
|
50
|
+
this._uiEventStore = _uiEventStore;
|
|
51
|
+
this._deviceStore = _deviceStore;
|
|
52
|
+
this._sceneConfig = _sceneConfig;
|
|
53
|
+
this._engine = _engine;
|
|
54
|
+
//@ts-ignore
|
|
55
|
+
window.roomStore = this;
|
|
56
|
+
this._mainRoomObserver = {
|
|
57
|
+
onLocalUserMovedToWaitingRoom: function () {
|
|
58
|
+
var _onLocalUserMovedToWaitingRoom = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(roomId, event) {
|
|
59
|
+
var roomControl, _roomControl$getPrivi, info, room;
|
|
60
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
61
|
+
while (1) switch (_context.prev = _context.next) {
|
|
62
|
+
case 0:
|
|
63
|
+
roomControl = _this._mainRoomControl; //todo
|
|
64
|
+
if (!roomControl) {
|
|
65
|
+
_context.next = 19;
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
_roomControl$getPrivi = roomControl.getPrivilegeControl().getSecurityInfo(_type2.FcrSecurityAction.WaitingRoom), info = _roomControl$getPrivi.info;
|
|
69
|
+
if (!info) {
|
|
70
|
+
_context.next = 19;
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
_context.prev = 4;
|
|
74
|
+
_context.next = 7;
|
|
75
|
+
return _this._engine.createRoomControlAndJoin(roomId, _this._getJoinRoomOption());
|
|
76
|
+
case 7:
|
|
77
|
+
room = _context.sent;
|
|
78
|
+
_this._waitingRoomControl = room;
|
|
79
|
+
room.addObserver(_this._waitingRoomObserver);
|
|
80
|
+
room.getUserControl().addObserver(_this._waitingRoomUserObserver);
|
|
81
|
+
_this._observable.notifyObservers('onLeaveMainRoom');
|
|
82
|
+
_this._uiEventStore.showToast({
|
|
83
|
+
type: 'error',
|
|
84
|
+
message: (0, _i18n.transI18n)('fmt_waitingroom_attendie_overview_label__toast_move_to_waitingroom')
|
|
85
|
+
});
|
|
86
|
+
_this._observable.notifyObservers('onJoinWaitingRoom', _this._waitingRoomControl);
|
|
87
|
+
_context.next = 19;
|
|
88
|
+
break;
|
|
89
|
+
case 16:
|
|
90
|
+
_context.prev = 16;
|
|
91
|
+
_context.t0 = _context["catch"](4);
|
|
92
|
+
_this._observable.notifyObservers('onJoinWaitingRoomFailed', _context.t0);
|
|
93
|
+
case 19:
|
|
94
|
+
case "end":
|
|
95
|
+
return _context.stop();
|
|
96
|
+
}
|
|
97
|
+
}, _callee, null, [[4, 16]]);
|
|
98
|
+
}));
|
|
99
|
+
function onLocalUserMovedToWaitingRoom(_x, _x2) {
|
|
100
|
+
return _onLocalUserMovedToWaitingRoom.apply(this, arguments);
|
|
101
|
+
}
|
|
102
|
+
return onLocalUserMovedToWaitingRoom;
|
|
103
|
+
}()
|
|
104
|
+
};
|
|
105
|
+
this._waitingRoomObserver = {
|
|
106
|
+
onLocalUserMovedToMainRoom: function () {
|
|
107
|
+
var _onLocalUserMovedToMainRoom = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(roomId, event) {
|
|
108
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
109
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
110
|
+
case 0:
|
|
111
|
+
_this._observable.notifyObservers('onLeaveWaitingRoom');
|
|
112
|
+
_this._observable.notifyObservers('onJoinMainRoom', (0, _lodash.get)(event.changedProperties, 'security.ticket'));
|
|
113
|
+
case 2:
|
|
114
|
+
case "end":
|
|
115
|
+
return _context2.stop();
|
|
116
|
+
}
|
|
117
|
+
}, _callee2);
|
|
118
|
+
}));
|
|
119
|
+
function onLocalUserMovedToMainRoom(_x3, _x4) {
|
|
120
|
+
return _onLocalUserMovedToMainRoom.apply(this, arguments);
|
|
121
|
+
}
|
|
122
|
+
return onLocalUserMovedToMainRoom;
|
|
123
|
+
}()
|
|
124
|
+
};
|
|
125
|
+
this._waitingRoomUserObserver = {
|
|
126
|
+
onLocalUserKickedOut: function onLocalUserKickedOut(roomId) {
|
|
127
|
+
_this._observable.notifyObservers('onWaitingRoomLocalUserKickedOut', roomId);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
this._mainRoomUserObserver = {
|
|
131
|
+
onUserInfoUpdated: function onUserInfoUpdated(roomId, event) {
|
|
132
|
+
// 权限变更的时候
|
|
133
|
+
if (_this._mainRoomControl && event.modifiedUser.userId === _this._mainRoomControl.getUserControl().getLocalUser().userId) {
|
|
134
|
+
_this._sceneConfig.userRole = event.modifiedUser.userRole;
|
|
135
|
+
_this._judgeWaitingRoomPremissionAndCreateRoomControl();
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
onLocalUserKickedOut: function onLocalUserKickedOut(roomId) {
|
|
139
|
+
_this._observable.notifyObservers('onMainRoomLocalUserKickedOut', roomId);
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
return (0, _createClass2["default"])(FcrRoomStore, [{
|
|
144
|
+
key: "release",
|
|
145
|
+
value: function release() {
|
|
146
|
+
if (this._mainRoomControl) {
|
|
147
|
+
this._mainRoomControl.leave();
|
|
148
|
+
this._mainRoomControl = undefined;
|
|
149
|
+
}
|
|
150
|
+
if (this._waitingRoomControl) {
|
|
151
|
+
this._waitingRoomControl.leave();
|
|
152
|
+
this._waitingRoomControl = undefined;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}, {
|
|
156
|
+
key: "addObserver",
|
|
157
|
+
value: function addObserver(observer) {
|
|
158
|
+
this._observable.addObserver(observer);
|
|
159
|
+
}
|
|
160
|
+
}, {
|
|
161
|
+
key: "removeObserver",
|
|
162
|
+
value: function removeObserver(observer) {
|
|
163
|
+
this._observable.removeObserver(observer);
|
|
164
|
+
}
|
|
165
|
+
}, {
|
|
166
|
+
key: "handleJoinRoom",
|
|
167
|
+
value: function () {
|
|
168
|
+
var _handleJoinRoom = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(roomId) {
|
|
169
|
+
var _room$getRoomInfo;
|
|
170
|
+
var room;
|
|
171
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
172
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
173
|
+
case 0:
|
|
174
|
+
_context3.next = 2;
|
|
175
|
+
return this._engine.createRoomControlAndJoin(roomId, this._getJoinRoomOption());
|
|
176
|
+
case 2:
|
|
177
|
+
room = _context3.sent;
|
|
178
|
+
if (!(((_room$getRoomInfo = room.getRoomInfo()) === null || _room$getRoomInfo === void 0 ? void 0 : _room$getRoomInfo.roomType) === _type.FcrRoomType.Mainroom)) {
|
|
179
|
+
_context3.next = 11;
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
this._mainRoomControl = room;
|
|
183
|
+
this._mainRoomControl.addObserver(this._mainRoomObserver);
|
|
184
|
+
this._mainRoomControl.getUserControl().addObserver(this._mainRoomUserObserver);
|
|
185
|
+
// 如果已经有等候室管理员权限 再次创建房间
|
|
186
|
+
this._judgeWaitingRoomPremissionAndCreateRoomControl();
|
|
187
|
+
return _context3.abrupt("return", [_type.FcrRoomType.Mainroom, this._mainRoomControl]);
|
|
188
|
+
case 11:
|
|
189
|
+
this._waitingRoomControl = room;
|
|
190
|
+
this._waitingRoomControl.addObserver(this._waitingRoomObserver);
|
|
191
|
+
this._waitingRoomControl.getUserControl().addObserver(this._waitingRoomUserObserver);
|
|
192
|
+
room.sendRoomMessage({
|
|
193
|
+
messageKey: _type3.RoomMessageKey.USER_WAITING_ROOM_JOINED
|
|
194
|
+
}, false);
|
|
195
|
+
return _context3.abrupt("return", [_type.FcrRoomType.Waitingroom, this._waitingRoomControl]);
|
|
196
|
+
case 16:
|
|
197
|
+
case "end":
|
|
198
|
+
return _context3.stop();
|
|
199
|
+
}
|
|
200
|
+
}, _callee3, this);
|
|
201
|
+
}));
|
|
202
|
+
function handleJoinRoom(_x5) {
|
|
203
|
+
return _handleJoinRoom.apply(this, arguments);
|
|
204
|
+
}
|
|
205
|
+
return handleJoinRoom;
|
|
206
|
+
}()
|
|
207
|
+
}, {
|
|
208
|
+
key: "handleJoinMainRoom",
|
|
209
|
+
value: function () {
|
|
210
|
+
var _handleJoinMainRoom = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4(roomId, ticket) {
|
|
211
|
+
var room;
|
|
212
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
213
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
214
|
+
case 0:
|
|
215
|
+
room = this._engine.createMainRoomControl(roomId);
|
|
216
|
+
_context4.next = 3;
|
|
217
|
+
return room.joinWithTicket(_objectSpread(_objectSpread({}, this._getJoinRoomOption()), {}, {
|
|
218
|
+
ticket: ticket
|
|
219
|
+
}));
|
|
220
|
+
case 3:
|
|
221
|
+
room.addObserver(this._mainRoomObserver);
|
|
222
|
+
room.getUserControl().addObserver(this._mainRoomUserObserver);
|
|
223
|
+
this._mainRoomControl = room;
|
|
224
|
+
return _context4.abrupt("return", room);
|
|
225
|
+
case 7:
|
|
226
|
+
case "end":
|
|
227
|
+
return _context4.stop();
|
|
228
|
+
}
|
|
229
|
+
}, _callee4, this);
|
|
230
|
+
}));
|
|
231
|
+
function handleJoinMainRoom(_x6, _x7) {
|
|
232
|
+
return _handleJoinMainRoom.apply(this, arguments);
|
|
233
|
+
}
|
|
234
|
+
return handleJoinMainRoom;
|
|
235
|
+
}()
|
|
236
|
+
}, {
|
|
237
|
+
key: "_judgeWaitingRoomPremissionAndCreateRoomControl",
|
|
238
|
+
value: function () {
|
|
239
|
+
var _judgeWaitingRoomPremissionAndCreateRoomControl2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
|
240
|
+
var _this$_mainRoomContro, info, isWaitingRoomManager, waitingRoomId, room;
|
|
241
|
+
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
242
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
243
|
+
case 0:
|
|
244
|
+
if (this._mainRoomControl) {
|
|
245
|
+
_context5.next = 2;
|
|
246
|
+
break;
|
|
247
|
+
}
|
|
248
|
+
return _context5.abrupt("return");
|
|
249
|
+
case 2:
|
|
250
|
+
_this$_mainRoomContro = this._mainRoomControl.getPrivilegeControl().getSecurityInfo(_type2.FcrSecurityAction.WaitingRoom), info = _this$_mainRoomContro.info;
|
|
251
|
+
isWaitingRoomManager = this._mainRoomControl.getPrivilegeControl().getLocalUserPermissionInfo(_type2.FcrPermissionAction.WaitingRoomOpen).enable;
|
|
252
|
+
if (!isWaitingRoomManager) {
|
|
253
|
+
_context5.next = 14;
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
if (!info) {
|
|
257
|
+
_context5.next = 12;
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
waitingRoomId = info.payload.roomUuid;
|
|
261
|
+
room = this._engine.createWaitingRoomControl(waitingRoomId);
|
|
262
|
+
_context5.next = 10;
|
|
263
|
+
return room.join(_objectSpread(_objectSpread({}, this._getJoinRoomOption()), {}, {
|
|
264
|
+
createStreamConfigs: []
|
|
265
|
+
}));
|
|
266
|
+
case 10:
|
|
267
|
+
this._waitingRoomControl = room;
|
|
268
|
+
this._observable.notifyObservers('onJoinWaitingRoom', this._waitingRoomControl, true);
|
|
269
|
+
case 12:
|
|
270
|
+
_context5.next = 16;
|
|
271
|
+
break;
|
|
272
|
+
case 14:
|
|
273
|
+
this._destroyWaitingRoom();
|
|
274
|
+
this._uiEventStore.sendEvent(_constant.UIAction.WAITING_ROOM_DESTROYED);
|
|
275
|
+
case 16:
|
|
276
|
+
case "end":
|
|
277
|
+
return _context5.stop();
|
|
278
|
+
}
|
|
279
|
+
}, _callee5, this);
|
|
280
|
+
}));
|
|
281
|
+
function _judgeWaitingRoomPremissionAndCreateRoomControl() {
|
|
282
|
+
return _judgeWaitingRoomPremissionAndCreateRoomControl2.apply(this, arguments);
|
|
283
|
+
}
|
|
284
|
+
return _judgeWaitingRoomPremissionAndCreateRoomControl;
|
|
285
|
+
}()
|
|
286
|
+
}, {
|
|
287
|
+
key: "_destroyWaitingRoom",
|
|
288
|
+
value: function _destroyWaitingRoom() {
|
|
289
|
+
var _this$_waitingRoomCon;
|
|
290
|
+
(_this$_waitingRoomCon = this._waitingRoomControl) === null || _this$_waitingRoomCon === void 0 || _this$_waitingRoomCon.leave();
|
|
291
|
+
this._waitingRoomControl = undefined;
|
|
292
|
+
}
|
|
293
|
+
}, {
|
|
294
|
+
key: "_getJoinRoomOption",
|
|
295
|
+
value: function _getJoinRoomOption() {
|
|
296
|
+
var config = this._sceneConfig;
|
|
297
|
+
var streams = [{
|
|
298
|
+
videoSourceState: this._deviceStore.cameraEnabled ? _type5.AgoraRtcMediaSourceState.STARTED : _type5.AgoraRtcMediaSourceState.STOPPED,
|
|
299
|
+
audioSourceState: this._deviceStore.microphoneEnabled ? _type5.AgoraRtcMediaSourceState.STARTED : _type5.AgoraRtcMediaSourceState.STOPPED,
|
|
300
|
+
videoSourceId: this._deviceStore.currentDeviceId.cameraDeviceId,
|
|
301
|
+
audioSourceId: this._deviceStore.currentDeviceId.microphoneDeviceId,
|
|
302
|
+
streamName: 'default',
|
|
303
|
+
streamType: _type4.AgoraRteMediaStreamType.BOTH,
|
|
304
|
+
videoSourceType: _type6.AgoraRteVideoSourceType.CAMERA,
|
|
305
|
+
audioSourceType: _type6.AgoraRteAudioSourceType.MICROPHONE
|
|
306
|
+
}];
|
|
307
|
+
if (config.userRole === _type3.FcrUserRole.ROBOT) {
|
|
308
|
+
streams = [];
|
|
309
|
+
}
|
|
310
|
+
return {
|
|
311
|
+
userName: config.userName,
|
|
312
|
+
userRole: config.userRole,
|
|
313
|
+
userProperties: config.userProperties,
|
|
314
|
+
streamLatency: _fcrCore.FcrStreamLatencyLevel.ULTRA_LOW,
|
|
315
|
+
createStreamConfigs: streams,
|
|
316
|
+
roomToken: config.roomToken,
|
|
317
|
+
password: config.password
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// 加入语言房间
|
|
322
|
+
}, {
|
|
323
|
+
key: "joinInterpreterRoom",
|
|
324
|
+
value: function () {
|
|
325
|
+
var _joinInterpreterRoom = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6(_ref) {
|
|
326
|
+
var control, roomJoinOptions, language;
|
|
327
|
+
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
328
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
329
|
+
case 0:
|
|
330
|
+
control = _ref.control, roomJoinOptions = _ref.roomJoinOptions, language = _ref.language;
|
|
331
|
+
_context6.prev = 1;
|
|
332
|
+
this._observable.notifyObservers('onJoinInterpretingRoom', control, language);
|
|
333
|
+
_context6.next = 5;
|
|
334
|
+
return control.join(roomJoinOptions);
|
|
335
|
+
case 5:
|
|
336
|
+
this.logger.info("[interpreterLog-joinInterpreterRoom] \u52A0\u5165\u8BED\u8A00\u623F\u95F4", {
|
|
337
|
+
control: control,
|
|
338
|
+
language: language
|
|
339
|
+
});
|
|
340
|
+
this._observable.notifyObservers('onJoinInterpretingRoomSuccess', control, language);
|
|
341
|
+
_context6.next = 12;
|
|
342
|
+
break;
|
|
343
|
+
case 9:
|
|
344
|
+
_context6.prev = 9;
|
|
345
|
+
_context6.t0 = _context6["catch"](1);
|
|
346
|
+
this._observable.notifyObservers('onJoinInterpretingRoomFailed', control, language);
|
|
347
|
+
case 12:
|
|
348
|
+
case "end":
|
|
349
|
+
return _context6.stop();
|
|
350
|
+
}
|
|
351
|
+
}, _callee6, this, [[1, 9]]);
|
|
352
|
+
}));
|
|
353
|
+
function joinInterpreterRoom(_x8) {
|
|
354
|
+
return _joinInterpreterRoom.apply(this, arguments);
|
|
355
|
+
}
|
|
356
|
+
return joinInterpreterRoom;
|
|
357
|
+
}() // 离开语言房间
|
|
358
|
+
}, {
|
|
359
|
+
key: "leaveInterpreterRoom",
|
|
360
|
+
value: function () {
|
|
361
|
+
var _leaveInterpreterRoom = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7(_ref2) {
|
|
362
|
+
var control, language;
|
|
363
|
+
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
364
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
365
|
+
case 0:
|
|
366
|
+
control = _ref2.control, language = _ref2.language;
|
|
367
|
+
_context7.prev = 1;
|
|
368
|
+
this._observable.notifyObservers('onLeaveInterpretingRoom', control, language);
|
|
369
|
+
_context7.next = 5;
|
|
370
|
+
return control.leave();
|
|
371
|
+
case 5:
|
|
372
|
+
this.logger.info("[interpreterLog-leaveInterpreterRoom] \u79BB\u5F00\u8BED\u8A00\u623F\u95F4", {
|
|
373
|
+
control: control,
|
|
374
|
+
language: language
|
|
375
|
+
});
|
|
376
|
+
this._observable.notifyObservers('onLeaveInterpretingRoomSuccess', control, language);
|
|
377
|
+
_context7.next = 12;
|
|
378
|
+
break;
|
|
379
|
+
case 9:
|
|
380
|
+
_context7.prev = 9;
|
|
381
|
+
_context7.t0 = _context7["catch"](1);
|
|
382
|
+
this._observable.notifyObservers('onLeaveInterpretingRoomFailed', control, language);
|
|
383
|
+
case 12:
|
|
384
|
+
case "end":
|
|
385
|
+
return _context7.stop();
|
|
386
|
+
}
|
|
387
|
+
}, _callee7, this, [[1, 9]]);
|
|
388
|
+
}));
|
|
389
|
+
function leaveInterpreterRoom(_x9) {
|
|
390
|
+
return _leaveInterpreterRoom.apply(this, arguments);
|
|
391
|
+
}
|
|
392
|
+
return leaveInterpreterRoom;
|
|
393
|
+
}()
|
|
394
|
+
}]);
|
|
395
|
+
}();
|
package/lib/creator.js
CHANGED
|
@@ -13,6 +13,7 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
14
|
var _logger = require("agora-foundation/lib/logger");
|
|
15
15
|
var _uiScene = require("./ui-scene");
|
|
16
|
+
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
16
17
|
var FcrUISceneCreator = exports.FcrUISceneCreator = /*#__PURE__*/function () {
|
|
17
18
|
function FcrUISceneCreator(_config) {
|
|
18
19
|
(0, _classCallCheck2["default"])(this, FcrUISceneCreator);
|
|
@@ -24,6 +25,7 @@ var FcrUISceneCreator = exports.FcrUISceneCreator = /*#__PURE__*/function () {
|
|
|
24
25
|
key: "launch",
|
|
25
26
|
value: function launch(config, onCancel, onSuccess, onFailure, dom) {
|
|
26
27
|
this.logger.info("[FcrUISceneCreator] scene config: ".concat(JSON.stringify(config)));
|
|
28
|
+
(0, _i18n.changeLanguage)(config.language);
|
|
27
29
|
var scene = new _uiScene.FcrUIDefaultScene(config, this._config, dom);
|
|
28
30
|
scene.addObserver({
|
|
29
31
|
onLaunchSuccess: onSuccess,
|
package/lib/electron/app.js
CHANGED
|
@@ -123,6 +123,14 @@ var hookApp = exports.hookApp = function hookApp(app) {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
});
|
|
126
|
+
_electron.ipcMain.handle('getBundleType', function () {
|
|
127
|
+
if (process.env.DEV === 'true') {
|
|
128
|
+
return 'JS_BUNDLE';
|
|
129
|
+
}
|
|
130
|
+
// get bundle type from package.json
|
|
131
|
+
var packageJson = require(_path["default"].join(__dirname, '../../../../', 'package.json'));
|
|
132
|
+
return packageJson.bundleType || 'JS_BUNDLE';
|
|
133
|
+
});
|
|
126
134
|
_electron.ipcMain.handle('getBrowserWindowId', function (_, frameName) {
|
|
127
135
|
var _getRendererWindow;
|
|
128
136
|
return (_getRendererWindow = (0, _window.getRendererWindow)(frameName)) === null || _getRendererWindow === void 0 ? void 0 : _getRendererWindow.id;
|
|
@@ -34,6 +34,7 @@ _electron.app.addListener('ready', function () {
|
|
|
34
34
|
webPreferences: _objectSpread({}, _defaultOptions.defaultWebPreferences),
|
|
35
35
|
show: false
|
|
36
36
|
}));
|
|
37
|
+
_electron.Menu.setApplicationMenu(null);
|
|
37
38
|
(0, _2.hookWindow)(mainWindow);
|
|
38
39
|
mainWindow.addListener('closed', function () {
|
|
39
40
|
_electron.app.exit(0);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IpcRendererEvent } from 'electron';
|
|
2
2
|
import { BrowserWindowConstructorOptions } from 'electron/renderer';
|
|
3
3
|
import os from 'os';
|
|
4
|
+
export declare const getBundleType: () => Promise<"JS_BUNDLE" | "NATIVE_BUNDLE">;
|
|
4
5
|
export declare const openDirectory: () => Promise<string | undefined>;
|
|
5
6
|
export declare const showItemInFolder: (path: string) => void;
|
|
6
7
|
export declare const sendEvent: (event: RendererCustomEvent) => void;
|
|
@@ -6,7 +6,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
|
-
exports.showItemInFolder = exports.setInMeetingState = exports.setFragmentOptions = exports.setFragmentBaseUrl = exports.setAlwaysOnTop = exports.sendEvent = exports.screen = exports.removeEventListener = exports.releaseSubAllWindowRefs = exports.registerListenerReady = exports.quitApp = exports.openRendererWindow = exports.openLinkInDefaultBrowser = exports.openDirectory = exports.open = exports.launch = exports.getVirtualBgResource = exports.getSystemMemorySize = exports.getSystemCpuInfo = exports.getRendererProcessUsage = exports.getNetworkType = exports.getMediaSourceIdList = exports.getLaunchOptions = exports.getBrowserWindowById = exports.getAssetUrl = exports.fileToBase64 = exports.closeRendererWindow = exports.close = exports.captureScreen = exports.browserWindow = exports.addEventListener = void 0;
|
|
9
|
+
exports.showItemInFolder = exports.setInMeetingState = exports.setFragmentOptions = exports.setFragmentBaseUrl = exports.setAlwaysOnTop = exports.sendEvent = exports.screen = exports.removeEventListener = exports.releaseSubAllWindowRefs = exports.registerListenerReady = exports.quitApp = exports.openRendererWindow = exports.openLinkInDefaultBrowser = exports.openDirectory = exports.open = exports.launch = exports.getVirtualBgResource = exports.getSystemMemorySize = exports.getSystemCpuInfo = exports.getRendererProcessUsage = exports.getNetworkType = exports.getMediaSourceIdList = exports.getLaunchOptions = exports.getBundleType = exports.getBrowserWindowById = exports.getAssetUrl = exports.fileToBase64 = exports.closeRendererWindow = exports.close = exports.captureScreen = exports.browserWindow = exports.addEventListener = void 0;
|
|
10
10
|
require("core-js/modules/es.error.cause.js");
|
|
11
11
|
require("core-js/modules/es.error.to-string.js");
|
|
12
12
|
require("core-js/modules/es.array.concat.js");
|
|
@@ -54,6 +54,9 @@ var _child_process = require("child_process");
|
|
|
54
54
|
var _path2 = _interopRequireDefault(require("path"));
|
|
55
55
|
var _fs2 = _interopRequireDefault(require("fs"));
|
|
56
56
|
var _jszip = _interopRequireDefault(require("jszip"));
|
|
57
|
+
var getBundleType = exports.getBundleType = function getBundleType() {
|
|
58
|
+
return _electron.ipcRenderer.invoke('getBundleType');
|
|
59
|
+
};
|
|
57
60
|
var openDirectory = exports.openDirectory = /*#__PURE__*/function () {
|
|
58
61
|
var _ref = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
59
62
|
var _yield$dialog$showOpe, filePaths;
|
package/lib/electron/preload.js
CHANGED
|
@@ -32,5 +32,6 @@ window.runtime = {
|
|
|
32
32
|
registerListenerReady: _injections.registerListenerReady,
|
|
33
33
|
releaseSubAllWindowRefs: _injections.releaseSubAllWindowRefs,
|
|
34
34
|
getMediaSourceIdList: _injections.getMediaSourceIdList,
|
|
35
|
-
setInMeetingState: _injections.setInMeetingState
|
|
35
|
+
setInMeetingState: _injections.setInMeetingState,
|
|
36
|
+
getBundleType: _injections.getBundleType
|
|
36
37
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
export declare enum PositionType {
|
|
3
|
+
TOP = 0,
|
|
4
|
+
BOTTOM = 1
|
|
5
|
+
}
|
|
6
|
+
interface AddButtonProps {
|
|
7
|
+
className?: string;
|
|
8
|
+
position?: PositionType;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: (props: AddButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = exports.PositionType = void 0;
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
var _mobxReact = require("mobx-react");
|
|
12
|
+
var _button = require("agora-ui-foundation/lib/components/button");
|
|
13
|
+
var _context = require("../context");
|
|
14
|
+
require("./index.css");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
var PositionType = exports.PositionType = /*#__PURE__*/function (PositionType) {
|
|
17
|
+
PositionType[PositionType["TOP"] = 0] = "TOP";
|
|
18
|
+
PositionType[PositionType["BOTTOM"] = 1] = "BOTTOM";
|
|
19
|
+
return PositionType;
|
|
20
|
+
}({});
|
|
21
|
+
var AddButton = function AddButton(props) {
|
|
22
|
+
var className = props.className,
|
|
23
|
+
_props$position = props.position,
|
|
24
|
+
position = _props$position === void 0 ? PositionType.BOTTOM : _props$position;
|
|
25
|
+
var _useContext = (0, _react.useContext)(_context.StoreContext),
|
|
26
|
+
addInterpreterUsers = _useContext.addInterpreterUsers,
|
|
27
|
+
localInterpreterUsers = _useContext.localInterpreterUsers;
|
|
28
|
+
var disabled = localInterpreterUsers.length > 9;
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.FcrButton, {
|
|
30
|
+
shape: "rounded",
|
|
31
|
+
type: position == PositionType.TOP ? 'gray' : 'secondary-bordered',
|
|
32
|
+
size: "S",
|
|
33
|
+
className: (0, _classnames["default"])({
|
|
34
|
+
'fcr-simultaneous-interpretation__add-button__top': position === PositionType.TOP
|
|
35
|
+
}, className),
|
|
36
|
+
onClick: addInterpreterUsers,
|
|
37
|
+
disabled: disabled,
|
|
38
|
+
children: "+Add Interpreter".concat(disabled ? '(上限10个)' : '')
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
var _default = exports["default"] = (0, _mobxReact.observer)(AddButton);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const defaultCameraVideoEncoderConfig: {
|
|
2
|
+
dimensions: {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
};
|
|
6
|
+
frameRate: number;
|
|
7
|
+
bitrate: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const hdCameraVideoEncoderConfig: {
|
|
10
|
+
dimensions: {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
};
|
|
14
|
+
frameRate: number;
|
|
15
|
+
bitrate: number;
|
|
16
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.hdCameraVideoEncoderConfig = exports.defaultCameraVideoEncoderConfig = void 0;
|
|
8
|
+
var _defaultConfig = require("../../utilities/default-config");
|
|
9
|
+
var defaultCameraVideoEncoderConfig = exports.defaultCameraVideoEncoderConfig = _defaultConfig.cameraVideoHighStreamEncoderLowConfig;
|
|
10
|
+
var hdCameraVideoEncoderConfig = exports.hdCameraVideoEncoderConfig = {
|
|
11
|
+
dimensions: {
|
|
12
|
+
width: 1920,
|
|
13
|
+
height: 1080
|
|
14
|
+
},
|
|
15
|
+
frameRate: 20,
|
|
16
|
+
bitrate: 2500
|
|
17
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { FcrInterpreterRoomControl, FcrLanguage } from 'fcr-core/lib/room-control/interpreter-control/types';
|
|
2
|
+
import { OptionsType } from '../action-bar/switch-input-language-room';
|
|
3
|
+
import { LanguageRoomOptionValue } from '../action-bar/switch-output-language-room';
|
|
4
|
+
export declare enum UpdateType {
|
|
5
|
+
JOIN = "join",
|
|
6
|
+
LEFT = "left",
|
|
7
|
+
LOADING = "loading"
|
|
8
|
+
}
|
|
9
|
+
export declare const CLOSE_ALL = "CLOSE_ALL";
|
|
10
|
+
export declare enum InterpreterItemType {
|
|
11
|
+
INTERPRETER = "userName",
|
|
12
|
+
OUTPUT_LANGUAGE = "targetLanguage",
|
|
13
|
+
INPUT_LANGUAGE = "sourceLanguage",
|
|
14
|
+
ID = "userId",
|
|
15
|
+
KEY = "randomKey"
|
|
16
|
+
}
|
|
17
|
+
export interface InitInterpreterItemModelType {
|
|
18
|
+
[InterpreterItemType.ID]: string;
|
|
19
|
+
[InterpreterItemType.KEY]: string;
|
|
20
|
+
[InterpreterItemType.INPUT_LANGUAGE]: FcrLanguage | undefined;
|
|
21
|
+
[InterpreterItemType.OUTPUT_LANGUAGE]: FcrLanguage | undefined;
|
|
22
|
+
}
|
|
23
|
+
export declare const initInterpreterItemModel: InitInterpreterItemModelType;
|
|
24
|
+
export interface LanguageRoomType {
|
|
25
|
+
control: FcrInterpreterRoomControl;
|
|
26
|
+
status: string;
|
|
27
|
+
roomId: string;
|
|
28
|
+
language: FcrLanguage;
|
|
29
|
+
}
|
|
30
|
+
export interface ChangeInputLanguageParams {
|
|
31
|
+
language: FcrLanguage;
|
|
32
|
+
options: OptionsType[];
|
|
33
|
+
callback?: (options: OptionsType[]) => void;
|
|
34
|
+
}
|
|
35
|
+
export interface ChangeOutputLanguageParams {
|
|
36
|
+
language: LanguageRoomOptionValue;
|
|
37
|
+
orgLanguage?: LanguageRoomOptionValue;
|
|
38
|
+
callback?: Function;
|
|
39
|
+
}
|
|
40
|
+
export declare const updateOutputLanguageList: ({ outputLanguageList, language, open, }: {
|
|
41
|
+
outputLanguageList: OptionsType[];
|
|
42
|
+
language: FcrLanguage;
|
|
43
|
+
open: boolean;
|
|
44
|
+
}) => OptionsType[];
|