fcr-ui-scene 3.6.3 → 3.6.4
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/base.js +0 -3
- package/lib/creator.js +26 -24
- package/lib/electron/app.js +31 -13
- package/lib/electron/bootstrap-dev.js +2 -3
- package/lib/electron/bootstrap-sdk.js +4 -10
- package/lib/electron/exit-codes.d.ts +14 -0
- package/lib/electron/exit-codes.js +22 -0
- package/lib/electron/injections.js +117 -118
- package/lib/electron/ipc/ipc.js +0 -1
- package/lib/electron/main.js +44 -3
- package/lib/electron/tools.js +0 -4
- package/lib/electron/window.js +1 -4
- package/lib/fragments/annotation/index.js +1 -2
- package/lib/fragments/annotation/store.js +47 -48
- package/lib/modules/action-bar/components/apps/app-item/index.js +0 -2
- package/lib/modules/action-bar/components/apps/app-list.js +2 -5
- package/lib/modules/action-bar/components/apps/useAppItemOptions.js +0 -3
- package/lib/modules/action-bar/components/apps/useWidgetList.js +2 -1
- package/lib/modules/action-bar/components/collapse/index.js +0 -4
- package/lib/modules/action-bar/components/item/index.js +0 -2
- package/lib/modules/action-bar/components/leave/index.js +0 -2
- package/lib/modules/action-bar/components/more/poppover-content.js +0 -4
- package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.js +2 -1
- package/lib/modules/action-bar/components/notification-bar/index.js +0 -2
- package/lib/modules/action-bar/components/screen-share/index.js +0 -1
- package/lib/modules/action-bar/components/screen-share/submenu.js +0 -3
- package/lib/modules/action-bar/components/trigger-output-language/index.js +11 -14
- package/lib/modules/action-bar/components/trigger-subscribe-language/index.js +8 -11
- package/lib/modules/action-bar/index.js +1 -2
- package/lib/modules/action-bar/store.js +32 -36
- package/lib/modules/annotation/components/control-bar/index.js +3 -2
- package/lib/modules/annotation/components/toolbar/components/color-tool/color-panel/index.js +2 -1
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/index.js +2 -1
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/index.js +0 -2
- package/lib/modules/annotation/components/toolbar/components/pen-tool/pen-panel/index.js +1 -0
- package/lib/modules/annotation/components/toolbar/store.js +0 -1
- package/lib/modules/annotation/index.d.ts +2 -0
- package/lib/modules/annotation/index.js +2 -1
- package/lib/modules/annotation/store.d.ts +5 -3
- package/lib/modules/annotation/store.js +35 -43
- package/lib/modules/audio-stream/index.js +0 -4
- package/lib/modules/chat/chat-room-store.js +6 -10
- package/lib/modules/chat/components/chat-bar/index.js +0 -2
- package/lib/modules/chat/components/chat-select/index.js +0 -1
- package/lib/modules/chat/components/chat-select/select-item/index.js +2 -5
- package/lib/modules/chat/components/message-list/index.js +1 -3
- package/lib/modules/chat/components/message-list/message-item/index.js +11 -13
- package/lib/modules/chat/index.js +13 -14
- package/lib/modules/chat/store.js +0 -1
- package/lib/modules/chat/view.js +11 -15
- package/lib/modules/components/annotation-menu/index.js +0 -3
- package/lib/modules/components/device-control/components/audio-menu/index.js +2 -1
- package/lib/modules/components/device-control/components/video-menu/index.js +2 -1
- package/lib/modules/components/device-control/store.js +0 -1
- package/lib/modules/components/leave-meeting/components/assign-host.js +4 -5
- package/lib/modules/components/leave-meeting/store.js +11 -12
- package/lib/modules/components/member-window/components/member-actions/components/layout/index.js +1 -2
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +1 -2
- package/lib/modules/components/member-window/components/member-actions/components/user-info.js +1 -3
- package/lib/modules/components/member-window/components/member-actions/index.js +0 -1
- package/lib/modules/components/member-window/components/member-actions/provider.js +1 -2
- package/lib/modules/components/member-window/components/member-actions/store.js +20 -20
- package/lib/modules/components/member-window/components/video-player/components/local-video-player.d.ts +3 -0
- package/lib/modules/components/member-window/components/video-player/components/local-video-player.js +16 -3
- package/lib/modules/components/member-window/components/video-player/index.d.ts +2 -0
- package/lib/modules/components/member-window/components/video-player/index.js +3 -3
- package/lib/modules/components/member-window/index.js +1 -0
- package/lib/modules/components/security-menu/index.js +1 -4
- package/lib/modules/components/tab-frame/index.js +0 -4
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.js +2 -1
- package/lib/modules/connection-gateway/components/phone/index.js +5 -4
- package/lib/modules/connection-gateway/index.js +1 -2
- package/lib/modules/connection-gateway/store.js +23 -26
- package/lib/modules/control-bar/components/more-actions/index.js +0 -3
- package/lib/modules/control-bar/index.js +1 -2
- package/lib/modules/control-bar/store.d.ts +1 -0
- package/lib/modules/control-bar/store.js +8 -2
- package/lib/modules/control-bar/view.js +9 -11
- package/lib/modules/device-pretest/settings/beauty.js +1 -2
- package/lib/modules/device-pretest/settings/virtual-background-setting.js +2 -1
- package/lib/modules/device-pretest/store.js +2 -4
- package/lib/modules/dialog/components/control-bar/index.js +3 -3
- package/lib/modules/dialog/components/dialog-container/component/body.js +0 -2
- package/lib/modules/dialog/components/dialog-container/index.js +1 -2
- package/lib/modules/dialog/components/host-area-container/index.js +0 -3
- package/lib/modules/dialog/components/pre-setting-container/component/body.js +0 -2
- package/lib/modules/dialog/components/pre-setting-container/index.js +1 -2
- package/lib/modules/dialog/components/system-preference/index.js +2 -5
- package/lib/modules/dialog/components/video-window/index.js +0 -2
- package/lib/modules/dialog/hooks/use-popover-watcher.js +0 -1
- package/lib/modules/dialog/hooks/useElectron.js +0 -2
- package/lib/modules/dialog/index.js +1 -3
- package/lib/modules/dialog/store.js +1 -5
- package/lib/modules/dialog/view.js +2 -1
- package/lib/modules/event-confirm/components/window/index.js +0 -2
- package/lib/modules/event-confirm/index.js +1 -2
- package/lib/modules/event-confirm/store.js +4 -7
- package/lib/modules/event-confirm/view.js +2 -1
- package/lib/modules/event-sound/index.js +1 -2
- package/lib/modules/event-sound/sound-effect-player.js +2 -2
- package/lib/modules/event-toast/index.js +1 -2
- package/lib/modules/event-toast/store.js +0 -2
- package/lib/modules/event-toast/view.js +2 -1
- package/lib/modules/interpreter/index.js +1 -2
- package/lib/modules/interpreter/interpreter-list/index.js +3 -4
- package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/index.js +2 -5
- package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/index.js +0 -2
- package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-user/index.js +0 -4
- package/lib/modules/interpreter/store.js +5 -10
- package/lib/modules/interpreter/utils.js +15 -14
- package/lib/modules/invite/components/pstn-invite.js +22 -23
- package/lib/modules/invite/components/voip-invite.js +7 -7
- package/lib/modules/invite/enums.js +1 -0
- package/lib/modules/invite/index.js +1 -2
- package/lib/modules/invite/store.js +46 -45
- package/lib/modules/layout/components/CommonVideoRenderer.js +2 -1
- package/lib/modules/layout/components/Gallery.js +5 -3
- package/lib/modules/layout/components/index.js +0 -1
- package/lib/modules/layout/index.js +1 -2
- package/lib/modules/layout/store.d.ts +3 -0
- package/lib/modules/layout/store.js +38 -14
- package/lib/modules/layout/type.js +9 -0
- package/lib/modules/live-streaming/index.dev.js +6 -6
- package/lib/modules/live-streaming/index.js +1 -2
- package/lib/modules/live-streaming/store.js +19 -19
- package/lib/modules/notification/index.js +1 -2
- package/lib/modules/notification/interpreter-status/index.js +2 -1
- package/lib/modules/notification/view.js +1 -2
- package/lib/modules/offscreen-pulling/index.js +0 -1
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.js +1 -4
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +0 -2
- package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.js +0 -2
- package/lib/modules/participant/components/participants/components/participants/components/user-row/index.js +1 -4
- package/lib/modules/participant/components/participants/components/participants/index.js +0 -2
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/interpreter-tag/index.js +0 -1
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.js +0 -2
- package/lib/modules/participant/index.js +1 -4
- package/lib/modules/participant/member-list-data-source.js +0 -3
- package/lib/modules/participant/store.js +81 -86
- package/lib/modules/pc-audio-connect/index.js +1 -2
- package/lib/modules/pc-audio-connect/store.js +9 -10
- package/lib/modules/phone-audio-connect/components/callinfo/index.js +2 -1
- package/lib/modules/phone-audio-connect/index.js +1 -2
- package/lib/modules/phone-audio-connect/store.js +0 -3
- package/lib/modules/phone-audio-connect/view.js +5 -4
- package/lib/modules/setting/audio-settings/audio-settings.js +1 -4
- package/lib/modules/setting/general-settings/general-settings.js +1 -2
- package/lib/modules/setting/index.js +1 -2
- package/lib/modules/setting/minutes-settings/minutes-settings.js +1 -2
- package/lib/modules/setting/state/index.js +0 -4
- package/lib/modules/setting/storage-settings/storage-settings.js +4 -4
- package/lib/modules/setting/store.js +11 -15
- package/lib/modules/setting/translate-settings/translate-settings.js +1 -1
- package/lib/modules/setting/video-settings/video-settings.js +1 -2
- package/lib/modules/setting/view.js +1 -2
- package/lib/modules/share-screen/components/selection/index.js +16 -9
- package/lib/modules/share-screen/index.d.ts +2 -0
- package/lib/modules/share-screen/index.js +3 -3
- package/lib/modules/share-screen/store.d.ts +9 -2
- package/lib/modules/share-screen/store.js +97 -93
- package/lib/modules/state-bar/index.js +1 -2
- package/lib/modules/state-bar/layout-config.js +2 -1
- package/lib/modules/state-bar/live-streaming-state.js +0 -3
- package/lib/modules/state-bar/store.js +0 -1
- package/lib/modules/video-window/components/members/index.js +2 -1
- package/lib/modules/video-window/components/topControl/index.js +0 -3
- package/lib/modules/video-window/index.js +1 -2
- package/lib/modules/video-window/store.js +0 -4
- package/lib/modules/waiting-room-layout/index.js +1 -2
- package/lib/modules/whiteboard/components/control-bar/store.js +0 -1
- package/lib/modules/whiteboard/components/switch-theme/index.js +0 -2
- package/lib/modules/whiteboard/components/switch-theme/item.js +2 -1
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.js +2 -1
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.js +2 -1
- package/lib/modules/whiteboard/components/toolbar/components/expansion/index.js +1 -4
- package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.js +2 -3
- package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +0 -2
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +1 -2
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +1 -3
- package/lib/modules/whiteboard/components/toolbar/hooks/index.js +2 -4
- package/lib/modules/whiteboard/components/toolbar/index.js +1 -1
- package/lib/modules/whiteboard/components/toolbar/store.js +12 -11
- package/lib/modules/whiteboard/index.js +2 -6
- package/lib/modules/whiteboard/style.css +12 -0
- package/lib/modules/whiteboard/view.js +2 -0
- package/lib/modules/widget/index.js +1 -2
- package/lib/modules/widget/web-widget.js +1 -1
- package/lib/plugins/browser-runtime-plugin.js +1 -1
- package/lib/plugins/module-dev-plugin.js +13 -13
- package/lib/providers/ability-provider.d.ts +12 -1
- package/lib/providers/ability-provider.js +8 -1
- package/lib/providers/annotation-provider.js +7 -11
- package/lib/providers/device-privilege-provider.js +81 -83
- package/lib/providers/device-provider.js +193 -198
- package/lib/providers/device-stream-provider.js +24 -27
- package/lib/providers/event-provider.js +0 -2
- package/lib/providers/interpreter-provider.js +195 -197
- package/lib/providers/message-provider.js +0 -2
- package/lib/providers/phone-audio-provider.js +17 -19
- package/lib/providers/privilege-provider.js +53 -58
- package/lib/providers/renderer-provider.d.ts +3 -1
- package/lib/providers/renderer-provider.js +18 -4
- package/lib/providers/room-provider.js +31 -33
- package/lib/providers/screen-share-provider.d.ts +1 -0
- package/lib/providers/screen-share-provider.js +66 -65
- package/lib/providers/sharing-provider.js +2 -1
- package/lib/providers/user-setting-storage-provider.js +0 -2
- package/lib/providers/widget-provider.js +0 -1
- package/lib/scenes/main-scene.js +11 -13
- package/lib/scenes/waiting-scene.js +3 -3
- package/lib/shared-data-source/chat-data.js +0 -2
- package/lib/shared-data-source/interpreter.js +0 -2
- package/lib/shared-data-source/layout-data.js +1 -4
- package/lib/shared-data-source/member-data.js +0 -4
- package/lib/shared-data-source/pin-data.js +0 -1
- package/lib/shared-data-source/screen-share-data.d.ts +2 -2
- package/lib/shared-data-source/screen-share-data.js +1 -2
- package/lib/shared-data-source/security-data.js +0 -1
- package/lib/shared-data-source/setting.js +0 -2
- package/lib/shared-data-source/video-window.js +26 -30
- package/lib/shared-data-source/waiting-room.js +0 -2
- package/lib/type.js +14 -0
- package/lib/ui-scene.js +7 -8
- package/lib/utilities/constant.js +7 -0
- package/lib/utilities/copyText.js +12 -12
- package/lib/utilities/hooks.js +1 -2
- package/lib/utilities/logger.js +0 -1
- package/lib/utilities/parameters.js +2 -2
- package/lib/utilities/privilege.js +0 -3
- package/lib/utilities/renderer-event.js +0 -2
- package/lib/utilities/setting-config-storage.d.ts +2 -0
- package/lib/utilities/setting-config-storage.js +24 -4
- package/lib/utilities/tools.js +6 -10
- package/lib/waiting-room-control-manager.js +26 -28
- package/package.json +5 -5
|
@@ -42,11 +42,6 @@ require("core-js/modules/es.regexp.exec.js");
|
|
|
42
42
|
require("core-js/modules/es.set.js");
|
|
43
43
|
require("core-js/modules/es.string.iterator.js");
|
|
44
44
|
require("core-js/modules/es.weak-map.js");
|
|
45
|
-
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
46
|
-
require("core-js/modules/esnext.async-iterator.find.js");
|
|
47
|
-
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
48
|
-
require("core-js/modules/esnext.async-iterator.map.js");
|
|
49
|
-
require("core-js/modules/esnext.async-iterator.some.js");
|
|
50
45
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
51
46
|
require("core-js/modules/esnext.iterator.filter.js");
|
|
52
47
|
require("core-js/modules/esnext.iterator.find.js");
|
|
@@ -488,21 +483,21 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
488
483
|
value: function () {
|
|
489
484
|
var _ifAccessMicrophone = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
490
485
|
var hasSystemPermission;
|
|
491
|
-
return _regenerator["default"].wrap(function
|
|
486
|
+
return _regenerator["default"].wrap(function (_context) {
|
|
492
487
|
while (1) switch (_context.prev = _context.next) {
|
|
493
488
|
case 0:
|
|
494
489
|
hasSystemPermission = true;
|
|
495
490
|
if (!(0, _env.isElectron)()) {
|
|
496
|
-
_context.next =
|
|
491
|
+
_context.next = 2;
|
|
497
492
|
break;
|
|
498
493
|
}
|
|
499
|
-
_context.next =
|
|
494
|
+
_context.next = 1;
|
|
500
495
|
return window.runtime.checkMediaPermission('microphone');
|
|
501
|
-
case
|
|
496
|
+
case 1:
|
|
502
497
|
hasSystemPermission = _context.sent;
|
|
503
|
-
case
|
|
498
|
+
case 2:
|
|
504
499
|
return _context.abrupt("return", hasSystemPermission);
|
|
505
|
-
case
|
|
500
|
+
case 3:
|
|
506
501
|
case "end":
|
|
507
502
|
return _context.stop();
|
|
508
503
|
}
|
|
@@ -518,21 +513,21 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
518
513
|
value: function () {
|
|
519
514
|
var _ifAccessCamera = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
520
515
|
var hasSystemPermission;
|
|
521
|
-
return _regenerator["default"].wrap(function
|
|
516
|
+
return _regenerator["default"].wrap(function (_context2) {
|
|
522
517
|
while (1) switch (_context2.prev = _context2.next) {
|
|
523
518
|
case 0:
|
|
524
519
|
hasSystemPermission = true;
|
|
525
520
|
if (!(0, _env.isElectron)()) {
|
|
526
|
-
_context2.next =
|
|
521
|
+
_context2.next = 2;
|
|
527
522
|
break;
|
|
528
523
|
}
|
|
529
|
-
_context2.next =
|
|
524
|
+
_context2.next = 1;
|
|
530
525
|
return window.runtime.checkMediaPermission('camera');
|
|
531
|
-
case
|
|
526
|
+
case 1:
|
|
532
527
|
hasSystemPermission = _context2.sent;
|
|
533
|
-
case
|
|
528
|
+
case 2:
|
|
534
529
|
return _context2.abrupt("return", hasSystemPermission);
|
|
535
|
-
case
|
|
530
|
+
case 3:
|
|
536
531
|
case "end":
|
|
537
532
|
return _context2.stop();
|
|
538
533
|
}
|
|
@@ -698,10 +693,10 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
698
693
|
var _init = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
|
699
694
|
var _this2 = this;
|
|
700
695
|
var res;
|
|
701
|
-
return _regenerator["default"].wrap(function
|
|
696
|
+
return _regenerator["default"].wrap(function (_context5) {
|
|
702
697
|
while (1) switch (_context5.prev = _context5.next) {
|
|
703
698
|
case 0:
|
|
704
|
-
_context5.next =
|
|
699
|
+
_context5.next = 1;
|
|
705
700
|
return Promise.allSettled([this._mediaControl.getCameraList().then(function (list) {
|
|
706
701
|
(0, _mobx.runInAction)(function () {
|
|
707
702
|
_this2.logger.info('[FcrDeviceStore] init camera list:', list);
|
|
@@ -732,7 +727,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
732
727
|
}), this._getMicrophoneList().then(/*#__PURE__*/function () {
|
|
733
728
|
var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(microphoneList) {
|
|
734
729
|
var defaultMicrophoneDeviceId;
|
|
735
|
-
return _regenerator["default"].wrap(function
|
|
730
|
+
return _regenerator["default"].wrap(function (_context3) {
|
|
736
731
|
while (1) switch (_context3.prev = _context3.next) {
|
|
737
732
|
case 0:
|
|
738
733
|
_this2.microphoneList = microphoneList;
|
|
@@ -743,9 +738,9 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
743
738
|
localKey: 'microphoneDeviceId',
|
|
744
739
|
list: _this2.microphoneList
|
|
745
740
|
});
|
|
746
|
-
_context3.next =
|
|
741
|
+
_context3.next = 1;
|
|
747
742
|
return _this2.setMicrophoneId(defaultMicrophoneDeviceId);
|
|
748
|
-
case
|
|
743
|
+
case 1:
|
|
749
744
|
case "end":
|
|
750
745
|
return _context3.stop();
|
|
751
746
|
}
|
|
@@ -757,7 +752,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
757
752
|
}()), this._getSpeakerList().then(/*#__PURE__*/function () {
|
|
758
753
|
var _ref3 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4(speakerList) {
|
|
759
754
|
var defaultSpeakerDeviceId;
|
|
760
|
-
return _regenerator["default"].wrap(function
|
|
755
|
+
return _regenerator["default"].wrap(function (_context4) {
|
|
761
756
|
while (1) switch (_context4.prev = _context4.next) {
|
|
762
757
|
case 0:
|
|
763
758
|
_this2.speakerList = speakerList;
|
|
@@ -768,9 +763,9 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
768
763
|
localKey: 'speakerDeviceId',
|
|
769
764
|
list: _this2.speakerList
|
|
770
765
|
});
|
|
771
|
-
_context4.next =
|
|
766
|
+
_context4.next = 1;
|
|
772
767
|
return _this2.setSpeakerId(defaultSpeakerDeviceId);
|
|
773
|
-
case
|
|
768
|
+
case 1:
|
|
774
769
|
case "end":
|
|
775
770
|
return _context4.stop();
|
|
776
771
|
}
|
|
@@ -780,11 +775,11 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
780
775
|
return _ref3.apply(this, arguments);
|
|
781
776
|
};
|
|
782
777
|
}())]);
|
|
783
|
-
case
|
|
778
|
+
case 1:
|
|
784
779
|
res = _context5.sent;
|
|
785
780
|
this._initLocalSetting();
|
|
786
781
|
return _context5.abrupt("return", res);
|
|
787
|
-
case
|
|
782
|
+
case 2:
|
|
788
783
|
case "end":
|
|
789
784
|
return _context5.stop();
|
|
790
785
|
}
|
|
@@ -1123,30 +1118,30 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1123
1118
|
var _setSpeakerId = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6(speakerId) {
|
|
1124
1119
|
var _this6 = this;
|
|
1125
1120
|
var speakerDeviceId, defaultDevice;
|
|
1126
|
-
return _regenerator["default"].wrap(function
|
|
1121
|
+
return _regenerator["default"].wrap(function (_context6) {
|
|
1127
1122
|
while (1) switch (_context6.prev = _context6.next) {
|
|
1128
1123
|
case 0:
|
|
1129
1124
|
if (!(speakerId !== DEFAULT_DEVICE_ID && this.speakerId === speakerId)) {
|
|
1130
|
-
_context6.next =
|
|
1125
|
+
_context6.next = 1;
|
|
1131
1126
|
break;
|
|
1132
1127
|
}
|
|
1133
1128
|
return _context6.abrupt("return");
|
|
1134
|
-
case
|
|
1129
|
+
case 1:
|
|
1135
1130
|
if (!speakerId) {
|
|
1136
|
-
_context6.next =
|
|
1131
|
+
_context6.next = 4;
|
|
1137
1132
|
break;
|
|
1138
1133
|
}
|
|
1139
1134
|
speakerDeviceId = speakerId;
|
|
1140
1135
|
if (!(speakerId === DEFAULT_DEVICE_ID)) {
|
|
1141
|
-
_context6.next =
|
|
1136
|
+
_context6.next = 3;
|
|
1142
1137
|
break;
|
|
1143
1138
|
}
|
|
1144
|
-
_context6.next =
|
|
1139
|
+
_context6.next = 2;
|
|
1145
1140
|
return this._mediaControl.getSystemSelectedSpeaker();
|
|
1146
|
-
case
|
|
1141
|
+
case 2:
|
|
1147
1142
|
defaultDevice = _context6.sent;
|
|
1148
1143
|
speakerDeviceId = (defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceId) || '';
|
|
1149
|
-
case
|
|
1144
|
+
case 3:
|
|
1150
1145
|
if (speakerDeviceId) {
|
|
1151
1146
|
this._mediaControl.setSelectedSpeaker(speakerDeviceId);
|
|
1152
1147
|
}
|
|
@@ -1154,15 +1149,15 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1154
1149
|
_this6._speakerDeviceId = speakerDeviceId;
|
|
1155
1150
|
_this6.speakerId = speakerId;
|
|
1156
1151
|
});
|
|
1157
|
-
_context6.next =
|
|
1152
|
+
_context6.next = 5;
|
|
1158
1153
|
break;
|
|
1159
|
-
case
|
|
1154
|
+
case 4:
|
|
1160
1155
|
this._speakerDeviceId = speakerId;
|
|
1161
1156
|
this.speakerId = speakerId;
|
|
1162
|
-
case
|
|
1157
|
+
case 5:
|
|
1163
1158
|
this._mediaControl.followSystemSpeaker(speakerId === DEFAULT_DEVICE_ID);
|
|
1164
1159
|
this._observable.notifyObservers('onSpeakerChanged', this._speakerDeviceId);
|
|
1165
|
-
case
|
|
1160
|
+
case 6:
|
|
1166
1161
|
case "end":
|
|
1167
1162
|
return _context6.stop();
|
|
1168
1163
|
}
|
|
@@ -1181,33 +1176,33 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1181
1176
|
_this$_microphoneAudi6,
|
|
1182
1177
|
_this7 = this;
|
|
1183
1178
|
var microphoneDeviceId, defaultDevice, _microphoneTrack;
|
|
1184
|
-
return _regenerator["default"].wrap(function
|
|
1179
|
+
return _regenerator["default"].wrap(function (_context7) {
|
|
1185
1180
|
while (1) switch (_context7.prev = _context7.next) {
|
|
1186
1181
|
case 0:
|
|
1187
1182
|
if (!(microphoneId !== DEFAULT_DEVICE_ID && this.microphoneId === microphoneId)) {
|
|
1188
|
-
_context7.next =
|
|
1183
|
+
_context7.next = 1;
|
|
1189
1184
|
break;
|
|
1190
1185
|
}
|
|
1191
1186
|
return _context7.abrupt("return");
|
|
1192
|
-
case
|
|
1187
|
+
case 1:
|
|
1193
1188
|
(_this$_microphoneAudi5 = this._microphoneAudioTrack) === null || _this$_microphoneAudi5 === void 0 || _this$_microphoneAudi5.removeObserver(this._microphoneObserver);
|
|
1194
1189
|
(_this$_microphoneAudi6 = this._microphoneAudioTrack) === null || _this$_microphoneAudi6 === void 0 || _this$_microphoneAudi6.stop();
|
|
1195
1190
|
this.stopMicrophoneTest();
|
|
1196
1191
|
if (!microphoneId) {
|
|
1197
|
-
_context7.next =
|
|
1192
|
+
_context7.next = 4;
|
|
1198
1193
|
break;
|
|
1199
1194
|
}
|
|
1200
1195
|
microphoneDeviceId = microphoneId;
|
|
1201
1196
|
if (!(microphoneDeviceId === DEFAULT_DEVICE_ID)) {
|
|
1202
|
-
_context7.next =
|
|
1197
|
+
_context7.next = 3;
|
|
1203
1198
|
break;
|
|
1204
1199
|
}
|
|
1205
|
-
_context7.next =
|
|
1200
|
+
_context7.next = 2;
|
|
1206
1201
|
return this._mediaControl.getSystemSelectedMicrophone();
|
|
1207
|
-
case
|
|
1202
|
+
case 2:
|
|
1208
1203
|
defaultDevice = _context7.sent;
|
|
1209
1204
|
microphoneDeviceId = (defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceId) || '';
|
|
1210
|
-
case
|
|
1205
|
+
case 3:
|
|
1211
1206
|
if (microphoneDeviceId) {
|
|
1212
1207
|
_microphoneTrack = this._mediaControl.getMicrophoneTrack(microphoneDeviceId);
|
|
1213
1208
|
_microphoneTrack.addObserver(this._microphoneObserver);
|
|
@@ -1220,15 +1215,15 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1220
1215
|
_this7._microphoneDeviceId = microphoneDeviceId;
|
|
1221
1216
|
_this7.microphoneId = microphoneId;
|
|
1222
1217
|
});
|
|
1223
|
-
_context7.next =
|
|
1218
|
+
_context7.next = 5;
|
|
1224
1219
|
break;
|
|
1225
|
-
case
|
|
1220
|
+
case 4:
|
|
1226
1221
|
this._microphoneDeviceId = microphoneId;
|
|
1227
1222
|
this.microphoneId = microphoneId;
|
|
1228
|
-
case
|
|
1223
|
+
case 5:
|
|
1229
1224
|
this._mediaControl.followSystemMicrophone(microphoneId === DEFAULT_DEVICE_ID);
|
|
1230
1225
|
this._observable.notifyObservers('onMicrophoneChanged', this._microphoneDeviceId);
|
|
1231
|
-
case
|
|
1226
|
+
case 6:
|
|
1232
1227
|
case "end":
|
|
1233
1228
|
return _context7.stop();
|
|
1234
1229
|
}
|
|
@@ -1279,11 +1274,11 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1279
1274
|
var _loadUiResources = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8(uiResource) {
|
|
1280
1275
|
var _this8 = this;
|
|
1281
1276
|
var _uiResource$virtualBa, _uiResource$virtualBa2, _uiResource$soundEffe, images, videos, soundEffects, newList, imageInfoList, videoInfoList, _uiResource$virtualBa3, _uiResource$virtualBa4, _uiResource$soundEffe2, _images, _videos, _soundEffects, handleResourceReady;
|
|
1282
|
-
return _regenerator["default"].wrap(function
|
|
1277
|
+
return _regenerator["default"].wrap(function (_context8) {
|
|
1283
1278
|
while (1) switch (_context8.prev = _context8.next) {
|
|
1284
1279
|
case 0:
|
|
1285
1280
|
if ((0, _env.isElectron)()) {
|
|
1286
|
-
_context8.next =
|
|
1281
|
+
_context8.next = 1;
|
|
1287
1282
|
break;
|
|
1288
1283
|
}
|
|
1289
1284
|
images = (uiResource === null || uiResource === void 0 || (_uiResource$virtualBa = uiResource.virtualBackgroundImages) === null || _uiResource$virtualBa === void 0 ? void 0 : _uiResource$virtualBa.filter(function (url) {
|
|
@@ -1326,12 +1321,12 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1326
1321
|
_this8.soundEffectList.set((0, _tools.getFileNameWithoutExtension)(item.url), item);
|
|
1327
1322
|
});
|
|
1328
1323
|
});
|
|
1329
|
-
_context8.next =
|
|
1324
|
+
_context8.next = 3;
|
|
1330
1325
|
break;
|
|
1331
|
-
case
|
|
1332
|
-
_context8.next =
|
|
1326
|
+
case 1:
|
|
1327
|
+
_context8.next = 2;
|
|
1333
1328
|
return this._loadBuiltinResources();
|
|
1334
|
-
case
|
|
1329
|
+
case 2:
|
|
1335
1330
|
_images = (uiResource === null || uiResource === void 0 || (_uiResource$virtualBa3 = uiResource.virtualBackgroundImages) === null || _uiResource$virtualBa3 === void 0 ? void 0 : _uiResource$virtualBa3.filter(function (url) {
|
|
1336
1331
|
return (0, _tools.isZipUrl)(url);
|
|
1337
1332
|
})) || [];
|
|
@@ -1368,7 +1363,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1368
1363
|
this.loadZipResources(_images, 'image', handleResourceReady);
|
|
1369
1364
|
this.loadZipResources(_videos, 'video', handleResourceReady);
|
|
1370
1365
|
this.loadZipResources(_soundEffects, 'audio', handleResourceReady);
|
|
1371
|
-
case
|
|
1366
|
+
case 3:
|
|
1372
1367
|
case "end":
|
|
1373
1368
|
return _context8.stop();
|
|
1374
1369
|
}
|
|
@@ -1382,24 +1377,24 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1382
1377
|
}, {
|
|
1383
1378
|
key: "loadZipResources",
|
|
1384
1379
|
value: function () {
|
|
1385
|
-
var _loadZipResources = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1380
|
+
var _loadZipResources = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee0(zipUrls, type, callback) {
|
|
1386
1381
|
var _this9 = this;
|
|
1387
1382
|
var ps;
|
|
1388
|
-
return _regenerator["default"].wrap(function
|
|
1389
|
-
while (1) switch (
|
|
1383
|
+
return _regenerator["default"].wrap(function (_context0) {
|
|
1384
|
+
while (1) switch (_context0.prev = _context0.next) {
|
|
1390
1385
|
case 0:
|
|
1391
1386
|
ps = zipUrls.map(/*#__PURE__*/function () {
|
|
1392
1387
|
var _ref4 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9(url) {
|
|
1393
1388
|
var filePathList;
|
|
1394
|
-
return _regenerator["default"].wrap(function
|
|
1389
|
+
return _regenerator["default"].wrap(function (_context9) {
|
|
1395
1390
|
while (1) switch (_context9.prev = _context9.next) {
|
|
1396
1391
|
case 0:
|
|
1397
|
-
_context9.next =
|
|
1392
|
+
_context9.next = 1;
|
|
1398
1393
|
return _this9._fetchZipAndUnzip(url, type);
|
|
1399
|
-
case
|
|
1394
|
+
case 1:
|
|
1400
1395
|
filePathList = _context9.sent;
|
|
1401
1396
|
callback(filePathList, type);
|
|
1402
|
-
case
|
|
1397
|
+
case 2:
|
|
1403
1398
|
case "end":
|
|
1404
1399
|
return _context9.stop();
|
|
1405
1400
|
}
|
|
@@ -1409,13 +1404,13 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1409
1404
|
return _ref4.apply(this, arguments);
|
|
1410
1405
|
};
|
|
1411
1406
|
}());
|
|
1412
|
-
|
|
1407
|
+
_context0.next = 1;
|
|
1413
1408
|
return Promise.allSettled(ps);
|
|
1414
|
-
case
|
|
1409
|
+
case 1:
|
|
1415
1410
|
case "end":
|
|
1416
|
-
return
|
|
1411
|
+
return _context0.stop();
|
|
1417
1412
|
}
|
|
1418
|
-
},
|
|
1413
|
+
}, _callee0);
|
|
1419
1414
|
}));
|
|
1420
1415
|
function loadZipResources(_x6, _x7, _x8) {
|
|
1421
1416
|
return _loadZipResources.apply(this, arguments);
|
|
@@ -1425,13 +1420,13 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1425
1420
|
}, {
|
|
1426
1421
|
key: "release",
|
|
1427
1422
|
value: function release() {
|
|
1428
|
-
var
|
|
1423
|
+
var _this0 = this,
|
|
1429
1424
|
_this$_cameraVideoTra3,
|
|
1430
1425
|
_this$_microphoneAudi8;
|
|
1431
1426
|
if (this._localVideoViewSet.size > 0) {
|
|
1432
1427
|
this._localVideoViewSet.forEach(function (view) {
|
|
1433
|
-
var
|
|
1434
|
-
(
|
|
1428
|
+
var _this0$_cameraVideoTr;
|
|
1429
|
+
(_this0$_cameraVideoTr = _this0._cameraVideoTrack) === null || _this0$_cameraVideoTr === void 0 || _this0$_cameraVideoTr.stopPreview(view);
|
|
1435
1430
|
});
|
|
1436
1431
|
this._localVideoViewSet.clear();
|
|
1437
1432
|
}
|
|
@@ -1448,20 +1443,20 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1448
1443
|
}, {
|
|
1449
1444
|
key: "_fetchZipAndUnzip",
|
|
1450
1445
|
value: function () {
|
|
1451
|
-
var _fetchZipAndUnzip2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1446
|
+
var _fetchZipAndUnzip2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee1(url, type) {
|
|
1452
1447
|
var md5Url;
|
|
1453
|
-
return _regenerator["default"].wrap(function
|
|
1454
|
-
while (1) switch (
|
|
1448
|
+
return _regenerator["default"].wrap(function (_context1) {
|
|
1449
|
+
while (1) switch (_context1.prev = _context1.next) {
|
|
1455
1450
|
case 0:
|
|
1456
1451
|
md5Url = (0, _imports.md5)(url);
|
|
1457
|
-
return
|
|
1458
|
-
case
|
|
1452
|
+
return _context1.abrupt("return", window.runtime.getResourceByFileType(url, md5Url, type));
|
|
1453
|
+
case 1:
|
|
1459
1454
|
case "end":
|
|
1460
|
-
return
|
|
1455
|
+
return _context1.stop();
|
|
1461
1456
|
}
|
|
1462
|
-
},
|
|
1457
|
+
}, _callee1);
|
|
1463
1458
|
}));
|
|
1464
|
-
function _fetchZipAndUnzip(
|
|
1459
|
+
function _fetchZipAndUnzip(_x0, _x1) {
|
|
1465
1460
|
return _fetchZipAndUnzip2.apply(this, arguments);
|
|
1466
1461
|
}
|
|
1467
1462
|
return _fetchZipAndUnzip;
|
|
@@ -1504,7 +1499,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1504
1499
|
}, {
|
|
1505
1500
|
key: "toggleLocalCameraPreview",
|
|
1506
1501
|
value: function toggleLocalCameraPreview(enabled) {
|
|
1507
|
-
var
|
|
1502
|
+
var _this1 = this;
|
|
1508
1503
|
var localVideoViewSet = this._localVideoViewSet;
|
|
1509
1504
|
var cameraTrack = this._cameraVideoTrack;
|
|
1510
1505
|
if (!enabled && localVideoViewSet.size > 0 && cameraTrack) {
|
|
@@ -1516,7 +1511,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1516
1511
|
localVideoViewSet.forEach(function (view) {
|
|
1517
1512
|
cameraTrack === null || cameraTrack === void 0 || cameraTrack.startPreview({
|
|
1518
1513
|
renderMode: _fcrCore.FcrVideoRenderMode.HIDDEN,
|
|
1519
|
-
isMirror:
|
|
1514
|
+
isMirror: _this1.currentIsMirror
|
|
1520
1515
|
}, view);
|
|
1521
1516
|
});
|
|
1522
1517
|
}
|
|
@@ -1524,24 +1519,24 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1524
1519
|
}, {
|
|
1525
1520
|
key: "_handleCameraListUpdated",
|
|
1526
1521
|
value: function () {
|
|
1527
|
-
var _handleCameraListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1528
|
-
var
|
|
1522
|
+
var _handleCameraListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee10() {
|
|
1523
|
+
var _this10 = this;
|
|
1529
1524
|
var cameraList, currentDeviceExist, _cameraEnabled, deviceId, _deviceId;
|
|
1530
|
-
return _regenerator["default"].wrap(function
|
|
1531
|
-
while (1) switch (
|
|
1525
|
+
return _regenerator["default"].wrap(function (_context10) {
|
|
1526
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
1532
1527
|
case 0:
|
|
1533
|
-
|
|
1528
|
+
_context10.next = 1;
|
|
1534
1529
|
return this._mediaControl.getCameraList();
|
|
1535
|
-
case
|
|
1536
|
-
cameraList =
|
|
1530
|
+
case 1:
|
|
1531
|
+
cameraList = _context10.sent;
|
|
1537
1532
|
(0, _mobx.runInAction)(function () {
|
|
1538
|
-
|
|
1533
|
+
_this10.cameraList = cameraList;
|
|
1539
1534
|
});
|
|
1540
1535
|
currentDeviceExist = false;
|
|
1541
1536
|
if (this.cameraId) {
|
|
1542
1537
|
currentDeviceExist = this.cameraList.some(function (_ref5) {
|
|
1543
1538
|
var deviceId = _ref5.deviceId;
|
|
1544
|
-
return
|
|
1539
|
+
return _this10.cameraId === deviceId;
|
|
1545
1540
|
});
|
|
1546
1541
|
_cameraEnabled = this.cameraEnabled;
|
|
1547
1542
|
if (!currentDeviceExist) {
|
|
@@ -1566,11 +1561,11 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1566
1561
|
}
|
|
1567
1562
|
}
|
|
1568
1563
|
this._observable.notifyObservers('onCameraListUpdated', this.cameraList);
|
|
1569
|
-
case
|
|
1564
|
+
case 2:
|
|
1570
1565
|
case "end":
|
|
1571
|
-
return
|
|
1566
|
+
return _context10.stop();
|
|
1572
1567
|
}
|
|
1573
|
-
},
|
|
1568
|
+
}, _callee10, this);
|
|
1574
1569
|
}));
|
|
1575
1570
|
function _handleCameraListUpdated() {
|
|
1576
1571
|
return _handleCameraListUpdated2.apply(this, arguments);
|
|
@@ -1580,19 +1575,19 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1580
1575
|
}, {
|
|
1581
1576
|
key: "_handleMicrophoneAdded",
|
|
1582
1577
|
value: function () {
|
|
1583
|
-
var _handleMicrophoneAdded2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1584
|
-
return _regenerator["default"].wrap(function
|
|
1585
|
-
while (1) switch (
|
|
1578
|
+
var _handleMicrophoneAdded2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee11() {
|
|
1579
|
+
return _regenerator["default"].wrap(function (_context11) {
|
|
1580
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
1586
1581
|
case 0:
|
|
1587
|
-
|
|
1582
|
+
_context11.next = 1;
|
|
1588
1583
|
return this._handleMicrophoneListUpdated();
|
|
1589
|
-
case
|
|
1584
|
+
case 1:
|
|
1590
1585
|
this._observable.notifyObservers('onMicrophoneListUpdated', this.microphoneList);
|
|
1591
|
-
case
|
|
1586
|
+
case 2:
|
|
1592
1587
|
case "end":
|
|
1593
|
-
return
|
|
1588
|
+
return _context11.stop();
|
|
1594
1589
|
}
|
|
1595
|
-
},
|
|
1590
|
+
}, _callee11, this);
|
|
1596
1591
|
}));
|
|
1597
1592
|
function _handleMicrophoneAdded() {
|
|
1598
1593
|
return _handleMicrophoneAdded2.apply(this, arguments);
|
|
@@ -1602,33 +1597,33 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1602
1597
|
}, {
|
|
1603
1598
|
key: "_handleMicrophoneRemoved",
|
|
1604
1599
|
value: function () {
|
|
1605
|
-
var _handleMicrophoneRemoved2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1606
|
-
var
|
|
1600
|
+
var _handleMicrophoneRemoved2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee12() {
|
|
1601
|
+
var _this11 = this;
|
|
1607
1602
|
var currentDeviceExist;
|
|
1608
|
-
return _regenerator["default"].wrap(function
|
|
1609
|
-
while (1) switch (
|
|
1603
|
+
return _regenerator["default"].wrap(function (_context12) {
|
|
1604
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
1610
1605
|
case 0:
|
|
1611
|
-
|
|
1606
|
+
_context12.next = 1;
|
|
1612
1607
|
return this._handleMicrophoneListUpdated();
|
|
1613
|
-
case
|
|
1608
|
+
case 1:
|
|
1614
1609
|
// 如何设备移除了,应该切到跟随系统
|
|
1615
1610
|
currentDeviceExist = this.microphoneList.find(function (item) {
|
|
1616
|
-
return item.deviceId ===
|
|
1611
|
+
return item.deviceId === _this11._microphoneDeviceId;
|
|
1617
1612
|
});
|
|
1618
1613
|
if (currentDeviceExist) {
|
|
1619
|
-
|
|
1614
|
+
_context12.next = 2;
|
|
1620
1615
|
break;
|
|
1621
1616
|
}
|
|
1622
1617
|
this.logger.info('[FcrDeviceStore] current microphone does not exist in microphone list, switch to follow system');
|
|
1623
|
-
|
|
1618
|
+
_context12.next = 2;
|
|
1624
1619
|
return this.setMicrophoneId(DEFAULT_DEVICE_ID);
|
|
1625
|
-
case
|
|
1620
|
+
case 2:
|
|
1626
1621
|
this._observable.notifyObservers('onMicrophoneListUpdated', this.microphoneList);
|
|
1627
|
-
case
|
|
1622
|
+
case 3:
|
|
1628
1623
|
case "end":
|
|
1629
|
-
return
|
|
1624
|
+
return _context12.stop();
|
|
1630
1625
|
}
|
|
1631
|
-
},
|
|
1626
|
+
}, _callee12, this);
|
|
1632
1627
|
}));
|
|
1633
1628
|
function _handleMicrophoneRemoved() {
|
|
1634
1629
|
return _handleMicrophoneRemoved2.apply(this, arguments);
|
|
@@ -1638,28 +1633,28 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1638
1633
|
}, {
|
|
1639
1634
|
key: "_handleMicrophoneListUpdated",
|
|
1640
1635
|
value: function () {
|
|
1641
|
-
var _handleMicrophoneListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1642
|
-
var
|
|
1636
|
+
var _handleMicrophoneListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee13() {
|
|
1637
|
+
var _this12 = this;
|
|
1643
1638
|
var microphoneList;
|
|
1644
|
-
return _regenerator["default"].wrap(function
|
|
1645
|
-
while (1) switch (
|
|
1639
|
+
return _regenerator["default"].wrap(function (_context13) {
|
|
1640
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
1646
1641
|
case 0:
|
|
1647
|
-
|
|
1642
|
+
_context13.next = 1;
|
|
1648
1643
|
return this._getMicrophoneList();
|
|
1649
|
-
case
|
|
1650
|
-
microphoneList =
|
|
1644
|
+
case 1:
|
|
1645
|
+
microphoneList = _context13.sent;
|
|
1651
1646
|
// 如果选择了跟随系统,浏览器下设备变更时需要更新 track 以保证当前设备 track 正确
|
|
1652
1647
|
if (this.followSystemMicrophoneDevice) {
|
|
1653
1648
|
this._refreshMicrophoneTrack();
|
|
1654
1649
|
}
|
|
1655
1650
|
(0, _mobx.runInAction)(function () {
|
|
1656
|
-
|
|
1651
|
+
_this12.microphoneList = microphoneList;
|
|
1657
1652
|
});
|
|
1658
|
-
case
|
|
1653
|
+
case 2:
|
|
1659
1654
|
case "end":
|
|
1660
|
-
return
|
|
1655
|
+
return _context13.stop();
|
|
1661
1656
|
}
|
|
1662
|
-
},
|
|
1657
|
+
}, _callee13, this);
|
|
1663
1658
|
}));
|
|
1664
1659
|
function _handleMicrophoneListUpdated() {
|
|
1665
1660
|
return _handleMicrophoneListUpdated2.apply(this, arguments);
|
|
@@ -1674,9 +1669,9 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1674
1669
|
}, {
|
|
1675
1670
|
key: "_refreshMicrophoneTrack",
|
|
1676
1671
|
value: function _refreshMicrophoneTrack() {
|
|
1677
|
-
var _this$_microphoneAudi9, _this$
|
|
1672
|
+
var _this$_microphoneAudi9, _this$_microphoneAudi0;
|
|
1678
1673
|
(_this$_microphoneAudi9 = this._microphoneAudioTrack) === null || _this$_microphoneAudi9 === void 0 || _this$_microphoneAudi9.removeObserver(this._microphoneObserver);
|
|
1679
|
-
(_this$
|
|
1674
|
+
(_this$_microphoneAudi0 = this._microphoneAudioTrack) === null || _this$_microphoneAudi0 === void 0 || _this$_microphoneAudi0.stop();
|
|
1680
1675
|
this._microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDeviceId);
|
|
1681
1676
|
this._microphoneAudioTrack.addObserver(this._microphoneObserver);
|
|
1682
1677
|
if (this.microphoneEnabled) {
|
|
@@ -1688,19 +1683,19 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1688
1683
|
}, {
|
|
1689
1684
|
key: "_handleSpeakerAdded",
|
|
1690
1685
|
value: function () {
|
|
1691
|
-
var _handleSpeakerAdded2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1692
|
-
return _regenerator["default"].wrap(function
|
|
1693
|
-
while (1) switch (
|
|
1686
|
+
var _handleSpeakerAdded2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee14() {
|
|
1687
|
+
return _regenerator["default"].wrap(function (_context14) {
|
|
1688
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
1694
1689
|
case 0:
|
|
1695
|
-
|
|
1690
|
+
_context14.next = 1;
|
|
1696
1691
|
return this._handleSpeakerListUpdated();
|
|
1697
|
-
case
|
|
1692
|
+
case 1:
|
|
1698
1693
|
this._observable.notifyObservers('onSpeakerListUpdated', this.speakerList);
|
|
1699
|
-
case
|
|
1694
|
+
case 2:
|
|
1700
1695
|
case "end":
|
|
1701
|
-
return
|
|
1696
|
+
return _context14.stop();
|
|
1702
1697
|
}
|
|
1703
|
-
},
|
|
1698
|
+
}, _callee14, this);
|
|
1704
1699
|
}));
|
|
1705
1700
|
function _handleSpeakerAdded() {
|
|
1706
1701
|
return _handleSpeakerAdded2.apply(this, arguments);
|
|
@@ -1710,33 +1705,33 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1710
1705
|
}, {
|
|
1711
1706
|
key: "_handleSpeakerRemoved",
|
|
1712
1707
|
value: function () {
|
|
1713
|
-
var _handleSpeakerRemoved2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1714
|
-
var
|
|
1708
|
+
var _handleSpeakerRemoved2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee15() {
|
|
1709
|
+
var _this13 = this;
|
|
1715
1710
|
var currentDeviceExist;
|
|
1716
|
-
return _regenerator["default"].wrap(function
|
|
1717
|
-
while (1) switch (
|
|
1711
|
+
return _regenerator["default"].wrap(function (_context15) {
|
|
1712
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
1718
1713
|
case 0:
|
|
1719
|
-
|
|
1714
|
+
_context15.next = 1;
|
|
1720
1715
|
return this._handleSpeakerListUpdated();
|
|
1721
|
-
case
|
|
1716
|
+
case 1:
|
|
1722
1717
|
// 如何设备移除了,应该切到跟随系统
|
|
1723
1718
|
currentDeviceExist = this.speakerList.find(function (item) {
|
|
1724
|
-
return item.deviceId ===
|
|
1719
|
+
return item.deviceId === _this13._speakerDeviceId;
|
|
1725
1720
|
});
|
|
1726
1721
|
if (currentDeviceExist) {
|
|
1727
|
-
|
|
1722
|
+
_context15.next = 2;
|
|
1728
1723
|
break;
|
|
1729
1724
|
}
|
|
1730
1725
|
this.logger.info('[FcrDeviceStore] current speaker does not exist in speaker list, switch to follow system');
|
|
1731
|
-
|
|
1726
|
+
_context15.next = 2;
|
|
1732
1727
|
return this.setSpeakerId(DEFAULT_DEVICE_ID);
|
|
1733
|
-
case
|
|
1728
|
+
case 2:
|
|
1734
1729
|
this._observable.notifyObservers('onSpeakerListUpdated', this.speakerList);
|
|
1735
|
-
case
|
|
1730
|
+
case 3:
|
|
1736
1731
|
case "end":
|
|
1737
|
-
return
|
|
1732
|
+
return _context15.stop();
|
|
1738
1733
|
}
|
|
1739
|
-
},
|
|
1734
|
+
}, _callee15, this);
|
|
1740
1735
|
}));
|
|
1741
1736
|
function _handleSpeakerRemoved() {
|
|
1742
1737
|
return _handleSpeakerRemoved2.apply(this, arguments);
|
|
@@ -1746,24 +1741,24 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1746
1741
|
}, {
|
|
1747
1742
|
key: "_handleSpeakerListUpdated",
|
|
1748
1743
|
value: function () {
|
|
1749
|
-
var _handleSpeakerListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1750
|
-
var
|
|
1744
|
+
var _handleSpeakerListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee16() {
|
|
1745
|
+
var _this14 = this;
|
|
1751
1746
|
var speakerList;
|
|
1752
|
-
return _regenerator["default"].wrap(function
|
|
1753
|
-
while (1) switch (
|
|
1747
|
+
return _regenerator["default"].wrap(function (_context16) {
|
|
1748
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
1754
1749
|
case 0:
|
|
1755
|
-
|
|
1750
|
+
_context16.next = 1;
|
|
1756
1751
|
return this._getSpeakerList();
|
|
1757
|
-
case
|
|
1758
|
-
speakerList =
|
|
1752
|
+
case 1:
|
|
1753
|
+
speakerList = _context16.sent;
|
|
1759
1754
|
(0, _mobx.runInAction)(function () {
|
|
1760
|
-
|
|
1755
|
+
_this14.speakerList = speakerList;
|
|
1761
1756
|
});
|
|
1762
|
-
case
|
|
1757
|
+
case 2:
|
|
1763
1758
|
case "end":
|
|
1764
|
-
return
|
|
1759
|
+
return _context16.stop();
|
|
1765
1760
|
}
|
|
1766
|
-
},
|
|
1761
|
+
}, _callee16, this);
|
|
1767
1762
|
}));
|
|
1768
1763
|
function _handleSpeakerListUpdated() {
|
|
1769
1764
|
return _handleSpeakerListUpdated2.apply(this, arguments);
|
|
@@ -1773,19 +1768,19 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1773
1768
|
}, {
|
|
1774
1769
|
key: "_getMicrophoneList",
|
|
1775
1770
|
value: function () {
|
|
1776
|
-
var _getMicrophoneList2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1771
|
+
var _getMicrophoneList2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee17() {
|
|
1777
1772
|
var defaultDevice, list, defaultIdDevice;
|
|
1778
|
-
return _regenerator["default"].wrap(function
|
|
1779
|
-
while (1) switch (
|
|
1773
|
+
return _regenerator["default"].wrap(function (_context17) {
|
|
1774
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
1780
1775
|
case 0:
|
|
1781
|
-
|
|
1776
|
+
_context17.next = 1;
|
|
1782
1777
|
return this._mediaControl.getSystemSelectedMicrophone();
|
|
1783
|
-
case
|
|
1784
|
-
defaultDevice =
|
|
1785
|
-
|
|
1778
|
+
case 1:
|
|
1779
|
+
defaultDevice = _context17.sent;
|
|
1780
|
+
_context17.next = 2;
|
|
1786
1781
|
return this._mediaControl.getMicrophoneList();
|
|
1787
|
-
case
|
|
1788
|
-
list =
|
|
1782
|
+
case 2:
|
|
1783
|
+
list = _context17.sent;
|
|
1789
1784
|
list.forEach(function (item) {
|
|
1790
1785
|
var results = /^default \((.*)\)$/.exec(item.deviceName);
|
|
1791
1786
|
if (results && results.length > 1) {
|
|
@@ -1816,12 +1811,12 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1816
1811
|
reason1: (0, _i18n.transI18n)('fmt_device_label_speaker_default')
|
|
1817
1812
|
});
|
|
1818
1813
|
}
|
|
1819
|
-
return
|
|
1820
|
-
case
|
|
1814
|
+
return _context17.abrupt("return", list);
|
|
1815
|
+
case 3:
|
|
1821
1816
|
case "end":
|
|
1822
|
-
return
|
|
1817
|
+
return _context17.stop();
|
|
1823
1818
|
}
|
|
1824
|
-
},
|
|
1819
|
+
}, _callee17, this);
|
|
1825
1820
|
}));
|
|
1826
1821
|
function _getMicrophoneList() {
|
|
1827
1822
|
return _getMicrophoneList2.apply(this, arguments);
|
|
@@ -1831,19 +1826,19 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1831
1826
|
}, {
|
|
1832
1827
|
key: "_getSpeakerList",
|
|
1833
1828
|
value: function () {
|
|
1834
|
-
var _getSpeakerList2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1829
|
+
var _getSpeakerList2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee18() {
|
|
1835
1830
|
var defaultDevice, list, defaultIdDevice;
|
|
1836
|
-
return _regenerator["default"].wrap(function
|
|
1837
|
-
while (1) switch (
|
|
1831
|
+
return _regenerator["default"].wrap(function (_context18) {
|
|
1832
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
1838
1833
|
case 0:
|
|
1839
|
-
|
|
1834
|
+
_context18.next = 1;
|
|
1840
1835
|
return this._mediaControl.getSystemSelectedSpeaker();
|
|
1841
|
-
case
|
|
1842
|
-
defaultDevice =
|
|
1843
|
-
|
|
1836
|
+
case 1:
|
|
1837
|
+
defaultDevice = _context18.sent;
|
|
1838
|
+
_context18.next = 2;
|
|
1844
1839
|
return this._mediaControl.getSpeakerList();
|
|
1845
|
-
case
|
|
1846
|
-
list =
|
|
1840
|
+
case 2:
|
|
1841
|
+
list = _context18.sent;
|
|
1847
1842
|
list.forEach(function (item) {
|
|
1848
1843
|
var results = /^default \((.*)\)$/.exec(item.deviceName);
|
|
1849
1844
|
if (results && results.length > 1) {
|
|
@@ -1873,12 +1868,12 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1873
1868
|
reason1: (0, _i18n.transI18n)('fmt_device_label_speaker_default')
|
|
1874
1869
|
});
|
|
1875
1870
|
}
|
|
1876
|
-
return
|
|
1877
|
-
case
|
|
1871
|
+
return _context18.abrupt("return", list);
|
|
1872
|
+
case 3:
|
|
1878
1873
|
case "end":
|
|
1879
|
-
return
|
|
1874
|
+
return _context18.stop();
|
|
1880
1875
|
}
|
|
1881
|
-
},
|
|
1876
|
+
}, _callee18, this);
|
|
1882
1877
|
}));
|
|
1883
1878
|
function _getSpeakerList() {
|
|
1884
1879
|
return _getSpeakerList2.apply(this, arguments);
|
|
@@ -1910,17 +1905,17 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1910
1905
|
}, {
|
|
1911
1906
|
key: "_loadBuiltinResources",
|
|
1912
1907
|
value: function () {
|
|
1913
|
-
var _loadBuiltinResources2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1908
|
+
var _loadBuiltinResources2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee19() {
|
|
1914
1909
|
var _window$runtime,
|
|
1915
|
-
|
|
1910
|
+
_this15 = this;
|
|
1916
1911
|
var _yield$window$runtime, virtualBackgroundImages, virtualBackgroundVideos, soundEffects, newVirtualBackgroundList, images, videos, sounds;
|
|
1917
|
-
return _regenerator["default"].wrap(function
|
|
1918
|
-
while (1) switch (
|
|
1912
|
+
return _regenerator["default"].wrap(function (_context19) {
|
|
1913
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
1919
1914
|
case 0:
|
|
1920
|
-
|
|
1915
|
+
_context19.next = 1;
|
|
1921
1916
|
return (_window$runtime = window.runtime) === null || _window$runtime === void 0 ? void 0 : _window$runtime.loadBuiltinResources();
|
|
1922
|
-
case
|
|
1923
|
-
_yield$window$runtime =
|
|
1917
|
+
case 1:
|
|
1918
|
+
_yield$window$runtime = _context19.sent;
|
|
1924
1919
|
virtualBackgroundImages = _yield$window$runtime.virtualBackgroundImages;
|
|
1925
1920
|
virtualBackgroundVideos = _yield$window$runtime.virtualBackgroundVideos;
|
|
1926
1921
|
soundEffects = _yield$window$runtime.soundEffects;
|
|
@@ -1953,16 +1948,16 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1953
1948
|
newVirtualBackgroundList = newVirtualBackgroundList.concat(images);
|
|
1954
1949
|
newVirtualBackgroundList = newVirtualBackgroundList.concat(videos);
|
|
1955
1950
|
(0, _mobx.runInAction)(function () {
|
|
1956
|
-
|
|
1951
|
+
_this15._updateVirtualBackgroundList(newVirtualBackgroundList);
|
|
1957
1952
|
sounds.forEach(function (item) {
|
|
1958
|
-
|
|
1953
|
+
_this15.soundEffectList.set((0, _tools.getFileNameWithoutExtension)(item.url), item);
|
|
1959
1954
|
});
|
|
1960
1955
|
});
|
|
1961
|
-
case
|
|
1956
|
+
case 2:
|
|
1962
1957
|
case "end":
|
|
1963
|
-
return
|
|
1958
|
+
return _context19.stop();
|
|
1964
1959
|
}
|
|
1965
|
-
},
|
|
1960
|
+
}, _callee19, this);
|
|
1966
1961
|
}));
|
|
1967
1962
|
function _loadBuiltinResources() {
|
|
1968
1963
|
return _loadBuiltinResources2.apply(this, arguments);
|