fcr-ui-scene 3.8.0-alpha → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/lib/fragments/whiteboard/store.js +1 -1
  2. package/lib/modules/caption/draggable-container/index.js +34 -12
  3. package/lib/modules/caption/store.d.ts +1 -4
  4. package/lib/modules/caption/store.js +10 -18
  5. package/lib/modules/caption/view.js +16 -27
  6. package/lib/modules/chat/store.d.ts +1 -0
  7. package/lib/modules/chat/store.js +2 -2
  8. package/lib/modules/components/caption-menu/index.d.ts +2 -0
  9. package/lib/modules/components/caption-menu/index.js +13 -10
  10. package/lib/modules/components/caption-menu/participants-privilege-control-options.js +5 -19
  11. package/lib/modules/components/caption-menu/translation-setting-options.js +31 -24
  12. package/lib/modules/control-bar/components/carmera/index.js +7 -39
  13. package/lib/modules/control-bar/components/cloud-recording-buttons.js +18 -33
  14. package/lib/modules/control-bar/components/microphone/index.js +3 -43
  15. package/lib/modules/control-bar/components/share-audio/index.d.ts +2 -0
  16. package/lib/modules/control-bar/components/share-audio/index.js +4 -10
  17. package/lib/modules/control-bar/hooks.d.ts +1 -0
  18. package/lib/modules/control-bar/hooks.js +140 -1
  19. package/lib/modules/control-bar/store.d.ts +3 -4
  20. package/lib/modules/control-bar/store.js +37 -30
  21. package/lib/modules/control-bar/type.d.ts +3 -0
  22. package/lib/modules/control-bar/view.js +40 -57
  23. package/lib/modules/dialog/components/confirm/index.js +0 -1
  24. package/lib/modules/dialog/components/dialog-container/index.js +1 -0
  25. package/lib/modules/event-toast/index.js +7 -1
  26. package/lib/modules/layout/store.base.d.ts +1 -1
  27. package/lib/modules/layout/store.electron.d.ts +0 -1
  28. package/lib/modules/layout/store.electron.js +37 -133
  29. package/lib/modules/participant/store.base.js +8 -10
  30. package/lib/modules/secondary-window/store.js +1 -3
  31. package/lib/modules/setting/audio-whiteList/audio-device-adaptation.d.ts +28 -0
  32. package/lib/modules/setting/audio-whiteList/audio-device-adaptation.js +41 -5
  33. package/lib/modules/setting/audio-whiteList/audio-whiteList-manager.d.ts +3 -14
  34. package/lib/modules/setting/audio-whiteList/audio-whiteList-manager.js +45 -24
  35. package/lib/modules/setting/index.js +4 -2
  36. package/lib/modules/setting/store.base.d.ts +5 -3
  37. package/lib/modules/setting/store.base.js +64 -43
  38. package/lib/modules/setting/store.electron.d.ts +1 -1
  39. package/lib/modules/setting/store.electron.js +3 -7
  40. package/lib/modules/setting/view.js +3 -2
  41. package/lib/modules/share-screen/store.electron.js +51 -23
  42. package/lib/modules/subtitles-history/components/list-item.js +4 -7
  43. package/lib/modules/subtitles-history/store.base.d.ts +3 -1
  44. package/lib/modules/subtitles-history/store.base.js +11 -1
  45. package/lib/providers/screen-share/provider.base.d.ts +2 -13
  46. package/lib/providers/screen-share/provider.base.js +5 -12
  47. package/lib/providers/screen-share/provider.electron.d.ts +0 -5
  48. package/lib/providers/screen-share/provider.electron.js +31 -18
  49. package/lib/providers/screen-share/type.d.ts +0 -16
  50. package/lib/providers/stt-provider/stt-provider.d.ts +3 -4
  51. package/lib/providers/stt-provider/stt-provider.js +145 -146
  52. package/lib/providers/stt-provider/type.d.ts +2 -10
  53. package/lib/providers/stt-provider/type.js +3 -3
  54. package/package.json +8 -8
@@ -57,6 +57,7 @@ var _microphone = require("./components/microphone");
57
57
  var _carmera = require("./components/carmera");
58
58
  var _boundaryDetector = require("./components/boundary-detector");
59
59
  var _appsPopover = require("./components/apps-popover");
60
+ var _hooks = require("./hooks");
60
61
  var _jsxRuntime = require("react/jsx-runtime");
61
62
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
62
63
  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; }
@@ -292,7 +293,9 @@ var ControlBar = (0, _mobxReact.observer)(function () {
292
293
  var _useContext5 = (0, _react.useContext)(_store.StoreContext),
293
294
  draggableArea = _useContext5.draggableArea,
294
295
  currentShareDisplayId = _useContext5.currentShareDisplayId,
295
- updateWindowBounds = _useContext5.updateWindowBounds;
296
+ updateWindowBounds = _useContext5.updateWindowBounds,
297
+ setArea = _useContext5.setArea,
298
+ removeArea = _useContext5.removeArea;
296
299
  var updatePosition = (0, _react.useContext)(_context.DragStateUpdaterContext);
297
300
  var _useContext6 = (0, _react.useContext)(_context.ControlBarCalculationUpdaterContext),
298
301
  setDimensions = _useContext6.setDimensions,
@@ -349,6 +352,7 @@ var ControlBar = (0, _mobxReact.observer)(function () {
349
352
  };
350
353
  }
351
354
  }, [visibility]);
355
+ (0, _hooks.usePopoverWatcher)(containerRef, setArea, removeArea);
352
356
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
353
357
  ref: containerRef,
354
358
  className: rootClassNames,
@@ -465,10 +469,8 @@ var MeetingControlGroup = (0, _mobxReact.observer)(function () {
465
469
  var SecurityMenuSection = /*#__PURE__*/(0, _react.memo)(function (_ref4) {
466
470
  var hasSecurityPermission = _ref4.hasSecurityPermission;
467
471
  if (!hasSecurityPermission) return null;
468
- var _useContext0 = (0, _react.useContext)(_store.StoreContext),
469
- setPopoverArea = _useContext0.setPopoverArea;
470
- var _useContext1 = (0, _react.useContext)(_context.ControlBarCalculationContext),
471
- isShareActionNavHidden = _useContext1.isShareActionNavHidden;
472
+ var _useContext0 = (0, _react.useContext)(_context.ControlBarCalculationContext),
473
+ isShareActionNavHidden = _useContext0.isShareActionNavHidden;
472
474
  var _useState1 = (0, _react.useState)(false),
473
475
  _useState10 = (0, _slicedToArray2["default"])(_useState1, 2),
474
476
  showSecurityPopover = _useState10[0],
@@ -476,19 +478,9 @@ var SecurityMenuSection = /*#__PURE__*/(0, _react.memo)(function (_ref4) {
476
478
  var handleVisibilityChange = (0, _react.useCallback)(function (visible) {
477
479
  setShowSecurityPopover(visible);
478
480
  }, []);
479
- var handleBoundariesChanged = (0, _react.useCallback)(function (boundaries) {
480
- console.log('SecurityMenu boundaries changed', boundaries);
481
- setPopoverArea(boundaries);
482
- }, []);
483
481
  (0, _react.useEffect)(function () {
484
482
  if (isShareActionNavHidden) {
485
483
  setShowSecurityPopover(false);
486
- setPopoverArea({
487
- x: 0,
488
- y: 0,
489
- width: 0,
490
- height: 0
491
- });
492
484
  }
493
485
  }, [isShareActionNavHidden]);
494
486
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_popover.FcrPopover, {
@@ -500,10 +492,7 @@ var SecurityMenuSection = /*#__PURE__*/(0, _react.memo)(function (_ref4) {
500
492
  backgroundColor: 'none',
501
493
  borderRadius: 'var(--fcr_cornerradius_l)'
502
494
  },
503
- content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_boundaryDetector.BoundaryDetector, {
504
- onBoundariesChanged: handleBoundariesChanged,
505
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_securityMenu["default"], {})
506
- }),
495
+ content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_securityMenu["default"], {}),
507
496
  trigger: "click",
508
497
  visible: showSecurityPopover,
509
498
  onVisibleChange: handleVisibilityChange,
@@ -519,8 +508,8 @@ var SecurityMenuSection = /*#__PURE__*/(0, _react.memo)(function (_ref4) {
519
508
 
520
509
  // 参与者区块
521
510
  var ParticipantSection = /*#__PURE__*/(0, _react.memo)(function () {
522
- var _useContext10 = (0, _react.useContext)(_store.StoreContext),
523
- handleOpenParticipant = _useContext10.handleOpenParticipant;
511
+ var _useContext1 = (0, _react.useContext)(_store.StoreContext),
512
+ handleOpenParticipant = _useContext1.handleOpenParticipant;
524
513
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_participants.ParticipantButton, {
525
514
  onTooltipButtonClick: handleOpenParticipant
526
515
  });
@@ -528,8 +517,8 @@ var ParticipantSection = /*#__PURE__*/(0, _react.memo)(function () {
528
517
 
529
518
  // 屏幕分享区块
530
519
  var ShareScreenSection = /*#__PURE__*/(0, _react.memo)(function () {
531
- var _useContext11 = (0, _react.useContext)(_store.StoreContext),
532
- handleNewShare = _useContext11.handleNewShare;
520
+ var _useContext10 = (0, _react.useContext)(_store.StoreContext),
521
+ handleNewShare = _useContext10.handleNewShare;
533
522
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_shareScreenButton.ShareScreenButton, {
534
523
  onCreateNewShareButtonClick: handleNewShare
535
524
  });
@@ -545,13 +534,12 @@ var MoreActionsSection = (0, _mobxReact.observer)(function () {
545
534
  _useState14 = (0, _slicedToArray2["default"])(_useState13, 2),
546
535
  isShowMeetingDetailPortal = _useState14[0],
547
536
  setIsShowMeetingDetailPortal = _useState14[1];
548
- var _useContext12 = (0, _react.useContext)(_store.StoreContext),
549
- newMessageCount = _useContext12.newMessageCount,
550
- hasChatPermission = _useContext12.hasChatPermission,
551
- setPopoverArea = _useContext12.setPopoverArea,
552
- setAppActionbarPopoverVisible = _useContext12.setAppActionbarPopoverVisible;
553
- var _useContext13 = (0, _react.useContext)(_context.ControlBarCalculationContext),
554
- isShareActionNavHidden = _useContext13.isShareActionNavHidden;
537
+ var _useContext11 = (0, _react.useContext)(_store.StoreContext),
538
+ newMessageCount = _useContext11.newMessageCount,
539
+ hasChatPermission = _useContext11.hasChatPermission,
540
+ setAppActionbarPopoverVisible = _useContext11.setAppActionbarPopoverVisible;
541
+ var _useContext12 = (0, _react.useContext)(_context.ControlBarCalculationContext),
542
+ isShareActionNavHidden = _useContext12.isShareActionNavHidden;
555
543
  (0, _react.useEffect)(function () {
556
544
  if (!moreVisible) {
557
545
  setIsShowMeetingDetailPortal(false);
@@ -562,33 +550,18 @@ var MoreActionsSection = (0, _mobxReact.observer)(function () {
562
550
  }, [moreVisible]);
563
551
  var handlePopoverClose = (0, _react.useCallback)(function () {
564
552
  setMoreVisible(false);
565
- setPopoverArea({
566
- x: 0,
567
- y: 0,
568
- width: 0,
569
- height: 0
570
- });
571
553
  }, []);
572
554
  var preventDefault = (0, _react.useCallback)(function (e) {
573
555
  e.stopPropagation();
574
556
  setAppActionbarPopoverVisible(false);
575
557
  }, []);
576
- var handleBoundariesChanged = (0, _react.useCallback)(function (boundaries) {
577
- console.log('More boundaries changed');
578
- setPopoverArea(boundaries);
579
- }, []);
580
558
  var handlerVisibleChange = function handlerVisibleChange(visible) {
581
559
  setMoreVisible(visible);
582
560
  };
583
561
  (0, _react.useEffect)(function () {
584
562
  if (isShareActionNavHidden) {
585
563
  setMoreVisible(false);
586
- setPopoverArea({
587
- x: 0,
588
- y: 0,
589
- width: 0,
590
- height: 0
591
- });
564
+ setAppActionbarPopoverVisible(false);
592
565
  }
593
566
  }, [isShareActionNavHidden]);
594
567
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_badge.FcrBadge, {
@@ -600,12 +573,9 @@ var MoreActionsSection = (0, _mobxReact.observer)(function () {
600
573
  visible: moreVisible,
601
574
  onButtonClick: handleMoreButtonClick,
602
575
  onVisibleChange: handlerVisibleChange,
603
- morePopoverContent: isShowMeetingDetailPortal ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_meetingDetails.MeetingDetails, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_boundaryDetector.BoundaryDetector, {
604
- onBoundariesChanged: handleBoundariesChanged,
605
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_moreActions.MorePopoverContent, {
606
- closePopover: handlePopoverClose,
607
- hasChatPermission: hasChatPermission
608
- })
576
+ morePopoverContent: isShowMeetingDetailPortal ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_meetingDetails.MeetingDetails, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_moreActions.MorePopoverContent, {
577
+ closePopover: handlePopoverClose,
578
+ hasChatPermission: hasChatPermission
609
579
  })
610
580
  })
611
581
  })
@@ -615,12 +585,25 @@ var MoreActionsSection = (0, _mobxReact.observer)(function () {
615
585
 
616
586
  // 音频分享区块
617
587
  var ShareAudioSection = (0, _mobxReact.observer)(function () {
618
- var _useContext14 = (0, _react.useContext)(_store.StoreContext),
619
- setShareWithAudioState = _useContext14.setShareWithAudioState,
620
- isSharingWithAudio = _useContext14.isSharingWithAudio,
621
- setShareAudioMode = _useContext14.setShareAudioMode,
622
- audioShareMode = _useContext14.audioShareMode;
588
+ var _useContext13 = (0, _react.useContext)(_store.StoreContext),
589
+ setShareWithAudioState = _useContext13.setShareWithAudioState,
590
+ isSharingWithAudio = _useContext13.isSharingWithAudio,
591
+ setShareAudioMode = _useContext13.setShareAudioMode,
592
+ audioShareMode = _useContext13.audioShareMode;
593
+ var _useContext14 = (0, _react.useContext)(_context.ControlBarCalculationContext),
594
+ isShareActionNavHidden = _useContext14.isShareActionNavHidden;
595
+ var _useState15 = (0, _react.useState)(false),
596
+ _useState16 = (0, _slicedToArray2["default"])(_useState15, 2),
597
+ popoverVisible = _useState16[0],
598
+ setPopoverVisible = _useState16[1];
599
+ (0, _react.useEffect)(function () {
600
+ if (isShareActionNavHidden) {
601
+ setPopoverVisible(false);
602
+ }
603
+ }, [isShareActionNavHidden]);
623
604
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_shareAudio.ShareAudio, {
605
+ popoverVisible: popoverVisible,
606
+ setPopoverVisible: setPopoverVisible,
624
607
  shareWithAudio: isSharingWithAudio,
625
608
  currentAudioChannel: audioShareMode,
626
609
  toggleShareWithAudio: setShareWithAudioState,
@@ -127,7 +127,6 @@ var ConfirmWindow = exports.ConfirmWindow = (0, _mobxReact.observer)(function (_
127
127
  return function () {
128
128
  clearTimeout(windowFocusTimerRef.current);
129
129
  calculateMethods["delete"](confirm);
130
- handleConfirmMouseout();
131
130
  };
132
131
  }, []);
133
132
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({}, bind()), {}, {
@@ -129,6 +129,7 @@ var DialogContainer = exports.DialogContainer = (0, _mobxReact.observer)(functio
129
129
  minHeight: minHeight,
130
130
  maxWidth: maxWidth,
131
131
  maxHeight: maxHeight,
132
+ bounds: "window",
132
133
  onDragStop: function onDragStop(e, d) {
133
134
  updatePosition({
134
135
  x: d.x,
@@ -23,6 +23,8 @@ var _view = require("./view");
23
23
  var _store2 = _interopRequireDefault(require("./store.electron"));
24
24
  var _store3 = _interopRequireDefault(require("./store.browser"));
25
25
  var _type = require("../../type");
26
+ var _objectManager = require("../../object-manager");
27
+ var _type2 = require("fcr-core/lib/room-control/type");
26
28
  var _jsxRuntime = require("react/jsx-runtime");
27
29
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
28
30
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
@@ -74,7 +76,11 @@ var EventToastUIModule = exports.EventToastUIModule = /*#__PURE__*/function (_UI
74
76
  key: "onNodeReceivedEvent",
75
77
  value: function onNodeReceivedEvent(event) {
76
78
  if (event.type === _type.FcrUIGlobalNodeEventType.SCENE_MOUNTED) {
77
- this.store.handleSceneMounted();
79
+ var _roomProvider$current;
80
+ var roomProvider = this.objectManager.getObject(_objectManager.FcrUIObjectKeys.P_ROOM_PROVIDER);
81
+ if (((_roomProvider$current = roomProvider.currentRoomControl.getRoomInfo()) === null || _roomProvider$current === void 0 ? void 0 : _roomProvider$current.roomType) === _type2.FcrRoomType.Mainroom) {
82
+ this.store.handleSceneMounted();
83
+ }
78
84
  }
79
85
  if (event.type === _type.FcrUIGlobalNodeEventType.SCENE_UNMOUNTED) {
80
86
  this.store.handleSceneUnmounted();
@@ -9,7 +9,7 @@ import { FcrUIManagedObject } from '../../object-manager';
9
9
  import { FcrUIDisplayDistributionContentType, SharingType } from '../secondary-window/type';
10
10
  import { FcrUIDialogProvider } from '../../providers/dialog/type';
11
11
  export declare abstract class LayoutStoreBase implements FcrLayoutSlots, FcrUIEventObserver, FcrUIManagedObject {
12
- protected readonly logger: import("agora-foundation/lib/logger").Logger;
12
+ private readonly logger;
13
13
  private _videoWindowDataSource;
14
14
  protected _eventProvider: FcrUIEventProvider;
15
15
  private _messageProvider;
@@ -5,7 +5,6 @@ export default class LayoutStoreElectron extends LayoutStoreBase {
5
5
  private _screenShareProvider;
6
6
  private _windowProvider;
7
7
  private _mainWindow;
8
- private _renderer;
9
8
  get isSharingScreen(): boolean;
10
9
  get shareScreenOwnerId(): string;
11
10
  get secondaryWindowContentType(): "speaker" | "gallery" | "hidden" | "local-camera" | "remote-camera" | "sharing-screen" | "sharing-screen-with-annotation" | "sharing-whiteboard";
@@ -15,6 +15,7 @@ require("core-js/modules/es.number.constructor.js");
15
15
  require("core-js/modules/es.object.create.js");
16
16
  require("core-js/modules/es.object.define-property.js");
17
17
  require("core-js/modules/es.object.get-own-property-descriptor.js");
18
+ require("core-js/modules/es.object.to-string.js");
18
19
  require("core-js/modules/es.reflect.construct.js");
19
20
  require("core-js/modules/es.string.iterator.js");
20
21
  require("core-js/modules/esnext.function.metadata.js");
@@ -40,17 +41,8 @@ Object.defineProperty(exports, "__esModule", {
40
41
  value: true
41
42
  });
42
43
  exports["default"] = void 0;
43
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
44
- require("core-js/modules/es.array.concat.js");
45
- require("core-js/modules/es.array.find.js");
46
44
  require("core-js/modules/es.array.push.js");
47
- require("core-js/modules/es.date.to-json.js");
48
- require("core-js/modules/es.json.stringify.js");
49
- require("core-js/modules/es.object.to-string.js");
50
- require("core-js/modules/esnext.iterator.constructor.js");
51
- require("core-js/modules/esnext.iterator.find.js");
52
45
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
53
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
54
46
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
55
47
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
56
48
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
@@ -64,7 +56,7 @@ var _store = require("./store.base");
64
56
  var _type = require("./type");
65
57
  var _constant = require("../../utilities/constant");
66
58
  var _videoWindow = require("../dialog/dialogs/video-window");
67
- var _type2 = require("fcr-core/lib/type");
59
+ var _lodash = require("lodash");
68
60
  var _LayoutStoreElectron;
69
61
  var _initProto;
70
62
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
@@ -89,137 +81,49 @@ var LayoutStoreElectron = exports["default"] = /*#__PURE__*/function (_LayoutSto
89
81
  _this._screenShareProvider = objectManager.getObject(_objectManager.FcrUIObjectKeys.P_SCREEN_SHARE_PROVIDER);
90
82
  _this._windowProvider = windowProvider;
91
83
  _this._mainWindow = windowProvider.getCurrentWindow();
92
- _this._renderer = objectManager.getObject(_objectManager.FcrUIObjectKeys.RENDERER_WRAPPER);
93
84
  _superPropGet((_this, LayoutStoreElectron), "_initialize", _this, 3)([]);
94
85
 
95
86
  // 进入房间后,如果双屏模式处于激活状态,则需要设置主窗口为窗口最大化
96
87
  if (_this._multiDisplayProvider.isActive) {
97
88
  _this._multiDisplayProvider.setMainWindowMaximize();
98
89
  }
90
+ var handleMultiDisplayActiveChange = (0, _lodash.debounce)(function (isActive) {
91
+ var _this$_multiDisplayPr = _this._multiDisplayProvider.displayState,
92
+ sharingBySelf = _this$_multiDisplayPr.sharingBySelf,
93
+ isSharingScreen = _this$_multiDisplayPr.isSharingScreen;
94
+ if (isActive) {
95
+ // 多屏模式激活时,需要设置主窗口为窗口最大化
96
+ // 如果自己正在共享屏幕,则关闭 vidoe window 悬浮窗、显示主窗口
97
+ if (sharingBySelf && isSharingScreen) {
98
+ _this._dialogProvider.closeDialog(_constant.FcrUIDialogKey.VIDEO_WINDOW);
99
+ _this._multiDisplayProvider.showMainWindowInIndexLeastDisplay({
100
+ isMaximized: true
101
+ });
102
+ } else {
103
+ _this._multiDisplayProvider.setMainWindowMaximize();
104
+ }
105
+ return;
106
+ }
107
+
108
+ // 多屏模式从激活状态转变为非激活状态时,
109
+ // 如果当前是自己在共享屏幕,则隐藏主窗口,打开 vidoe window 悬浮窗
110
+ // 如果不是自己在共享,则切换布局到演讲者模式
111
+ // 没屏幕共享时,不做操作
112
+ if (sharingBySelf && isSharingScreen) {
113
+ _this._mainWindow.hide();
114
+ _this._dialogProvider.openDialog(_constant.FcrUIDialogKey.VIDEO_WINDOW);
115
+ var workarea = _this._screenShareProvider.sharingDisplayBounds;
116
+ var videoWindow = _this._windowProvider.getWindowById(_constant.FcrUIDialogKey.VIDEO_WINDOW);
117
+ (0, _videoWindow.setVideoWindowDialogPosition)(workarea, videoWindow);
118
+ } else if (isSharingScreen) {
119
+ _this.toggleLayout(_type.FcrUIVideoWindowLayoutType.Speaker);
120
+ }
121
+ }, 100);
99
122
  _this._disposers.push((0, _mobx.reaction)(function () {
100
123
  return _this.isMultiDisplayActive;
101
- }, /*#__PURE__*/function () {
102
- var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(isActive) {
103
- var _this$_multiDisplayPr, sharingBySelf, isSharingScreen, selectionIdAndType, _selectionIdAndType, id, type, workarea, displayList, display, windowList, window, bounds, _display, videoWindow, _t, _t2;
104
- return _regenerator["default"].wrap(function (_context) {
105
- while (1) switch (_context.prev = _context.next) {
106
- case 0:
107
- _this$_multiDisplayPr = _this._multiDisplayProvider.displayState, sharingBySelf = _this$_multiDisplayPr.sharingBySelf, isSharingScreen = _this$_multiDisplayPr.isSharingScreen;
108
- if (!isActive) {
109
- _context.next = 1;
110
- break;
111
- }
112
- // 多屏模式激活时,需要设置主窗口为窗口最大化
113
- // 如果自己正在共享屏幕,则关闭 vidoe window 悬浮窗、显示主窗口
114
- if (sharingBySelf && isSharingScreen) {
115
- _this._dialogProvider.closeDialog(_constant.FcrUIDialogKey.VIDEO_WINDOW);
116
- _this._multiDisplayProvider.showMainWindowInIndexLeastDisplay({
117
- isMaximized: true
118
- });
119
- } else {
120
- _this._multiDisplayProvider.setMainWindowMaximize();
121
- }
122
- return _context.abrupt("return");
123
- case 1:
124
- if (!(sharingBySelf && isSharingScreen)) {
125
- _context.next = 16;
126
- break;
127
- }
128
- _this._mainWindow.hide();
129
- _this._dialogProvider.openDialog(_constant.FcrUIDialogKey.VIDEO_WINDOW);
130
- _context.prev = 2;
131
- selectionIdAndType = _this._screenShareProvider.selectionIdAndType;
132
- _context.next = 4;
133
- break;
134
- case 3:
135
- _context.prev = 3;
136
- _t = _context["catch"](2);
137
- _this.logger.warn("get selection id and type error, can not set video window position: ".concat(_t));
138
- return _context.abrupt("return");
139
- case 4:
140
- _selectionIdAndType = selectionIdAndType, id = _selectionIdAndType.id, type = _selectionIdAndType.type;
141
- if (!(type === _type2.FcrScreenCaptureType.SCREEN)) {
142
- _context.next = 8;
143
- break;
144
- }
145
- _context.next = 5;
146
- return _this._screenShareProvider.getDisplayList();
147
- case 5:
148
- displayList = _context.sent;
149
- display = displayList.find(function (item) {
150
- return item.id === id;
151
- });
152
- if (!display) {
153
- _context.next = 6;
154
- break;
155
- }
156
- workarea = display.bounds;
157
- _context.next = 7;
158
- break;
159
- case 6:
160
- _this.logger.warn("can not find display info for shared screen id: ".concat(id));
161
- return _context.abrupt("return");
162
- case 7:
163
- _context.next = 15;
164
- break;
165
- case 8:
166
- _context.next = 9;
167
- return _this._screenShareProvider.getWindowList();
168
- case 9:
169
- windowList = _context.sent;
170
- window = windowList.find(function (item) {
171
- return item.id === id;
172
- });
173
- if (!window) {
174
- _context.next = 10;
175
- break;
176
- }
177
- bounds = window.bounds;
178
- _context.next = 13;
179
- break;
180
- case 10:
181
- _this.logger.warn("can not find window info for shared window id: ".concat(id));
182
-
183
- // 共享的窗口被隐藏时,尝试使用 selectionBounds 作为位置依据
184
- _context.prev = 11;
185
- bounds = _this._screenShareProvider.selectionBounds;
186
- _context.next = 13;
187
- break;
188
- case 12:
189
- _context.prev = 12;
190
- _t2 = _context["catch"](11);
191
- _this.logger.warn("get selection bounds error, can not set video window position: ".concat(_t2));
192
- return _context.abrupt("return");
193
- case 13:
194
- _display = _this._renderer.getDisplayMatching(bounds);
195
- if (_display) {
196
- _context.next = 14;
197
- break;
198
- }
199
- _this.logger.warn("can not find display for shared window id: ".concat(id, ", bounds: ").concat(JSON.stringify(bounds)));
200
- return _context.abrupt("return");
201
- case 14:
202
- workarea = _display.bounds;
203
- case 15:
204
- videoWindow = _this._windowProvider.getWindowById(_constant.FcrUIDialogKey.VIDEO_WINDOW);
205
- (0, _videoWindow.setVideoWindowDialogPosition)(workarea, videoWindow);
206
- _this.logger.info("set video window position while multi display mode off, workarea: ".concat(JSON.stringify(workarea)));
207
- _context.next = 17;
208
- break;
209
- case 16:
210
- if (isSharingScreen) {
211
- _this.toggleLayout(_type.FcrUIVideoWindowLayoutType.Speaker);
212
- }
213
- case 17:
214
- case "end":
215
- return _context.stop();
216
- }
217
- }, _callee, null, [[2, 3], [11, 12]]);
218
- }));
219
- return function (_x) {
220
- return _ref2.apply(this, arguments);
221
- };
222
- }()));
124
+ }, function (isActive) {
125
+ handleMultiDisplayActiveChange(isActive);
126
+ }));
223
127
  return _this;
224
128
  }
225
129
  (0, _inherits2["default"])(LayoutStoreElectron, _LayoutStoreBase);
@@ -1742,21 +1742,11 @@ var ParticipantStoreBase = exports.ParticipantStoreBase = /*#__PURE__*/function
1742
1742
  }, {
1743
1743
  key: "_setAsHost",
1744
1744
  value: function _setAsHost(userId) {
1745
- var canSetHost = this.isHostSupportedByPlatform(userId);
1746
- if (!canSetHost) {
1747
- this._showToast((0, _i18n.transI18n)('fmt_uimanager_tips_userleaft'), 'error');
1748
- return;
1749
- }
1750
1745
  this._showSetHostDialog(userId, _type.FcrUserRole.HOST);
1751
1746
  }
1752
1747
  }, {
1753
1748
  key: "_setAsCoHost",
1754
1749
  value: function _setAsCoHost(userId) {
1755
- var canSetHost = this.isHostSupportedByPlatform(userId);
1756
- if (!canSetHost) {
1757
- this._showToast((0, _i18n.transI18n)('fmt_uimanager_tips_userleaft'), 'error');
1758
- return;
1759
- }
1760
1750
  this._showSetHostDialog(userId, _type.FcrUserRole.COHOST);
1761
1751
  }
1762
1752
 
@@ -1769,6 +1759,14 @@ var ParticipantStoreBase = exports.ParticipantStoreBase = /*#__PURE__*/function
1769
1759
  key: "_showSetHostDialog",
1770
1760
  value: function _showSetHostDialog(userId, type) {
1771
1761
  var _this16 = this;
1762
+ if ([_type.FcrUserRole.HOST, _type.FcrUserRole.COHOST].includes(type)) {
1763
+ var canSetHost = this.isHostSupportedByPlatform(userId);
1764
+ if (!canSetHost) {
1765
+ var errorMessage = type === _type.FcrUserRole.HOST ? (0, _i18n.transI18n)('fmt_attendies_toast_cant_sethost') : (0, _i18n.transI18n)('fmt_attendies_toast_cant_setcohost');
1766
+ this._showToast(errorMessage, 'error');
1767
+ return;
1768
+ }
1769
+ }
1772
1770
  var user = this.userMap.get(userId);
1773
1771
  if (!user) {
1774
1772
  this._showToast((0, _i18n.transI18n)('fmt_uimanager_tips_userleaft'), 'error');
@@ -491,9 +491,7 @@ var SecondaryWindowStore = exports.SecondaryWindowStore = /*#__PURE__*/function
491
491
  key: "_openSecondaryWindow",
492
492
  value: function _openSecondaryWindow() {
493
493
  this._setSecondaryWindowBounds();
494
- this._dialogProvider.openDialog(_constant.FcrUIDialogKey.SUB_WINDOW, {
495
- focus: false
496
- });
494
+ this._dialogProvider.openDialog(_constant.FcrUIDialogKey.SUB_WINDOW);
497
495
  }
498
496
  }, {
499
497
  key: "_closeSecondaryWindow",
@@ -1,3 +1,4 @@
1
+ import { FcrUIAiDenoiseLevel } from '../../../type';
1
2
  export interface AudioDeviceAdaptationConfig {
2
3
  /**
3
4
  * WhiteList device ID list
@@ -16,3 +17,30 @@ export interface AudioDeviceAdaptationConfig {
16
17
  * Audio device whiteList configuration
17
18
  */
18
19
  export declare const AUDIO_DEVICE_WHITE_LIST_CONFIG: AudioDeviceAdaptationConfig;
20
+ /**
21
+ * Audio device configuration for individual device
22
+ */
23
+ export interface AudioDeviceConfig {
24
+ audioEchoCancellation: boolean;
25
+ audioAgc: boolean;
26
+ noiseReduce: FcrUIAiDenoiseLevel;
27
+ }
28
+ /**
29
+ * Device profile with name and audio configuration
30
+ */
31
+ export interface DeviceProfile {
32
+ deviceName: string;
33
+ config: AudioDeviceConfig;
34
+ }
35
+ /**
36
+ * Device-specific audio configurations
37
+ * Key: deviceId (format: "vendorId:productId")
38
+ * Value: device profile with name and config
39
+ */
40
+ export declare const DEVICE_SPECIFIC_CONFIGS: Record<string, DeviceProfile>;
41
+ /**
42
+ * Get audio configuration for a specific device
43
+ * @param deviceId Device ID in format "vendorId:productId"
44
+ * @returns AudioDeviceConfig if device has specific config, undefined otherwise
45
+ */
46
+ export declare function getDeviceSpecificConfig(deviceId: string): AudioDeviceConfig | undefined;
@@ -4,7 +4,9 @@ require("core-js/modules/es.object.define-property.js");
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.AUDIO_DEVICE_WHITE_LIST_CONFIG = void 0;
7
+ exports.DEVICE_SPECIFIC_CONFIGS = exports.AUDIO_DEVICE_WHITE_LIST_CONFIG = void 0;
8
+ exports.getDeviceSpecificConfig = getDeviceSpecificConfig;
9
+ var _type = require("../../../type");
8
10
  /**
9
11
  * Audio device whiteList configuration
10
12
  */
@@ -23,12 +25,46 @@ var AUDIO_DEVICE_WHITE_LIST_CONFIG = exports.AUDIO_DEVICE_WHITE_LIST_CONFIG = {
23
25
  // Huawei-MIC100 Mic 100会议音箱
24
26
  '12D1:2308', //Hamedal Speak A20
25
27
  "1FC9:826B", //Hamedal A21T TEA
26
- "2A5F:2005",
27
- //HD Audio
28
- '33F1:1016'],
28
+ "2A5F:2005", //HD Audio VA400
29
+ "33F1:1016"],
29
30
  whiteListConfig: {
30
31
  audioEchoCancellation: false,
31
32
  audioAgc: false,
32
33
  noiseReduce: 4
33
34
  }
34
- };
35
+ };
36
+
37
+ /**
38
+ * Audio device configuration for individual device
39
+ */
40
+
41
+ /**
42
+ * Device profile with name and audio configuration
43
+ */
44
+
45
+ /**
46
+ * Device-specific audio configurations
47
+ * Key: deviceId (format: "vendorId:productId")
48
+ * Value: device profile with name and config
49
+ */
50
+ var DEVICE_SPECIFIC_CONFIGS = exports.DEVICE_SPECIFIC_CONFIGS = {
51
+ // INNOTRIK I-90
52
+ '2F9D:0091': {
53
+ deviceName: 'INNOTRIK I-90',
54
+ config: {
55
+ audioEchoCancellation: true,
56
+ audioAgc: true,
57
+ noiseReduce: _type.FcrUIAiDenoiseLevel.LOW
58
+ }
59
+ }
60
+ };
61
+
62
+ /**
63
+ * Get audio configuration for a specific device
64
+ * @param deviceId Device ID in format "vendorId:productId"
65
+ * @returns AudioDeviceConfig if device has specific config, undefined otherwise
66
+ */
67
+ function getDeviceSpecificConfig(deviceId) {
68
+ var _DEVICE_SPECIFIC_CONF;
69
+ return (_DEVICE_SPECIFIC_CONF = DEVICE_SPECIFIC_CONFIGS[deviceId]) === null || _DEVICE_SPECIFIC_CONF === void 0 ? void 0 : _DEVICE_SPECIFIC_CONF.config;
70
+ }
@@ -1,26 +1,14 @@
1
1
  import { FcrUIAiDenoiseLevel } from '../../../type';
2
+ import { AudioDeviceConfig } from './audio-device-adaptation';
2
3
  import { FcrDeviceInfo } from 'fcr-core/lib/type';
3
- /**
4
- * Audio device configuration
5
- * Includes audio echo cancellation, automatic gain control, noise reduction and other audio processing parameters
6
- */
7
- export interface AudioDeviceConfig {
8
- audioEchoCancellation: boolean;
9
- audioAgc: boolean;
10
- noiseReduce: FcrUIAiDenoiseLevel;
11
- }
12
4
  /**
13
5
  * The manager delegates device operations and settings management to the implementing class
14
6
  */
15
7
  export interface AudioDeviceWhiteListDelegate {
16
- getCurrentSetting: () => {
17
- audioEchoCancellation: boolean;
18
- noiseReduce: FcrUIAiDenoiseLevel;
19
- };
20
8
  getMicrophoneId: () => string;
21
9
  getMicrophoneList: () => FcrDeviceInfo[];
22
10
  enableAudioEchoCancellation: (enable: boolean) => void;
23
- toggleAgc: (enable: boolean) => void;
11
+ enableAudioGainControl: (enable: boolean) => void;
24
12
  setNoiseLevel: (level: FcrUIAiDenoiseLevel) => void;
25
13
  updateSettings: (settings: {
26
14
  audioEchoCancellation?: boolean;
@@ -40,6 +28,7 @@ export declare class AudioDeviceWhiteListManager {
40
28
  handleMicrophoneListUpdated(microphoneList: FcrDeviceInfo[]): void;
41
29
  handleMicrophoneChanged(microphoneId: string, productId: string | null, vendorId: string | null): void;
42
30
  private _handleDeviceChanged;
31
+ private _createDeviceConfig;
43
32
  /**
44
33
  * Get device 3A configuration (use current settings if not exists)
45
34
  */