fcr-core 3.7.7-rc.1 → 3.7.8

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.
@@ -49,6 +49,10 @@ class FcrDesktopMediaControlImpl {
49
49
  prefix: 'FcrDesktopMediaControlImpl'
50
50
  })));
51
51
  (0, _defineProperty2.default)(this, "_observable", new _imports.AgoraObservable());
52
+ (0, _defineProperty2.default)(this, "_cameraLogObserver", (0, _logger.generateLogObserver)(this.logger, ['onCameraStateUpdated']));
53
+ (0, _defineProperty2.default)(this, "_microphoneLogObserver", (0, _logger.generateLogObserver)(this.logger, ['onMicrophoneStateUpdated']));
54
+ (0, _defineProperty2.default)(this, "_screenLogObserver", (0, _logger.generateLogObserver)(this.logger, ['onScreenCaptureStateUpdated']));
55
+ (0, _defineProperty2.default)(this, "_loopbackLogObserver", (0, _logger.generateLogObserver)(this.logger, ['onLoopbackRecordingStateUpdated']));
52
56
  this._mediaControl = mediaControl;
53
57
  this._mediaControl.addObserver({
54
58
  onAutoPlayFailed: () => {
@@ -117,16 +121,24 @@ class FcrDesktopMediaControlImpl {
117
121
  return this._mediaControl.getDisplayList();
118
122
  }
119
123
  getCameraTrack(deviceId) {
120
- return this._mediaControl.getCameraVideoTrack(deviceId);
124
+ const track = this._mediaControl.getCameraVideoTrack(deviceId);
125
+ track.addObserver(this._cameraLogObserver);
126
+ return track;
121
127
  }
122
128
  getMicrophoneTrack(deviceId) {
123
- return this._mediaControl.getMicrophoneAudioTrack(deviceId);
129
+ const track = this._mediaControl.getMicrophoneAudioTrack(deviceId);
130
+ track.addObserver(this._microphoneLogObserver);
131
+ return track;
124
132
  }
125
133
  getScreenTrack(sourceId) {
126
- return this._mediaControl.getScreenVideoTrack(sourceId);
134
+ const track = this._mediaControl.getScreenVideoTrack(sourceId);
135
+ track.addObserver(this._screenLogObserver);
136
+ return track;
127
137
  }
128
138
  getLoopbackTrack(sourceId) {
129
- return this._mediaControl.getLoopbackAudioTrack(sourceId);
139
+ const track = this._mediaControl.getLoopbackAudioTrack(sourceId);
140
+ track.addObserver(this._loopbackLogObserver);
141
+ return track;
130
142
  }
131
143
  setSelectedSpeaker(deviceId) {
132
144
  this._mediaControl.setSelectedSpeaker(deviceId);
@@ -461,13 +461,11 @@ export interface FcrScreenTrack {
461
461
  /**
462
462
  * Starts the screen video track with the specified type and parameters.
463
463
  * @param type The type of screen capture.
464
- * @param params The parameters for the screen capture.
465
- * @returns A promise that resolves when the start is successful.
464
+ * @param excludeWindowList The list of window IDs to exclude from the screen capture.
466
465
  */
467
466
  start(type: FcrScreenCaptureType, excludeWindowList: string[]): void;
468
467
  /**
469
468
  * Stops the screen video track for the specified source.
470
- * @returns A promise that resolves when the stop is successful.
471
469
  */
472
470
  stop(): void;
473
471
  /**
@@ -375,14 +375,10 @@ class FcrStreamControlImpl {
375
375
  }
376
376
  async removeScreenStream() {
377
377
  const res = await (0, _error.handleRequestError)(async () => {
378
- for (const stream of this._streamList) {
379
- if (stream.videoSourceType === _type.FcrVideoSourceType.SCREEN) {
380
- await this._api.stopShareScreen({
381
- roomId: this._scene.sceneId,
382
- userId: stream.owner.userId
383
- });
384
- }
385
- }
378
+ await this._api.stopShareScreen({
379
+ roomId: this._scene.sceneId,
380
+ userId: this._scene.localUser.getLocalUserId()
381
+ });
386
382
  }, _error.FcrErrorModuleCode.ROOM_STREAM, 'remove screen stream failed');
387
383
  if (this._screenStreamId) {
388
384
  this._scene.localUser.removePreparePublishScreenStream(this._screenStreamId);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fcr-core",
3
3
  "description": "Core APIs for building online scenes",
4
- "version": "3.7.7-rc.1",
4
+ "version": "3.7.8",
5
5
  "module": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
7
7
  "files": [
@@ -40,7 +40,7 @@
40
40
  "@types/lodash": "^4.14.168",
41
41
  "@types/sinon": "^17.0.2",
42
42
  "@types/uuid": "^8.3.0",
43
- "agora-toolchain": "~3.7.7-rc.1",
43
+ "agora-toolchain": "3.7.8",
44
44
  "core-js": "^3.33.3",
45
45
  "decomment": "^0.9.5",
46
46
  "husky": "^9.0.11",
@@ -55,8 +55,8 @@
55
55
  "@netless/forge-room": "1.0.6",
56
56
  "@netless/forge-rtm": "1.0.6",
57
57
  "@netless/forge-whiteboard": "1.0.6",
58
- "agora-foundation": "~3.7.7-rc.1",
59
- "agora-rte-sdk": "~3.7.7-rc.1",
58
+ "agora-foundation": "3.7.8",
59
+ "agora-rte-sdk": "3.7.8",
60
60
  "await-to-js": "^3.0.0",
61
61
  "dayjs": "^1.10.4",
62
62
  "easemob-websdk": "4.13.0",