fcr-ui-scene 3.9.0-alpha → 3.9.1-alpha
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/lib/creator/provider-initializer.browser.js +4 -2
- package/lib/creator/provider-initializer.electron.js +13 -5
- package/lib/electron/injections.d.ts +1 -0
- package/lib/electron/injections.js +4 -1
- package/lib/electron/preload.js +1 -0
- package/lib/fragments/annotation/style.css +1 -0
- package/lib/fragments/whiteboard/style.css +4 -0
- package/lib/modules/action-bar/main-scene/store.base.d.ts +1 -0
- package/lib/modules/action-bar/main-scene/store.base.js +5 -0
- package/lib/modules/audio-stream/index.d.ts +2 -0
- package/lib/modules/audio-stream/index.js +33 -1
- package/lib/modules/chat/chat-room-store.js +4 -2
- package/lib/modules/chat/index.js +1 -1
- package/lib/modules/chat/store.d.ts +1 -1
- package/lib/modules/chat/store.js +4 -2
- package/lib/modules/components/device-control/store.base.d.ts +1 -0
- package/lib/modules/components/device-control/store.base.js +22 -3
- package/lib/modules/components/leave-meeting/index.js +3 -2
- package/lib/modules/components/leave-meeting/main-scene/store.d.ts +1 -0
- package/lib/modules/components/leave-meeting/main-scene/store.js +6 -1
- package/lib/modules/components/leave-meeting/store.base.d.ts +1 -0
- package/lib/modules/components/leave-meeting/store.base.js +1 -1
- package/lib/modules/components/leave-meeting/waiting-scene/store.d.ts +1 -0
- package/lib/modules/components/leave-meeting/waiting-scene/store.js +6 -1
- package/lib/modules/components/member-window/components/member-actions/components/icon-status.js +7 -10
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +2 -2
- package/lib/modules/components/member-window/components/member-actions/index.js +0 -7
- package/lib/modules/components/member-window/components/member-actions/store.js +1 -1
- package/lib/modules/components/member-window/index.js +1 -1
- package/lib/modules/components/tab-frame/index.css +12 -1
- package/lib/modules/components/tab-frame/index.js +4 -1
- package/lib/modules/control-bar/components/share-state-nav/index.js +1 -3
- package/lib/modules/control-bar/mouse-event-bridge.d.ts +23 -0
- package/lib/modules/control-bar/mouse-event-bridge.js +87 -0
- package/lib/modules/control-bar/store.d.ts +3 -2
- package/lib/modules/control-bar/store.js +17 -29
- package/lib/modules/control-bar/type.d.ts +0 -1
- package/lib/modules/control-bar/view.js +21 -17
- package/lib/modules/dialog/dialogs/connection-gateway/tabs.js +3 -2
- package/lib/modules/dialog/dialogs/invite/index.js +6 -24
- package/lib/modules/invite/components/copy-info.css +72 -0
- package/lib/modules/invite/components/copy-info.d.ts +3 -0
- package/lib/modules/invite/components/copy-info.js +144 -0
- package/lib/modules/invite/components/pstn-invite.js +3 -15
- package/lib/modules/invite/components/voip-invite.js +10 -1
- package/lib/modules/invite/enums.d.ts +3 -1
- package/lib/modules/invite/enums.js +2 -0
- package/lib/modules/invite/store.d.ts +4 -1
- package/lib/modules/invite/store.js +37 -13
- package/lib/modules/invite/view.js +41 -20
- package/lib/modules/layout/store.base.d.ts +2 -1
- package/lib/modules/layout/store.base.js +20 -23
- package/lib/modules/participant/components/confirm-input/index.css +67 -1
- package/lib/modules/participant/components/confirm-input/index.js +16 -13
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.css +4 -0
- package/lib/modules/participant/store.base.d.ts +1 -0
- package/lib/modules/participant/store.base.js +34 -7
- package/lib/modules/pc-audio-connect/main-scene/store.d.ts +2 -0
- package/lib/modules/pc-audio-connect/main-scene/store.js +12 -2
- package/lib/modules/pc-audio-connect/view.js +4 -2
- package/lib/modules/phone-audio-connect/store.d.ts +6 -4
- package/lib/modules/phone-audio-connect/store.js +12 -1
- package/lib/modules/phone-audio-connect/view.js +6 -4
- package/lib/modules/secondary-window/index.js +2 -2
- package/lib/modules/secondary-window/store.d.ts +3 -0
- package/lib/modules/secondary-window/store.js +16 -1
- package/lib/modules/secondary-window/view.js +96 -72
- package/lib/modules/toast-manager/type.d.ts +2 -1
- package/lib/modules/toast-manager/type.js +4 -1
- package/lib/plugins/module-dev-plugin.js +4 -4
- package/lib/providers/ability-provider.d.ts +15 -0
- package/lib/providers/ability-provider.js +13 -1
- package/lib/providers/mouse-detect/provider.d.ts +2 -0
- package/lib/providers/mouse-detect/provider.empty.d.ts +14 -0
- package/lib/providers/mouse-detect/provider.empty.js +47 -0
- package/lib/providers/mouse-detect/provider.js +13 -4
- package/lib/providers/mouse-detect/type.d.ts +2 -0
- package/lib/providers/phone-audio-provider.d.ts +31 -5
- package/lib/providers/phone-audio-provider.js +83 -22
- package/lib/providers/user-audio-volume-provider.d.ts +6 -0
- package/lib/providers/user-audio-volume-provider.js +3 -2
- package/lib/runtime.d.ts +1 -0
- package/lib/scenes/main-scene.js +2 -1
- package/lib/shared-data/chat-data.d.ts +19 -0
- package/lib/shared-data/chat-data.js +54 -7
- package/lib/shared-data/member-data.d.ts +9 -1
- package/lib/shared-data/member-data.js +46 -17
- package/lib/shared-data/video-window.js +8 -4
- package/lib/translations/enUS.d.ts +245 -1
- package/lib/translations/enUS.js +247 -3
- package/lib/translations/zhCN.d.ts +245 -1
- package/lib/translations/zhCN.js +246 -2
- package/lib/utilities/os.d.ts +1 -0
- package/lib/utilities/os.js +15 -0
- package/lib/utilities/renderer.d.ts +1 -0
- package/lib/utilities/renderer.js +7 -1
- package/lib-es/creator/provider-initializer.browser.js +4 -2
- package/lib-es/creator/provider-initializer.electron.js +11 -3
- package/lib-es/electron/injections.js +3 -0
- package/lib-es/electron/preload.js +2 -1
- package/lib-es/fragments/annotation/style.css +1 -0
- package/lib-es/fragments/whiteboard/style.css +4 -0
- package/lib-es/modules/action-bar/main-scene/store.base.js +5 -0
- package/lib-es/modules/audio-stream/index.js +33 -1
- package/lib-es/modules/chat/chat-room-store.js +4 -2
- package/lib-es/modules/chat/index.js +1 -1
- package/lib-es/modules/chat/store.js +4 -2
- package/lib-es/modules/components/device-control/store.base.js +22 -3
- package/lib-es/modules/components/leave-meeting/index.js +3 -2
- package/lib-es/modules/components/leave-meeting/main-scene/store.js +6 -1
- package/lib-es/modules/components/leave-meeting/store.base.js +1 -1
- package/lib-es/modules/components/leave-meeting/waiting-scene/store.js +6 -1
- package/lib-es/modules/components/member-window/components/member-actions/components/icon-status.js +7 -10
- package/lib-es/modules/components/member-window/components/member-actions/components/more-actions.js +2 -2
- package/lib-es/modules/components/member-window/components/member-actions/index.js +0 -7
- package/lib-es/modules/components/member-window/components/member-actions/store.js +1 -1
- package/lib-es/modules/components/member-window/index.js +1 -1
- package/lib-es/modules/components/tab-frame/index.css +12 -1
- package/lib-es/modules/components/tab-frame/index.js +4 -1
- package/lib-es/modules/control-bar/components/share-state-nav/index.js +1 -3
- package/lib-es/modules/control-bar/mouse-event-bridge.js +79 -0
- package/lib-es/modules/control-bar/store.js +18 -30
- package/lib-es/modules/control-bar/view.js +21 -17
- package/lib-es/modules/dialog/dialogs/connection-gateway/tabs.js +3 -2
- package/lib-es/modules/dialog/dialogs/invite/index.js +6 -24
- package/lib-es/modules/invite/components/copy-info.css +72 -0
- package/lib-es/modules/invite/components/copy-info.js +137 -0
- package/lib-es/modules/invite/components/pstn-invite.js +3 -15
- package/lib-es/modules/invite/components/voip-invite.js +10 -1
- package/lib-es/modules/invite/enums.js +2 -0
- package/lib-es/modules/invite/store.js +38 -14
- package/lib-es/modules/invite/view.js +43 -22
- package/lib-es/modules/layout/store.base.js +20 -23
- package/lib-es/modules/participant/components/confirm-input/index.css +67 -1
- package/lib-es/modules/participant/components/confirm-input/index.js +16 -13
- package/lib-es/modules/participant/components/participants/components/render-user/components/attendee/index.css +4 -0
- package/lib-es/modules/participant/store.base.js +34 -7
- package/lib-es/modules/pc-audio-connect/main-scene/store.js +12 -2
- package/lib-es/modules/pc-audio-connect/view.js +4 -2
- package/lib-es/modules/phone-audio-connect/store.js +12 -1
- package/lib-es/modules/phone-audio-connect/view.js +6 -4
- package/lib-es/modules/secondary-window/index.js +2 -2
- package/lib-es/modules/secondary-window/store.js +16 -1
- package/lib-es/modules/secondary-window/view.js +97 -73
- package/lib-es/modules/toast-manager/type.js +4 -1
- package/lib-es/plugins/module-dev-plugin.js +4 -4
- package/lib-es/providers/ability-provider.js +13 -1
- package/lib-es/providers/mouse-detect/provider.empty.js +39 -0
- package/lib-es/providers/mouse-detect/provider.js +13 -4
- package/lib-es/providers/phone-audio-provider.js +109 -48
- package/lib-es/providers/user-audio-volume-provider.js +3 -2
- package/lib-es/scenes/main-scene.js +3 -2
- package/lib-es/shared-data/chat-data.js +55 -8
- package/lib-es/shared-data/member-data.js +46 -17
- package/lib-es/shared-data/video-window.js +8 -4
- package/lib-es/translations/enUS.js +247 -3
- package/lib-es/translations/zhCN.js +246 -2
- package/lib-es/utilities/os.js +8 -0
- package/lib-es/utilities/renderer.js +7 -1
- package/lib-es/utilities/shared-storage.js +2 -2
- package/package.json +6 -6
- package/lib/modules/connection-gateway/components/computer/index.css +0 -12
- package/lib/modules/connection-gateway/components/computer/index.d.ts +0 -3
- package/lib/modules/connection-gateway/components/computer/index.js +0 -66
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.css +0 -36
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.d.ts +0 -10
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.js +0 -78
- package/lib/modules/connection-gateway/components/phone/components/calling/index.css +0 -72
- package/lib/modules/connection-gateway/components/phone/components/calling/index.d.ts +0 -7
- package/lib/modules/connection-gateway/components/phone/components/calling/index.js +0 -58
- package/lib/modules/connection-gateway/components/phone/components/remeber/index.css +0 -10
- package/lib/modules/connection-gateway/components/phone/components/remeber/index.d.ts +0 -5
- package/lib/modules/connection-gateway/components/phone/components/remeber/index.js +0 -24
- package/lib/modules/connection-gateway/components/phone/components/useing/index.css +0 -46
- package/lib/modules/connection-gateway/components/phone/components/useing/index.d.ts +0 -3
- package/lib/modules/connection-gateway/components/phone/components/useing/index.js +0 -36
- package/lib/modules/connection-gateway/components/phone/index.css +0 -49
- package/lib/modules/connection-gateway/components/phone/index.d.ts +0 -3
- package/lib/modules/connection-gateway/components/phone/index.js +0 -185
- package/lib/modules/connection-gateway/enums.d.ts +0 -4
- package/lib/modules/connection-gateway/enums.js +0 -12
- package/lib/modules/connection-gateway/index.css +0 -6
- package/lib/modules/connection-gateway/index.d.ts +0 -10
- package/lib/modules/connection-gateway/index.js +0 -78
- package/lib/modules/connection-gateway/store.d.ts +0 -68
- package/lib/modules/connection-gateway/store.js +0 -713
- package/lib/modules/connection-gateway/types.d.ts +0 -8
- package/lib/modules/connection-gateway/types.js +0 -6
- package/lib/modules/connection-gateway/view.d.ts +0 -1
- package/lib/modules/connection-gateway/view.js +0 -39
- package/lib-es/modules/connection-gateway/components/computer/index.css +0 -12
- package/lib-es/modules/connection-gateway/components/computer/index.js +0 -59
- package/lib-es/modules/connection-gateway/components/phone/components/callinfo/index.css +0 -36
- package/lib-es/modules/connection-gateway/components/phone/components/callinfo/index.js +0 -71
- package/lib-es/modules/connection-gateway/components/phone/components/calling/index.css +0 -72
- package/lib-es/modules/connection-gateway/components/phone/components/calling/index.js +0 -51
- package/lib-es/modules/connection-gateway/components/phone/components/remeber/index.css +0 -10
- package/lib-es/modules/connection-gateway/components/phone/components/remeber/index.js +0 -17
- package/lib-es/modules/connection-gateway/components/phone/components/useing/index.css +0 -46
- package/lib-es/modules/connection-gateway/components/phone/components/useing/index.js +0 -29
- package/lib-es/modules/connection-gateway/components/phone/index.css +0 -49
- package/lib-es/modules/connection-gateway/components/phone/index.js +0 -177
- package/lib-es/modules/connection-gateway/enums.js +0 -5
- package/lib-es/modules/connection-gateway/index.css +0 -6
- package/lib-es/modules/connection-gateway/index.js +0 -60
- package/lib-es/modules/connection-gateway/store.js +0 -707
- package/lib-es/modules/connection-gateway/types.js +0 -1
- package/lib-es/modules/connection-gateway/view.js +0 -31
|
@@ -4,8 +4,6 @@ require("core-js/modules/es.symbol.js");
|
|
|
4
4
|
require("core-js/modules/es.symbol.description.js");
|
|
5
5
|
require("core-js/modules/es.symbol.iterator.js");
|
|
6
6
|
require("core-js/modules/es.symbol.to-primitive.js");
|
|
7
|
-
require("core-js/modules/es.error.cause.js");
|
|
8
|
-
require("core-js/modules/es.error.to-string.js");
|
|
9
7
|
require("core-js/modules/es.array.from.js");
|
|
10
8
|
require("core-js/modules/es.array.is-array.js");
|
|
11
9
|
require("core-js/modules/es.array.slice.js");
|
|
@@ -42,6 +40,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
42
40
|
});
|
|
43
41
|
exports.FcrUIPhoneAudioConnectorProviderImpl = void 0;
|
|
44
42
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
43
|
+
require("core-js/modules/es.error.cause.js");
|
|
44
|
+
require("core-js/modules/es.error.to-string.js");
|
|
45
45
|
require("core-js/modules/es.array.find.js");
|
|
46
46
|
require("core-js/modules/es.array.find-index.js");
|
|
47
47
|
require("core-js/modules/es.array.for-each.js");
|
|
@@ -73,10 +73,10 @@ var _type = require("fcr-core/lib/room-control/room-connector-control/type");
|
|
|
73
73
|
var _decorator = require("agora-foundation/lib/decorator");
|
|
74
74
|
var _type2 = require("../type");
|
|
75
75
|
var _imports = require("fcr-core/lib/imports");
|
|
76
|
-
var _enums = require("../modules/connection-gateway/enums");
|
|
77
76
|
var _type3 = require("../modules/toast-manager/type");
|
|
77
|
+
var _enums = require("../modules/phone-audio-connect/enums");
|
|
78
78
|
var _FcrUIPhoneAudioConnectorProviderImpl;
|
|
79
|
-
var _initProto, _init_accepted, _init_connectionPhoneInfos, _init_connectInfo, _init_phoneCallState, _init_phoneCallReason, _init_connectSession, _init_calling, _init_outgoingCall, _init_isHangup, _init_hasPstnStream, _init_hasOwnPstnStream, _init_hasNeedMergedStream, _getConnectorInfoDecs, _setConnectionInfoDecs, _startCallDecs, _stopCallDecs, _phoneCallUpdatedDecs, _phoneCallReasonDecs, _setStreamStateDecs, _handleStreamsAddedOrUpdatedDecs, _handleStreamsRemovedDecs, _ref;
|
|
79
|
+
var _initProto, _init_accepted, _init_connectionPhoneInfos, _init_connectInfo, _init_phoneCallState, _init_phoneCallReason, _init_connectSession, _init_calling, _init_outgoingCall, _init_isHangup, _init_hasPstnStream, _init_hasVolteStream, _init_hasOwnPstnStream, _init_hasOwnVolteStream, _init_hasNeedMergedStream, _getConnectorInfoDecs, _setConnectionInfoDecs, _startCallDecs, _getCallOutTypeArrayDecs, _getPhoneCallOutTypeDecs, _stopCallDecs, _phoneCallUpdatedDecs, _phoneCallReasonDecs, _setStreamStateDecs, _handleStreamsAddedOrUpdatedDecs, _handleStreamsRemovedDecs, _ref;
|
|
80
80
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
81
81
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
82
82
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -102,13 +102,16 @@ var _I = /*#__PURE__*/new WeakMap();
|
|
|
102
102
|
var _J = /*#__PURE__*/new WeakMap();
|
|
103
103
|
var _K = /*#__PURE__*/new WeakMap();
|
|
104
104
|
var _L = /*#__PURE__*/new WeakMap();
|
|
105
|
-
|
|
105
|
+
var _M = /*#__PURE__*/new WeakMap();
|
|
106
|
+
var _N = /*#__PURE__*/new WeakMap();
|
|
107
|
+
_ref = (_getConnectorInfoDecs = [_mobx.action, _mobx.action.bound], _setConnectionInfoDecs = [_mobx.action, _mobx.action.bound], _startCallDecs = [_mobx.action, _mobx.action.bound], _getCallOutTypeArrayDecs = [_mobx.action, _mobx.action.bound], _getPhoneCallOutTypeDecs = [_mobx.action, _mobx.action.bound], _stopCallDecs = [_mobx.action, _mobx.action.bound], _phoneCallUpdatedDecs = [_mobx.action, _mobx.action.bound], _phoneCallReasonDecs = [_mobx.action, _mobx.action.bound], _setStreamStateDecs = [_mobx.action, _mobx.action.bound], _handleStreamsAddedOrUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleStreamsRemovedDecs = [_mobx.action, _mobx.action.bound], "_observable");
|
|
106
108
|
var FcrUIPhoneAudioConnectorProviderImpl = exports.FcrUIPhoneAudioConnectorProviderImpl = /*#__PURE__*/function () {
|
|
107
109
|
function FcrUIPhoneAudioConnectorProviderImpl(_ref2) {
|
|
108
110
|
var _this = this;
|
|
109
111
|
var roomControl = _ref2.roomControl,
|
|
110
112
|
messageProvider = _ref2.messageProvider,
|
|
111
|
-
deviceProvider = _ref2.deviceProvider
|
|
113
|
+
deviceProvider = _ref2.deviceProvider,
|
|
114
|
+
abilityProvider = _ref2.abilityProvider;
|
|
112
115
|
(0, _classCallCheck2["default"])(this, FcrUIPhoneAudioConnectorProviderImpl);
|
|
113
116
|
(0, _defineProperty2["default"])(this, _ref, (_initProto(this), new _imports.AgoraObservable()));
|
|
114
117
|
(0, _defineProperty2["default"])(this, "_disposers", []);
|
|
@@ -132,13 +135,16 @@ var FcrUIPhoneAudioConnectorProviderImpl = exports.FcrUIPhoneAudioConnectorProvi
|
|
|
132
135
|
_classPrivateFieldInitSpec(this, _H, _init_outgoingCall(this, false));
|
|
133
136
|
_classPrivateFieldInitSpec(this, _I, _init_isHangup(this, false));
|
|
134
137
|
_classPrivateFieldInitSpec(this, _J, _init_hasPstnStream(this, false));
|
|
135
|
-
_classPrivateFieldInitSpec(this, _K,
|
|
136
|
-
_classPrivateFieldInitSpec(this, _L,
|
|
138
|
+
_classPrivateFieldInitSpec(this, _K, _init_hasVolteStream(this, false));
|
|
139
|
+
_classPrivateFieldInitSpec(this, _L, _init_hasOwnPstnStream(this, false));
|
|
140
|
+
_classPrivateFieldInitSpec(this, _M, _init_hasOwnVolteStream(this, false));
|
|
141
|
+
_classPrivateFieldInitSpec(this, _N, _init_hasNeedMergedStream(this, false));
|
|
137
142
|
this._roomControl = roomControl;
|
|
138
143
|
this._messageProvider = messageProvider;
|
|
139
144
|
this._deviceProvider = deviceProvider;
|
|
140
145
|
this._streamControl = roomControl.getStreamControl();
|
|
141
146
|
this._userControl = roomControl.getUserControl();
|
|
147
|
+
this._abilityProvider = abilityProvider;
|
|
142
148
|
this._roomControl.getRoomConnectorControl().addObserver(this._roomOberver);
|
|
143
149
|
this._streamControl.addObserver(this._streamObserver);
|
|
144
150
|
this.getConnectorInfo();
|
|
@@ -233,7 +239,7 @@ var FcrUIPhoneAudioConnectorProviderImpl = exports.FcrUIPhoneAudioConnectorProvi
|
|
|
233
239
|
_classPrivateFieldSet(_J, this, v);
|
|
234
240
|
}
|
|
235
241
|
}, {
|
|
236
|
-
key: "
|
|
242
|
+
key: "hasVolteStream",
|
|
237
243
|
get: function get() {
|
|
238
244
|
return _classPrivateFieldGet(_K, this);
|
|
239
245
|
},
|
|
@@ -241,13 +247,29 @@ var FcrUIPhoneAudioConnectorProviderImpl = exports.FcrUIPhoneAudioConnectorProvi
|
|
|
241
247
|
_classPrivateFieldSet(_K, this, v);
|
|
242
248
|
}
|
|
243
249
|
}, {
|
|
244
|
-
key: "
|
|
250
|
+
key: "hasOwnPstnStream",
|
|
245
251
|
get: function get() {
|
|
246
252
|
return _classPrivateFieldGet(_L, this);
|
|
247
253
|
},
|
|
248
254
|
set: function set(v) {
|
|
249
255
|
_classPrivateFieldSet(_L, this, v);
|
|
250
256
|
}
|
|
257
|
+
}, {
|
|
258
|
+
key: "hasOwnVolteStream",
|
|
259
|
+
get: function get() {
|
|
260
|
+
return _classPrivateFieldGet(_M, this);
|
|
261
|
+
},
|
|
262
|
+
set: function set(v) {
|
|
263
|
+
_classPrivateFieldSet(_M, this, v);
|
|
264
|
+
}
|
|
265
|
+
}, {
|
|
266
|
+
key: "hasNeedMergedStream",
|
|
267
|
+
get: function get() {
|
|
268
|
+
return _classPrivateFieldGet(_N, this);
|
|
269
|
+
},
|
|
270
|
+
set: function set(v) {
|
|
271
|
+
_classPrivateFieldSet(_N, this, v);
|
|
272
|
+
}
|
|
251
273
|
}, {
|
|
252
274
|
key: "connectType",
|
|
253
275
|
get: function get() {
|
|
@@ -289,8 +311,8 @@ var FcrUIPhoneAudioConnectorProviderImpl = exports.FcrUIPhoneAudioConnectorProvi
|
|
|
289
311
|
}, {
|
|
290
312
|
key: "startCall",
|
|
291
313
|
value: function () {
|
|
292
|
-
var _startCall = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(phoneNumber) {
|
|
293
|
-
var _this$_userControl$ge, phoneUserId, userName;
|
|
314
|
+
var _startCall = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(phoneNumber, callOutType) {
|
|
315
|
+
var _this$_userControl$ge, phoneUserId, userName, type;
|
|
294
316
|
return _regenerator["default"].wrap(function (_context2) {
|
|
295
317
|
while (1) switch (_context2.prev = _context2.next) {
|
|
296
318
|
case 0:
|
|
@@ -304,11 +326,13 @@ var FcrUIPhoneAudioConnectorProviderImpl = exports.FcrUIPhoneAudioConnectorProvi
|
|
|
304
326
|
}
|
|
305
327
|
return _context2.abrupt("return");
|
|
306
328
|
case 1:
|
|
329
|
+
type = callOutType !== null && callOutType !== void 0 ? callOutType : this.getPhoneCallOutType();
|
|
307
330
|
_context2.next = 2;
|
|
308
331
|
return this._roomControl.getRoomConnectorControl().startSessionByPhone({
|
|
309
332
|
phoneNumber: phoneNumber,
|
|
310
333
|
userName: userName,
|
|
311
|
-
phoneUserId: phoneUserId
|
|
334
|
+
phoneUserId: phoneUserId,
|
|
335
|
+
type: type
|
|
312
336
|
});
|
|
313
337
|
case 2:
|
|
314
338
|
this._sessionId = _context2.sent;
|
|
@@ -318,11 +342,40 @@ var FcrUIPhoneAudioConnectorProviderImpl = exports.FcrUIPhoneAudioConnectorProvi
|
|
|
318
342
|
}
|
|
319
343
|
}, _callee2, this);
|
|
320
344
|
}));
|
|
321
|
-
function startCall(_x) {
|
|
345
|
+
function startCall(_x, _x2) {
|
|
322
346
|
return _startCall.apply(this, arguments);
|
|
323
347
|
}
|
|
324
348
|
return startCall;
|
|
325
349
|
}()
|
|
350
|
+
}, {
|
|
351
|
+
key: "getCallOutTypeArray",
|
|
352
|
+
value: function getCallOutTypeArray() {
|
|
353
|
+
var _permissionInfo$info$, _permissionInfo$info;
|
|
354
|
+
var permissionInfo = this._roomControl.getPrivilegeControl().getLocalUserPermissionInfo(_fcrCore.FcrPermissionAction.CallOut);
|
|
355
|
+
if (!permissionInfo.enable) {
|
|
356
|
+
return [];
|
|
357
|
+
}
|
|
358
|
+
var types = (_permissionInfo$info$ = (_permissionInfo$info = permissionInfo.info) === null || _permissionInfo$info === void 0 || (_permissionInfo$info = _permissionInfo$info.params) === null || _permissionInfo$info === void 0 ? void 0 : _permissionInfo$info.type) !== null && _permissionInfo$info$ !== void 0 ? _permissionInfo$info$ : [];
|
|
359
|
+
return types;
|
|
360
|
+
}
|
|
361
|
+
}, {
|
|
362
|
+
key: "getPhoneCallOutType",
|
|
363
|
+
value: function getPhoneCallOutType() {
|
|
364
|
+
var types = this.getCallOutTypeArray();
|
|
365
|
+
var isSupportVolte = types.find(function (item) {
|
|
366
|
+
return item === _type.FcrPhoneConnectorSessionTypeToStringMap[_type.FcrPhoneConnectorSessionType.VOLTE];
|
|
367
|
+
}) && this._abilityProvider.isCallOutVolteAbilitySupported();
|
|
368
|
+
var volte = isSupportVolte ? _type.FcrPhoneConnectorSessionType.VOLTE : null;
|
|
369
|
+
var isSupportPstn = types.find(function (item) {
|
|
370
|
+
return item === _type.FcrPhoneConnectorSessionTypeToStringMap[_type.FcrPhoneConnectorSessionType.PSTN];
|
|
371
|
+
}) && this._abilityProvider.isCallOutAbilitySupported();
|
|
372
|
+
var pstn = isSupportPstn ? _type.FcrPhoneConnectorSessionType.PSTN : null;
|
|
373
|
+
var type = volte || pstn;
|
|
374
|
+
if (!type) {
|
|
375
|
+
throw new Error('You are not allowed to call out');
|
|
376
|
+
}
|
|
377
|
+
return type;
|
|
378
|
+
}
|
|
326
379
|
}, {
|
|
327
380
|
key: "stopCall",
|
|
328
381
|
value: function () {
|
|
@@ -441,16 +494,22 @@ var FcrUIPhoneAudioConnectorProviderImpl = exports.FcrUIPhoneAudioConnectorProvi
|
|
|
441
494
|
var connectorType = _ref3.connectorType;
|
|
442
495
|
return connectorType === _fcrCore.FcrRoomConnectorType.PSTN;
|
|
443
496
|
};
|
|
497
|
+
var matchVOLTE = function matchVOLTE(_ref4) {
|
|
498
|
+
var connectorType = _ref4.connectorType;
|
|
499
|
+
return connectorType === _fcrCore.FcrRoomConnectorType.VOLTE;
|
|
500
|
+
};
|
|
444
501
|
var _this$_userControl$ge2 = this._userControl.getLocalUser(),
|
|
445
502
|
userId = _this$_userControl$ge2.userId;
|
|
446
503
|
var myStreams = this._streamControl.getStreamsByUserId(userId);
|
|
447
504
|
var allStreams = this._streamControl.getStreamList();
|
|
448
505
|
this.hasPstnStream = allStreams.some(matchPSTN);
|
|
506
|
+
this.hasVolteStream = allStreams.some(matchVOLTE);
|
|
449
507
|
this.hasOwnPstnStream = myStreams.some(matchPSTN);
|
|
508
|
+
this.hasOwnVolteStream = myStreams.some(matchVOLTE);
|
|
450
509
|
this.hasNeedMergedStream = allStreams.some(function (stream) {
|
|
451
|
-
return stream.owner.connectorType === _fcrCore.FcrRoomConnectorType.PSTN && stream.connectorType === _fcrCore.FcrRoomConnectorType.PSTN;
|
|
510
|
+
return stream.owner.connectorType === _fcrCore.FcrRoomConnectorType.PSTN && stream.connectorType === _fcrCore.FcrRoomConnectorType.PSTN || stream.owner.connectorType === _fcrCore.FcrRoomConnectorType.VOLTE && stream.connectorType === _fcrCore.FcrRoomConnectorType.VOLTE;
|
|
452
511
|
});
|
|
453
|
-
if (this.hasOwnPstnStream) {
|
|
512
|
+
if (this.hasOwnPstnStream || this.hasOwnVolteStream) {
|
|
454
513
|
this._deviceProvider.setConnectType(_type2.FcrUIConnectType.PHONE);
|
|
455
514
|
}
|
|
456
515
|
return {
|
|
@@ -475,7 +534,7 @@ var FcrUIPhoneAudioConnectorProviderImpl = exports.FcrUIPhoneAudioConnectorProvi
|
|
|
475
534
|
try {
|
|
476
535
|
var _loop = function _loop() {
|
|
477
536
|
var modifiedStream = _step.value.modifiedStream;
|
|
478
|
-
if (modifiedStream.connectorType !== _fcrCore.FcrRoomConnectorType.PSTN) return {
|
|
537
|
+
if (modifiedStream.connectorType !== _fcrCore.FcrRoomConnectorType.PSTN && modifiedStream.connectorType !== _fcrCore.FcrRoomConnectorType.VOLTE) return {
|
|
479
538
|
v: void 0
|
|
480
539
|
};
|
|
481
540
|
if (modifiedStream.owner.userId === userId && _this3._deviceProvider.connectType === _type2.FcrUIConnectType.PHONE) {
|
|
@@ -508,8 +567,8 @@ var FcrUIPhoneAudioConnectorProviderImpl = exports.FcrUIPhoneAudioConnectorProvi
|
|
|
508
567
|
}]);
|
|
509
568
|
}();
|
|
510
569
|
_FcrUIPhoneAudioConnectorProviderImpl = FcrUIPhoneAudioConnectorProviderImpl;
|
|
511
|
-
var _applyDecs$e = _applyDecs(_FcrUIPhoneAudioConnectorProviderImpl, [[_mobx.observable, 1, "accepted"], [_mobx.observable, 1, "connectionPhoneInfos"], [_mobx.observable, 1, "connectInfo"], [_mobx.observable, 1, "phoneCallState"], [_mobx.observable, 1, "phoneCallReason"], [_mobx.observable, 1, "connectSession"], [_mobx.observable, 1, "calling"], [_mobx.observable, 1, "outgoingCall"], [_mobx.observable, 1, "isHangup"], [_mobx.observable, 1, "hasPstnStream"], [_mobx.observable, 1, "hasOwnPstnStream"], [_mobx.observable, 1, "hasNeedMergedStream"], [_mobx.computed, 3, "connectType"], [_getConnectorInfoDecs, 18, "getConnectorInfo"], [_setConnectionInfoDecs, 18, "setConnectionInfo"], [_startCallDecs, 18, "startCall"], [_stopCallDecs, 18, "stopCall"], [_decorator.bound, 2, "_setResetTimer"], [_phoneCallUpdatedDecs, 18, "_phoneCallUpdated"], [_phoneCallReasonDecs, 18, "_phoneCallReason"], [_setStreamStateDecs, 18, "_setStreamState"], [_handleStreamsAddedOrUpdatedDecs, 18, "_handleStreamsAddedOrUpdated"], [_handleStreamsRemovedDecs, 18, "_handleStreamsRemoved"]], []).e;
|
|
512
|
-
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e,
|
|
570
|
+
var _applyDecs$e = _applyDecs(_FcrUIPhoneAudioConnectorProviderImpl, [[_mobx.observable, 1, "accepted"], [_mobx.observable, 1, "connectionPhoneInfos"], [_mobx.observable, 1, "connectInfo"], [_mobx.observable, 1, "phoneCallState"], [_mobx.observable, 1, "phoneCallReason"], [_mobx.observable, 1, "connectSession"], [_mobx.observable, 1, "calling"], [_mobx.observable, 1, "outgoingCall"], [_mobx.observable, 1, "isHangup"], [_mobx.observable, 1, "hasPstnStream"], [_mobx.observable, 1, "hasVolteStream"], [_mobx.observable, 1, "hasOwnPstnStream"], [_mobx.observable, 1, "hasOwnVolteStream"], [_mobx.observable, 1, "hasNeedMergedStream"], [_mobx.computed, 3, "connectType"], [_getConnectorInfoDecs, 18, "getConnectorInfo"], [_setConnectionInfoDecs, 18, "setConnectionInfo"], [_startCallDecs, 18, "startCall"], [_getCallOutTypeArrayDecs, 18, "getCallOutTypeArray"], [_getPhoneCallOutTypeDecs, 18, "getPhoneCallOutType"], [_stopCallDecs, 18, "stopCall"], [_decorator.bound, 2, "_setResetTimer"], [_phoneCallUpdatedDecs, 18, "_phoneCallUpdated"], [_phoneCallReasonDecs, 18, "_phoneCallReason"], [_setStreamStateDecs, 18, "_setStreamState"], [_handleStreamsAddedOrUpdatedDecs, 18, "_handleStreamsAddedOrUpdated"], [_handleStreamsRemovedDecs, 18, "_handleStreamsRemoved"]], []).e;
|
|
571
|
+
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e, 15);
|
|
513
572
|
_init_accepted = _applyDecs$e2[0];
|
|
514
573
|
_init_connectionPhoneInfos = _applyDecs$e2[1];
|
|
515
574
|
_init_connectInfo = _applyDecs$e2[2];
|
|
@@ -520,7 +579,9 @@ _init_calling = _applyDecs$e2[6];
|
|
|
520
579
|
_init_outgoingCall = _applyDecs$e2[7];
|
|
521
580
|
_init_isHangup = _applyDecs$e2[8];
|
|
522
581
|
_init_hasPstnStream = _applyDecs$e2[9];
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
582
|
+
_init_hasVolteStream = _applyDecs$e2[10];
|
|
583
|
+
_init_hasOwnPstnStream = _applyDecs$e2[11];
|
|
584
|
+
_init_hasOwnVolteStream = _applyDecs$e2[12];
|
|
585
|
+
_init_hasNeedMergedStream = _applyDecs$e2[13];
|
|
586
|
+
_initProto = _applyDecs$e2[14];
|
|
526
587
|
_applyDecs$e;
|
|
@@ -14,11 +14,17 @@ type FcrUIUserAudioVolumeProviderParams = {
|
|
|
14
14
|
deviceProvider: FcrUIDeviceProvider;
|
|
15
15
|
screenShareProvider: FcrUIScreenShareProvider;
|
|
16
16
|
streamControl: FcrStreamControl;
|
|
17
|
+
/** 触发语音激励的音量阈值
|
|
18
|
+
* @browser 45
|
|
19
|
+
* @electron 35
|
|
20
|
+
*/
|
|
21
|
+
volumeThreshold: number;
|
|
17
22
|
};
|
|
18
23
|
export interface FcrUIUserAudioVolumeProvider {
|
|
19
24
|
userIdToAudioStreamIdMap: Map<string, string>;
|
|
20
25
|
}
|
|
21
26
|
export declare class FcrUIUserAudioVolumeProviderImpl implements FcrUIUserAudioVolumeProvider, FcrUIManagedObject {
|
|
27
|
+
private readonly _volumeThreshold;
|
|
22
28
|
private _audioVolumeData;
|
|
23
29
|
private _videoWindowData;
|
|
24
30
|
private _settingData;
|
|
@@ -99,7 +99,7 @@ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side
|
|
|
99
99
|
_ref = (_updateAudioVolumesDecs = (0, _decorator.throttled)(16, {
|
|
100
100
|
leading: false,
|
|
101
101
|
trailing: true
|
|
102
|
-
}), "
|
|
102
|
+
}), "_volumeThreshold");
|
|
103
103
|
var FcrUIUserAudioVolumeProviderImpl = exports.FcrUIUserAudioVolumeProviderImpl = /*#__PURE__*/function () {
|
|
104
104
|
function FcrUIUserAudioVolumeProviderImpl(params) {
|
|
105
105
|
var _this = this;
|
|
@@ -122,6 +122,7 @@ var FcrUIUserAudioVolumeProviderImpl = exports.FcrUIUserAudioVolumeProviderImpl
|
|
|
122
122
|
this._deviceProvider = params.deviceProvider;
|
|
123
123
|
this._screenShareProvider = params.screenShareProvider;
|
|
124
124
|
this._streamControl = params.streamControl;
|
|
125
|
+
this._volumeThreshold = params.volumeThreshold;
|
|
125
126
|
this._streamControl.addObserver(this._streamControlObserver);
|
|
126
127
|
this._deviceProvider.setMicrophoneVolumeLevelDelegate(this._handleMicrophoneVolumeUpdated);
|
|
127
128
|
this._disposers.push((0, _mobx.reaction)(function () {
|
|
@@ -237,7 +238,7 @@ var FcrUIUserAudioVolumeProviderImpl = exports.FcrUIUserAudioVolumeProviderImpl
|
|
|
237
238
|
streamId = _step$value[0],
|
|
238
239
|
volume = _step$value[1];
|
|
239
240
|
// 参照以前的逻辑, 找到第一个达到阈值的流后,就返回该流 id
|
|
240
|
-
if (volume >
|
|
241
|
+
if (volume > this._volumeThreshold) {
|
|
241
242
|
// 过滤掉自己的流
|
|
242
243
|
if (streamId === '0') {
|
|
243
244
|
continue;
|
package/lib/runtime.d.ts
CHANGED
|
@@ -75,6 +75,7 @@ export interface Runtime {
|
|
|
75
75
|
getNetworkType(): Promise<NetworkType>;
|
|
76
76
|
getSystemMemorySize(): number;
|
|
77
77
|
getSystemCpuInfo(): CpuInfo[];
|
|
78
|
+
getSystemVersion(): string;
|
|
78
79
|
downloadAndExtractResourceFileFromZip(zipUrl: string, type: FcrUiResourceType): Promise<string[]>;
|
|
79
80
|
downloadResourceFile(fileUrl: string, type: FcrUiResourceType): Promise<string>;
|
|
80
81
|
fileToBlob(filePath: string, type: 'image' | 'video' | 'audio'): Blob;
|
package/lib/scenes/main-scene.js
CHANGED
|
@@ -335,7 +335,8 @@ var FcrMainUIScene = exports.FcrMainUIScene = /*#__PURE__*/function (_FcrBaseUIS
|
|
|
335
335
|
})
|
|
336
336
|
}, dialogId);
|
|
337
337
|
},
|
|
338
|
-
electronWindowConfig: _invite.electronWindowConfig
|
|
338
|
+
electronWindowConfig: _invite.electronWindowConfig,
|
|
339
|
+
webDialogConfig: _invite.webDialogConfig
|
|
339
340
|
}, {
|
|
340
341
|
key: _constant.FcrUIDialogKey.CHAT,
|
|
341
342
|
component: function component(_ref0) {
|
|
@@ -2,6 +2,7 @@ import { FcrChatRoomReceiveMessage, FcrUIChatProvider } from '../providers/chat-
|
|
|
2
2
|
import { ChatRoomStoreMap } from '../modules/action-bar/type';
|
|
3
3
|
import { FcrUIRoomType } from '../type';
|
|
4
4
|
import { FcrUIManagedObject } from '../object-manager';
|
|
5
|
+
import { FcrChatRoomConnectionState } from 'fcr-core/lib/room-control/chatroom-control/type';
|
|
5
6
|
export interface FcrUISharedChatDataSource {
|
|
6
7
|
get newMessageCount(): ChatRoomStoreMap;
|
|
7
8
|
set newMessageCount(value: ChatRoomStoreMap);
|
|
@@ -15,13 +16,31 @@ export interface FcrUISharedChatDataSource {
|
|
|
15
16
|
* 设置聊天当前tab
|
|
16
17
|
*/
|
|
17
18
|
set activeTab(roomType: FcrUIRoomType);
|
|
19
|
+
/**
|
|
20
|
+
* 获取指定房间的连接状态
|
|
21
|
+
*/
|
|
22
|
+
getConnectionState(roomType: FcrUIRoomType): FcrChatRoomConnectionState;
|
|
23
|
+
/**
|
|
24
|
+
* 设置指定房间的连接状态
|
|
25
|
+
*/
|
|
26
|
+
setConnectionState(roomType: FcrUIRoomType, state: FcrChatRoomConnectionState): void;
|
|
27
|
+
/**
|
|
28
|
+
* 获取当前活跃tab的连接状态
|
|
29
|
+
*/
|
|
30
|
+
get currentConnectionState(): FcrChatRoomConnectionState;
|
|
18
31
|
}
|
|
19
32
|
export declare class FcrUISharedChatDataSourceImpl implements FcrUISharedChatDataSource, FcrUIManagedObject {
|
|
20
33
|
private _chatProvider;
|
|
21
34
|
accessor newMessageCount: ChatRoomStoreMap;
|
|
22
35
|
accessor latestMessage: FcrChatRoomReceiveMessage | undefined;
|
|
23
36
|
accessor activeTab: FcrUIRoomType;
|
|
37
|
+
accessor mainRoomConnectionState: FcrChatRoomConnectionState;
|
|
38
|
+
accessor waitingRoomConnectionState: FcrChatRoomConnectionState;
|
|
24
39
|
constructor(_chatProvider: FcrUIChatProvider);
|
|
25
40
|
release(): void;
|
|
26
41
|
private _handleNewMessageEvent;
|
|
42
|
+
private _handleConnectionStateUpdated;
|
|
43
|
+
setConnectionState(roomType: FcrUIRoomType, state: FcrChatRoomConnectionState): void;
|
|
44
|
+
getConnectionState(roomType: FcrUIRoomType): FcrChatRoomConnectionState;
|
|
45
|
+
get currentConnectionState(): FcrChatRoomConnectionState;
|
|
27
46
|
}
|
|
@@ -59,8 +59,9 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
59
59
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
60
60
|
var _mobx = require("mobx");
|
|
61
61
|
var _type = require("../type");
|
|
62
|
+
var _type2 = require("fcr-core/lib/room-control/chatroom-control/type");
|
|
62
63
|
var _FcrUISharedChatDataSourceImpl;
|
|
63
|
-
var _initProto, _init_newMessageCount, _init_latestMessage, _init_activeTab, _handleNewMessageEventDecs, _init__handleNewMessageEvent, _ref;
|
|
64
|
+
var _initProto, _init_newMessageCount, _init_latestMessage, _init_activeTab, _init_mainRoomConnectionState, _init_waitingRoomConnectionState, _handleNewMessageEventDecs, _init__handleNewMessageEvent, _handleConnectionStateUpdatedDecs, _init__handleConnectionStateUpdated, _setConnectionStateDecs, _ref;
|
|
64
65
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
65
66
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
66
67
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
@@ -76,7 +77,9 @@ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side
|
|
|
76
77
|
var _A = /*#__PURE__*/new WeakMap();
|
|
77
78
|
var _B = /*#__PURE__*/new WeakMap();
|
|
78
79
|
var _C = /*#__PURE__*/new WeakMap();
|
|
79
|
-
|
|
80
|
+
var _D = /*#__PURE__*/new WeakMap();
|
|
81
|
+
var _E = /*#__PURE__*/new WeakMap();
|
|
82
|
+
_ref = (_handleNewMessageEventDecs = [_mobx.action, _mobx.action.bound], _handleConnectionStateUpdatedDecs = [_mobx.action, _mobx.action.bound], _setConnectionStateDecs = [_mobx.action, _mobx.action.bound], "newMessageCount");
|
|
80
83
|
var FcrUISharedChatDataSourceImpl = exports.FcrUISharedChatDataSourceImpl = /*#__PURE__*/function () {
|
|
81
84
|
function FcrUISharedChatDataSourceImpl(_chatProvider) {
|
|
82
85
|
var _this = this;
|
|
@@ -84,6 +87,8 @@ var FcrUISharedChatDataSourceImpl = exports.FcrUISharedChatDataSourceImpl = /*#_
|
|
|
84
87
|
_classPrivateFieldInitSpec(this, _A, (_initProto(this), _init_newMessageCount(this, (0, _defineProperty2["default"])({}, _type.FcrUIRoomType.MAIN_ROOM, 0))));
|
|
85
88
|
_classPrivateFieldInitSpec(this, _B, _init_latestMessage(this));
|
|
86
89
|
_classPrivateFieldInitSpec(this, _C, _init_activeTab(this, _type.FcrUIRoomType.MAIN_ROOM));
|
|
90
|
+
_classPrivateFieldInitSpec(this, _D, _init_mainRoomConnectionState(this, _type2.FcrChatRoomConnectionState.Disconnected));
|
|
91
|
+
_classPrivateFieldInitSpec(this, _E, _init_waitingRoomConnectionState(this, _type2.FcrChatRoomConnectionState.Disconnected));
|
|
87
92
|
(0, _defineProperty2["default"])(this, "_handleNewMessageEvent", _init__handleNewMessageEvent(this, function (info) {
|
|
88
93
|
var _msgObj$currentRoomTy;
|
|
89
94
|
var msgObj = _objectSpread({}, _this.newMessageCount);
|
|
@@ -95,9 +100,13 @@ var FcrUISharedChatDataSourceImpl = exports.FcrUISharedChatDataSourceImpl = /*#_
|
|
|
95
100
|
_this.newMessageCount = _objectSpread({}, msgObj);
|
|
96
101
|
_this.latestMessage = latestMessage;
|
|
97
102
|
}));
|
|
103
|
+
(0, _defineProperty2["default"])(this, "_handleConnectionStateUpdated", _init__handleConnectionStateUpdated(this, function (_, state, roomType) {
|
|
104
|
+
_this.setConnectionState(roomType, state);
|
|
105
|
+
}));
|
|
98
106
|
this._chatProvider = _chatProvider;
|
|
99
107
|
this._chatProvider.addObserver({
|
|
100
|
-
onUnReadMessageUpdated: this._handleNewMessageEvent
|
|
108
|
+
onUnReadMessageUpdated: this._handleNewMessageEvent,
|
|
109
|
+
onChatRoomConnectionStateUpdated: this._handleConnectionStateUpdated
|
|
101
110
|
});
|
|
102
111
|
}
|
|
103
112
|
return (0, _createClass2["default"])(FcrUISharedChatDataSourceImpl, [{
|
|
@@ -126,17 +135,55 @@ var FcrUISharedChatDataSourceImpl = exports.FcrUISharedChatDataSourceImpl = /*#_
|
|
|
126
135
|
set: function set(v) {
|
|
127
136
|
_classPrivateFieldSet(_C, this, v);
|
|
128
137
|
}
|
|
138
|
+
}, {
|
|
139
|
+
key: "mainRoomConnectionState",
|
|
140
|
+
get: function get() {
|
|
141
|
+
return _classPrivateFieldGet(_D, this);
|
|
142
|
+
},
|
|
143
|
+
set: function set(v) {
|
|
144
|
+
_classPrivateFieldSet(_D, this, v);
|
|
145
|
+
}
|
|
146
|
+
}, {
|
|
147
|
+
key: "waitingRoomConnectionState",
|
|
148
|
+
get: function get() {
|
|
149
|
+
return _classPrivateFieldGet(_E, this);
|
|
150
|
+
},
|
|
151
|
+
set: function set(v) {
|
|
152
|
+
_classPrivateFieldSet(_E, this, v);
|
|
153
|
+
}
|
|
129
154
|
}, {
|
|
130
155
|
key: "release",
|
|
131
156
|
value: function release() {}
|
|
157
|
+
}, {
|
|
158
|
+
key: "setConnectionState",
|
|
159
|
+
value: function setConnectionState(roomType, state) {
|
|
160
|
+
if (roomType === _type.FcrUIRoomType.MAIN_ROOM) {
|
|
161
|
+
this.mainRoomConnectionState = state;
|
|
162
|
+
} else if (roomType === _type.FcrUIRoomType.WAITING_ROOM) {
|
|
163
|
+
this.waitingRoomConnectionState = state;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}, {
|
|
167
|
+
key: "getConnectionState",
|
|
168
|
+
value: function getConnectionState(roomType) {
|
|
169
|
+
return roomType === _type.FcrUIRoomType.MAIN_ROOM ? this.mainRoomConnectionState : this.waitingRoomConnectionState;
|
|
170
|
+
}
|
|
171
|
+
}, {
|
|
172
|
+
key: "currentConnectionState",
|
|
173
|
+
get: function get() {
|
|
174
|
+
return this.getConnectionState(this.activeTab);
|
|
175
|
+
}
|
|
132
176
|
}]);
|
|
133
177
|
}();
|
|
134
178
|
_FcrUISharedChatDataSourceImpl = FcrUISharedChatDataSourceImpl;
|
|
135
|
-
var _applyDecs$e = _applyDecs(_FcrUISharedChatDataSourceImpl, [[_mobx.observable, 1, "newMessageCount"], [_mobx.observable, 1, "latestMessage"], [_mobx.observable, 1, "activeTab"], [_handleNewMessageEventDecs, 16, "_handleNewMessageEvent"]], []).e;
|
|
136
|
-
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e,
|
|
179
|
+
var _applyDecs$e = _applyDecs(_FcrUISharedChatDataSourceImpl, [[_mobx.observable, 1, "newMessageCount"], [_mobx.observable, 1, "latestMessage"], [_mobx.observable, 1, "activeTab"], [_mobx.observable, 1, "mainRoomConnectionState"], [_mobx.observable, 1, "waitingRoomConnectionState"], [_setConnectionStateDecs, 18, "setConnectionState"], [_mobx.computed, 3, "currentConnectionState"], [_handleNewMessageEventDecs, 16, "_handleNewMessageEvent"], [_handleConnectionStateUpdatedDecs, 16, "_handleConnectionStateUpdated"]], []).e;
|
|
180
|
+
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e, 8);
|
|
137
181
|
_init_newMessageCount = _applyDecs$e2[0];
|
|
138
182
|
_init_latestMessage = _applyDecs$e2[1];
|
|
139
183
|
_init_activeTab = _applyDecs$e2[2];
|
|
140
|
-
|
|
141
|
-
|
|
184
|
+
_init_mainRoomConnectionState = _applyDecs$e2[3];
|
|
185
|
+
_init_waitingRoomConnectionState = _applyDecs$e2[4];
|
|
186
|
+
_init__handleNewMessageEvent = _applyDecs$e2[5];
|
|
187
|
+
_init__handleConnectionStateUpdated = _applyDecs$e2[6];
|
|
188
|
+
_initProto = _applyDecs$e2[7];
|
|
142
189
|
_applyDecs$e;
|
|
@@ -33,6 +33,11 @@ export interface FcrUISharedMemberDataSource {
|
|
|
33
33
|
* @returns 如果本地用户处于 PSTN 模式则返回 true,否则返回 false。
|
|
34
34
|
*/
|
|
35
35
|
get hasOwnPstnStream(): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* 检查本地用户是否处于 VOLTE 模式。
|
|
38
|
+
* @returns 如果本地用户处于 VOLTE 模式则返回 true,否则返回 false。
|
|
39
|
+
*/
|
|
40
|
+
get hasOwnVolteStream(): boolean;
|
|
36
41
|
/**
|
|
37
42
|
* 检查本地用户是否是主持人。
|
|
38
43
|
* @returns 如果本地用户是主持人或联系主持人 模式则返回 true,否则返回 false。
|
|
@@ -79,6 +84,7 @@ export declare class FcrUISharedMemberDataSourceImpl implements FcrUISharedMembe
|
|
|
79
84
|
private _dataSource;
|
|
80
85
|
private _disposers;
|
|
81
86
|
private accessor _isLocalUserInPstn;
|
|
87
|
+
private accessor _isLocalUserInVolte;
|
|
82
88
|
private accessor _interpreterInputLanguageList;
|
|
83
89
|
private accessor _localUser;
|
|
84
90
|
private _userObserver;
|
|
@@ -88,13 +94,14 @@ export declare class FcrUISharedMemberDataSourceImpl implements FcrUISharedMembe
|
|
|
88
94
|
accessor shareScreenVideoSize: FcrRemoteVideoStats['dimensions'] | null;
|
|
89
95
|
get localUserId(): string;
|
|
90
96
|
get hasOwnPstnStream(): boolean;
|
|
97
|
+
get hasOwnVolteStream(): boolean;
|
|
91
98
|
get interpreterInputLanguageList(): {
|
|
92
99
|
userId: string;
|
|
93
100
|
language: FcrLanguage;
|
|
94
101
|
}[];
|
|
95
102
|
get localUser(): FcrUserInfo;
|
|
96
103
|
get localUserRole(): FcrUserRole;
|
|
97
|
-
get localUserRoleString(): "participant" | "host" | "
|
|
104
|
+
get localUserRoleString(): "participant" | "host" | "audience" | "cohost" | "observer" | "robot";
|
|
98
105
|
get isLocalUserHost(): boolean;
|
|
99
106
|
get remoteMembers(): FcrUIMemberDataImpl[];
|
|
100
107
|
get remoteMembersUserInfosList(): FcrUserInfo[];
|
|
@@ -105,6 +112,7 @@ export declare class FcrUISharedMemberDataSourceImpl implements FcrUISharedMembe
|
|
|
105
112
|
updateMemberListWithBoardState(): void;
|
|
106
113
|
release(): void;
|
|
107
114
|
private _setIsLocalUserInPstn;
|
|
115
|
+
private _setIsLocalUserInVolte;
|
|
108
116
|
private _handleAllUserCountUpdated;
|
|
109
117
|
private _initUserList;
|
|
110
118
|
private _handleUserInfoUpdated;
|