fcr-ui-scene 3.9.0-alpha → 3.9.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.
@@ -254,7 +254,8 @@ var FcrUIBrowserProviderInitializer = exports.FcrUIBrowserProviderInitializer =
254
254
  interpreterData: sharedInterpreterDataSource,
255
255
  deviceProvider: deviceProvider,
256
256
  screenShareProvider: screenShareProvider,
257
- streamControl: streamControl
257
+ streamControl: streamControl,
258
+ volumeThreshold: 45
258
259
  });
259
260
  objectManager.setObject(_objectManager.FcrUIObjectKeys.P_USER_AUDIO_VOLUME_PROVIDER, userAudioVolumeProvider);
260
261
  var pinDataSource = new _pinData.FcrUISharedPinDataSourceImpl(messageProvider, videoWindowDataSource);
@@ -292,7 +292,8 @@ var FcrUIElectronProviderInitializer = exports.FcrUIElectronProviderInitializer
292
292
  interpreterData: sharedInterpreterDataSource,
293
293
  deviceProvider: deviceProvider,
294
294
  screenShareProvider: screenShareProvider,
295
- streamControl: streamControl
295
+ streamControl: streamControl,
296
+ volumeThreshold: 35
296
297
  });
297
298
  objectManager.setObject(_objectManager.FcrUIObjectKeys.P_USER_AUDIO_VOLUME_PROVIDER, userAudioVolumeProvider);
298
299
  var pinDataSource = new _pinData.FcrUISharedPinDataSourceImpl(messageProvider, sharedVideoWindowDataSource);
@@ -4,5 +4,6 @@
4
4
  }
5
5
 
6
6
  body {
7
+ margin: 0;
7
8
  background: rgba(0, 0, 0, 0.01);
8
9
  }
@@ -1,3 +1,7 @@
1
+ body {
2
+ margin: 0;
3
+ }
4
+
1
5
  .fcr-fragment-whiteboard-view {
2
6
  width: 100vw;
3
7
  height: 100vh;
@@ -976,8 +976,10 @@ var ChatRoomStore = exports.ChatRoomStore = /*#__PURE__*/function () {
976
976
  }
977
977
  }, {
978
978
  key: "_handleConnectionUpdated",
979
- value: function _handleConnectionUpdated(_, state) {
980
- this.chatRoomState = state;
979
+ value: function _handleConnectionUpdated(_, state, roomType) {
980
+ if (roomType === this._type) {
981
+ this.chatRoomState = state;
982
+ }
981
983
  }
982
984
  }, {
983
985
  key: "_initChatRoomConnectionState",
@@ -70,12 +70,13 @@ export default class ControlBarStore implements FcrUIManagedObject {
70
70
  get isMuteAudio(): boolean;
71
71
  get isRoomDetailSupported(): boolean;
72
72
  get isRecordingSupported(): boolean;
73
+ get isAnnotationSupported(): boolean;
73
74
  get meetingTimeKey(): string;
74
75
  get roomId(): string;
75
76
  get checkedStateMap(): FcrSecurityCheckedStateType;
76
77
  get isWriteAnnotationAllowed(): boolean;
77
78
  get hasPermissionAllowWriteAnnotation(): boolean;
78
- get hasAnnotationStartPermission(): boolean;
79
+ get hasAnnotationWritePermission(): boolean;
79
80
  get liveStreamingButtonVisible(): boolean;
80
81
  get recordingButtonVisible(): boolean;
81
82
  get draggableArea(): FcrUI.FcrUIRectangle;
@@ -491,6 +491,11 @@ var ControlBarStore = exports["default"] = /*#__PURE__*/function () {
491
491
  get: function get() {
492
492
  return this._abilityProvider.isRecordingSupported();
493
493
  }
494
+ }, {
495
+ key: "isAnnotationSupported",
496
+ get: function get() {
497
+ return this._abilityProvider.isAnnotationSupported();
498
+ }
494
499
  }, {
495
500
  key: "meetingTimeKey",
496
501
  get: function get() {
@@ -517,9 +522,9 @@ var ControlBarStore = exports["default"] = /*#__PURE__*/function () {
517
522
  return this._privilegeProvider.hasAnnotationAllowWritePermission();
518
523
  }
519
524
  }, {
520
- key: "hasAnnotationStartPermission",
525
+ key: "hasAnnotationWritePermission",
521
526
  get: function get() {
522
- return this._privilegeProvider.hasAnnotationStartPermission();
527
+ return this._privilegeProvider.hasAnnotationWritePermission();
523
528
  }
524
529
  }, {
525
530
  key: "liveStreamingButtonVisible",
@@ -534,7 +534,8 @@ var AnnotationSection = (0, _mobxReact.observer)(function () {
534
534
  clearAnnotation = _useContext11.clearAnnotation,
535
535
  isWriteAnnotationAllowed = _useContext11.isWriteAnnotationAllowed,
536
536
  hasPermissionAllowWriteAnnotation = _useContext11.hasPermissionAllowWriteAnnotation,
537
- hasAnnotationStartPermission = _useContext11.hasAnnotationStartPermission;
537
+ isAnnotationSupported = _useContext11.isAnnotationSupported,
538
+ hasAnnotationWritePermission = _useContext11.hasAnnotationWritePermission;
538
539
  var _useContext12 = (0, _react.useContext)(_context.ControlBarCalculationContext),
539
540
  isShareActionNavHidden = _useContext12.isShareActionNavHidden;
540
541
  var _useState11 = (0, _react.useState)(false),
@@ -546,6 +547,16 @@ var AnnotationSection = (0, _mobxReact.observer)(function () {
546
547
  setVisible(false);
547
548
  }
548
549
  }, [isShareActionNavHidden]);
550
+
551
+ // 不支持标注的能力, 不显示按钮
552
+ if (!isAnnotationSupported) {
553
+ return null;
554
+ }
555
+
556
+ // 没有标注写权限, 不显示按钮
557
+ if (!hasAnnotationWritePermission) {
558
+ return null;
559
+ }
549
560
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_annotationButton.AnnotationButton, {
550
561
  onAllowWriteClick: allowWriteAnnotation,
551
562
  onCleanAnnotationClick: clearAnnotation,
@@ -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
- }), "_audioVolumeData");
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 > 45) {
241
+ if (volume > this._volumeThreshold) {
241
242
  // 过滤掉自己的流
242
243
  if (streamId === '0') {
243
244
  continue;
@@ -246,7 +246,8 @@ export var FcrUIBrowserProviderInitializer = /*#__PURE__*/function () {
246
246
  interpreterData: sharedInterpreterDataSource,
247
247
  deviceProvider: deviceProvider,
248
248
  screenShareProvider: screenShareProvider,
249
- streamControl: streamControl
249
+ streamControl: streamControl,
250
+ volumeThreshold: 45
250
251
  });
251
252
  objectManager.setObject(FcrUIObjectKeys.P_USER_AUDIO_VOLUME_PROVIDER, userAudioVolumeProvider);
252
253
  var pinDataSource = new FcrUISharedPinDataSourceImpl(messageProvider, videoWindowDataSource);
@@ -284,7 +284,8 @@ export var FcrUIElectronProviderInitializer = /*#__PURE__*/function () {
284
284
  interpreterData: sharedInterpreterDataSource,
285
285
  deviceProvider: deviceProvider,
286
286
  screenShareProvider: screenShareProvider,
287
- streamControl: streamControl
287
+ streamControl: streamControl,
288
+ volumeThreshold: 35
288
289
  });
289
290
  objectManager.setObject(FcrUIObjectKeys.P_USER_AUDIO_VOLUME_PROVIDER, userAudioVolumeProvider);
290
291
  var pinDataSource = new FcrUISharedPinDataSourceImpl(messageProvider, sharedVideoWindowDataSource);
@@ -4,5 +4,6 @@
4
4
  }
5
5
 
6
6
  body {
7
+ margin: 0;
7
8
  background: rgba(0, 0, 0, 0.01);
8
9
  }
@@ -1,3 +1,7 @@
1
+ body {
2
+ margin: 0;
3
+ }
4
+
1
5
  .fcr-fragment-whiteboard-view {
2
6
  width: 100vw;
3
7
  height: 100vh;
@@ -969,8 +969,10 @@ export var ChatRoomStore = /*#__PURE__*/function () {
969
969
  }
970
970
  }, {
971
971
  key: "_handleConnectionUpdated",
972
- value: function _handleConnectionUpdated(_, state) {
973
- this.chatRoomState = state;
972
+ value: function _handleConnectionUpdated(_, state, roomType) {
973
+ if (roomType === this._type) {
974
+ this.chatRoomState = state;
975
+ }
974
976
  }
975
977
  }, {
976
978
  key: "_initChatRoomConnectionState",
@@ -485,6 +485,11 @@ var ControlBarStore = /*#__PURE__*/function () {
485
485
  get: function get() {
486
486
  return this._abilityProvider.isRecordingSupported();
487
487
  }
488
+ }, {
489
+ key: "isAnnotationSupported",
490
+ get: function get() {
491
+ return this._abilityProvider.isAnnotationSupported();
492
+ }
488
493
  }, {
489
494
  key: "meetingTimeKey",
490
495
  get: function get() {
@@ -511,9 +516,9 @@ var ControlBarStore = /*#__PURE__*/function () {
511
516
  return this._privilegeProvider.hasAnnotationAllowWritePermission();
512
517
  }
513
518
  }, {
514
- key: "hasAnnotationStartPermission",
519
+ key: "hasAnnotationWritePermission",
515
520
  get: function get() {
516
- return this._privilegeProvider.hasAnnotationStartPermission();
521
+ return this._privilegeProvider.hasAnnotationWritePermission();
517
522
  }
518
523
  }, {
519
524
  key: "liveStreamingButtonVisible",
@@ -519,7 +519,8 @@ var AnnotationSection = observer(function () {
519
519
  clearAnnotation = _useContext11.clearAnnotation,
520
520
  isWriteAnnotationAllowed = _useContext11.isWriteAnnotationAllowed,
521
521
  hasPermissionAllowWriteAnnotation = _useContext11.hasPermissionAllowWriteAnnotation,
522
- hasAnnotationStartPermission = _useContext11.hasAnnotationStartPermission;
522
+ isAnnotationSupported = _useContext11.isAnnotationSupported,
523
+ hasAnnotationWritePermission = _useContext11.hasAnnotationWritePermission;
523
524
  var _useContext12 = useContext(ControlBarCalculationContext),
524
525
  isShareActionNavHidden = _useContext12.isShareActionNavHidden;
525
526
  var _useState11 = useState(false),
@@ -531,6 +532,16 @@ var AnnotationSection = observer(function () {
531
532
  setVisible(false);
532
533
  }
533
534
  }, [isShareActionNavHidden]);
535
+
536
+ // 不支持标注的能力, 不显示按钮
537
+ if (!isAnnotationSupported) {
538
+ return null;
539
+ }
540
+
541
+ // 没有标注写权限, 不显示按钮
542
+ if (!hasAnnotationWritePermission) {
543
+ return null;
544
+ }
534
545
  return /*#__PURE__*/_jsx(AnnotationButton, {
535
546
  onAllowWriteClick: allowWriteAnnotation,
536
547
  onCleanAnnotationClick: clearAnnotation,
@@ -92,7 +92,7 @@ import { FcrUIWindowType } from '../type';
92
92
  _ref = (_updateAudioVolumesDecs = throttled(16, {
93
93
  leading: false,
94
94
  trailing: true
95
- }), "_audioVolumeData");
95
+ }), "_volumeThreshold");
96
96
  export var FcrUIUserAudioVolumeProviderImpl = /*#__PURE__*/function () {
97
97
  function FcrUIUserAudioVolumeProviderImpl(params) {
98
98
  var _this = this;
@@ -115,6 +115,7 @@ export var FcrUIUserAudioVolumeProviderImpl = /*#__PURE__*/function () {
115
115
  this._deviceProvider = params.deviceProvider;
116
116
  this._screenShareProvider = params.screenShareProvider;
117
117
  this._streamControl = params.streamControl;
118
+ this._volumeThreshold = params.volumeThreshold;
118
119
  this._streamControl.addObserver(this._streamControlObserver);
119
120
  this._deviceProvider.setMicrophoneVolumeLevelDelegate(this._handleMicrophoneVolumeUpdated);
120
121
  this._disposers.push(reaction(function () {
@@ -230,7 +231,7 @@ export var FcrUIUserAudioVolumeProviderImpl = /*#__PURE__*/function () {
230
231
  streamId = _step$value[0],
231
232
  volume = _step$value[1];
232
233
  // 参照以前的逻辑, 找到第一个达到阈值的流后,就返回该流 id
233
- if (volume > 45) {
234
+ if (volume > this._volumeThreshold) {
234
235
  // 过滤掉自己的流
235
236
  if (streamId === '0') {
236
237
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fcr-ui-scene",
3
- "version": "3.9.0-alpha",
3
+ "version": "3.9.0",
4
4
  "main": "lib/index.js",
5
5
  "repository": "ssh://git@git.agoralab.co/aduc/fcr-ui-scene-desktop.git",
6
6
  "author": "agora.io",
@@ -31,14 +31,14 @@
31
31
  "@react-spring/web": "^9.7.3",
32
32
  "@use-gesture/react": "^10.3.1",
33
33
  "agora-electron-sdk": "4.3.2-build.167-rc.2",
34
- "agora-foundation": "3.9.0-alpha",
35
- "agora-ui-foundation": "3.9.0-alpha",
34
+ "agora-foundation": "3.9.0",
35
+ "agora-ui-foundation": "3.9.0",
36
36
  "classnames": "^2.5.1",
37
37
  "core-js": "^3.33.3",
38
38
  "dayjs": "^1.10.4",
39
39
  "electron-screenshots": "^0.5.26",
40
- "fcr-core": "3.9.0-alpha",
41
- "fcr-ui-widget-sdk": "3.9.0-alpha",
40
+ "fcr-core": "3.9.0",
41
+ "fcr-ui-widget-sdk": "3.9.0",
42
42
  "js-md5": "^0.8.3",
43
43
  "jszip": "^3.10.1",
44
44
  "lodash": "^4.17.21",
@@ -69,7 +69,7 @@
69
69
  "@types/react-dom": "^17.0.11",
70
70
  "@types/react-virtualized": "^9.21.30",
71
71
  "@types/tinycolor2": "^1.4.6",
72
- "agora-toolchain": "3.9.0-alpha",
72
+ "agora-toolchain": "3.9.0",
73
73
  "core-js": "^3.33.3",
74
74
  "electron": "22.3.27",
75
75
  "husky": "^9.0.11",