fcr-core 3.9.1 → 3.10.0-beta

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.
@@ -22,6 +22,7 @@ Object.defineProperty(exports, "__esModule", {
22
22
  value: true
23
23
  });
24
24
  exports.FcrCoreEngineImpl = void 0;
25
+ require("core-js/modules/es.array.includes.js");
25
26
  require("core-js/modules/es.json.stringify.js");
26
27
  require("core-js/modules/esnext.iterator.constructor.js");
27
28
  require("core-js/modules/esnext.iterator.map.js");
package/lib/imports.d.ts CHANGED
@@ -48,6 +48,7 @@ export type { AgoraRteUpdateStreamPrivilege, AgoraRteMediaStreamInfo, } from 'ag
48
48
  export { AgoraRteConnectionState, AgoraRteEngine, convertStreamTypeToPublishState, AgoraRteLatencyLevel, } from 'agora-rte-sdk';
49
49
  export { AgoraRteRoomConnectorType, AgoraRteStreamPrivilegeOperation, AgoraRteStreamPrivilegeVideoSourceType, AgoraRteStreamPrivilegeAudioSourceType, AgoraRteMediaStreamType, } from 'agora-rte-sdk/lib/core/scene/type';
50
50
  export { AgoraRtcRegion, AgoraRtcVideoSourceType, AgoraRtcAudioSourceType, AgoraRtcMediaSourceState, AgoraRtcRenderMode, AgoraRtcVideoStreamType, AgoraRtcCapability, AgoraRtcAiDenoiseLevel, AgoraRtcAudioOutputRouting, AgoraRtcLatencyLevelType, AgoraRtcEncryptionMode, } from 'agora-rte-sdk/lib/core/rtc/type';
51
+ export { AgoraRteStreamLayer } from 'agora-rte-sdk/lib/type';
51
52
  export { AgoraRtmRegion } from 'agora-rte-sdk/lib/core/rtm/type';
52
53
  export { AgoraRteRegion, AgoraRteAudioSourceType, AgoraRteVideoSourceType, AgoraRteMediaPublishState, AgoraRteScreenScenarioType as FcrScreenScenarioType, AgoraRteMediaSourceState, } from 'agora-rte-sdk/lib/type';
53
54
  export { AgoraRestfulClientError } from 'agora-rte-sdk/lib/core/services/client';
package/lib/imports.js CHANGED
@@ -93,7 +93,7 @@ Object.defineProperty(exports, "AgoraRtcVideoStreamType", {
93
93
  Object.defineProperty(exports, "AgoraRteAudioSourceType", {
94
94
  enumerable: true,
95
95
  get: function () {
96
- return _type4.AgoraRteAudioSourceType;
96
+ return _type3.AgoraRteAudioSourceType;
97
97
  }
98
98
  });
99
99
  Object.defineProperty(exports, "AgoraRteConnectionState", {
@@ -123,13 +123,13 @@ Object.defineProperty(exports, "AgoraRteLatencyLevel", {
123
123
  Object.defineProperty(exports, "AgoraRteMediaPublishState", {
124
124
  enumerable: true,
125
125
  get: function () {
126
- return _type4.AgoraRteMediaPublishState;
126
+ return _type3.AgoraRteMediaPublishState;
127
127
  }
128
128
  });
129
129
  Object.defineProperty(exports, "AgoraRteMediaSourceState", {
130
130
  enumerable: true,
131
131
  get: function () {
132
- return _type4.AgoraRteMediaSourceState;
132
+ return _type3.AgoraRteMediaSourceState;
133
133
  }
134
134
  });
135
135
  Object.defineProperty(exports, "AgoraRteMediaStreamType", {
@@ -141,7 +141,7 @@ Object.defineProperty(exports, "AgoraRteMediaStreamType", {
141
141
  Object.defineProperty(exports, "AgoraRteRegion", {
142
142
  enumerable: true,
143
143
  get: function () {
144
- return _type4.AgoraRteRegion;
144
+ return _type3.AgoraRteRegion;
145
145
  }
146
146
  });
147
147
  Object.defineProperty(exports, "AgoraRteRoomConnectorType", {
@@ -156,6 +156,12 @@ Object.defineProperty(exports, "AgoraRteScreenCaptureType", {
156
156
  return _type5.AgoraRteScreenCaptureType;
157
157
  }
158
158
  });
159
+ Object.defineProperty(exports, "AgoraRteStreamLayer", {
160
+ enumerable: true,
161
+ get: function () {
162
+ return _type3.AgoraRteStreamLayer;
163
+ }
164
+ });
159
165
  Object.defineProperty(exports, "AgoraRteStreamPrivilegeAudioSourceType", {
160
166
  enumerable: true,
161
167
  get: function () {
@@ -189,13 +195,13 @@ Object.defineProperty(exports, "AgoraRteVideoOrientation", {
189
195
  Object.defineProperty(exports, "AgoraRteVideoSourceType", {
190
196
  enumerable: true,
191
197
  get: function () {
192
- return _type4.AgoraRteVideoSourceType;
198
+ return _type3.AgoraRteVideoSourceType;
193
199
  }
194
200
  });
195
201
  Object.defineProperty(exports, "AgoraRtmRegion", {
196
202
  enumerable: true,
197
203
  get: function () {
198
- return _type3.AgoraRtmRegion;
204
+ return _type4.AgoraRtmRegion;
199
205
  }
200
206
  });
201
207
  Object.defineProperty(exports, "AgoraScheduler", {
@@ -279,7 +285,7 @@ Object.defineProperty(exports, "FcrRoom", {
279
285
  Object.defineProperty(exports, "FcrScreenScenarioType", {
280
286
  enumerable: true,
281
287
  get: function () {
282
- return _type4.AgoraRteScreenScenarioType;
288
+ return _type3.AgoraRteScreenScenarioType;
283
289
  }
284
290
  });
285
291
  Object.defineProperty(exports, "FcrWhiteboardApplication", {
@@ -568,8 +574,8 @@ var _agoraError = require("agora-foundation/lib/utilities/error/agora-error");
568
574
  var _agoraRteSdk = require("agora-rte-sdk");
569
575
  var _type = require("agora-rte-sdk/lib/core/scene/type");
570
576
  var _type2 = require("agora-rte-sdk/lib/core/rtc/type");
571
- var _type3 = require("agora-rte-sdk/lib/core/rtm/type");
572
- var _type4 = require("agora-rte-sdk/lib/type");
577
+ var _type3 = require("agora-rte-sdk/lib/type");
578
+ var _type4 = require("agora-rte-sdk/lib/core/rtm/type");
573
579
  var _client = require("agora-rte-sdk/lib/core/services/client");
574
580
  var _domainHolder = require("agora-rte-sdk/lib/core/services/domain-holder");
575
581
  var _type5 = require("agora-rte-sdk/lib/core/media/type");
@@ -50,6 +50,9 @@ class FcrMonitorControlImpl {
50
50
  async uploadEvent(event) {
51
51
  return this._monitor.uploadEvent(event);
52
52
  }
53
+ queryDeviceScore() {
54
+ return this._monitor.queryDeviceScore();
55
+ }
53
56
  setNeedLogUpload(isNeed) {
54
57
  this._needLogUpload = isNeed;
55
58
  }
@@ -15,6 +15,11 @@ export interface FcrMonitorControl {
15
15
  * @param failure Callback function to be called if the upload fails, with an error parameter.
16
16
  */
17
17
  uploadEvent(event: FcrMonitorUploadEvent): Promise<void>;
18
+ /**
19
+ * Queries the device score.
20
+ * @returns The device score as a number.
21
+ */
22
+ queryDeviceScore(): number;
18
23
  /**
19
24
  * Set whether to upload the log.
20
25
  * @param isNeed Whether to upload the log.
@@ -21,6 +21,7 @@ Object.defineProperty(exports, "__esModule", {
21
21
  value: true
22
22
  });
23
23
  exports.FcrAbilityControlImpl = void 0;
24
+ require("core-js/modules/es.array.includes.js");
24
25
  var _imports = require("../../imports");
25
26
  var _type = require("../../type");
26
27
  var _logger = require("../../utilities/logger");
@@ -48,7 +49,7 @@ class FcrAbilityControlImpl {
48
49
  getPlatformAbility(ability) {
49
50
  const platforms = this._scene.getScenePropertiesByKeyPath(`setting.ability.${ability}`);
50
51
  if (!Array.isArray(platforms)) {
51
- return [_type.FcrPlatform.WEB_DESKTOP, _type.FcrPlatform.MACOS, _type.FcrPlatform.WINDOWS, _type.FcrPlatform.IOS, _type.FcrPlatform.ANDROID, _type.FcrPlatform.WEB_MOBILE, _type.FcrPlatform.HARMONY, _type.FcrPlatform.CONNECTOR_PSTN, _type.FcrPlatform.CONNECTOR_SIP, _type.FcrPlatform.CONNECTOR_H323];
52
+ return [_type.FcrPlatform.WEB_DESKTOP, _type.FcrPlatform.MACOS, _type.FcrPlatform.WINDOWS, _type.FcrPlatform.IOS, _type.FcrPlatform.ANDROID, _type.FcrPlatform.WEB_MOBILE, _type.FcrPlatform.HARMONY, _type.FcrPlatform.LINUX, _type.FcrPlatform.CONNECTOR_PSTN, _type.FcrPlatform.CONNECTOR_SIP, _type.FcrPlatform.CONNECTOR_H323];
52
53
  }
53
54
  return platforms;
54
55
  }
@@ -21,6 +21,7 @@ Object.defineProperty(exports, "__esModule", {
21
21
  value: true
22
22
  });
23
23
  exports.FcrSubRoomControlImpl = exports.FcrBaseRoomControlImpl = void 0;
24
+ require("core-js/modules/es.array.includes.js");
24
25
  var _imports = require("../imports");
25
26
  var _type = require("../type");
26
27
  var _type2 = require("./type");
@@ -22,6 +22,7 @@ Object.defineProperty(exports, "__esModule", {
22
22
  value: true
23
23
  });
24
24
  exports.FcrInterpreterControlImpl = void 0;
25
+ require("core-js/modules/es.array.includes.js");
25
26
  require("core-js/modules/esnext.iterator.constructor.js");
26
27
  require("core-js/modules/esnext.iterator.map.js");
27
28
  var _imports = require("../../imports");
@@ -22,6 +22,7 @@ Object.defineProperty(exports, "__esModule", {
22
22
  value: true
23
23
  });
24
24
  exports.FcrMainRoomControlImpl = void 0;
25
+ require("core-js/modules/es.array.includes.js");
25
26
  require("core-js/modules/es.json.stringify.js");
26
27
  require("core-js/modules/esnext.iterator.constructor.js");
27
28
  require("core-js/modules/esnext.iterator.find.js");
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  value: true
8
8
  });
9
9
  exports.FcrSubscribedStreamsControl = exports.FcrStreamControlImpl = void 0;
10
+ require("core-js/modules/es.array.includes.js");
10
11
  require("core-js/modules/es.array.push.js");
11
12
  require("core-js/modules/es.json.stringify.js");
12
13
  require("core-js/modules/esnext.iterator.constructor.js");
@@ -271,7 +272,8 @@ class FcrStreamControlImpl {
271
272
  return res;
272
273
  }
273
274
  setVideoEncoderConfig(streamId, config, streamType) {
274
- return this._scene.localUser.setVideoEncoderConfig(config, streamType, streamId);
275
+ const streamLayer = this._convertToStreamLayer(streamType);
276
+ return this._scene.localUser.setVideoEncoderConfig(config, streamLayer, streamId);
275
277
  }
276
278
  setDualStreamMode(streamId, enable) {
277
279
  return this._scene.localUser.setDualStreamMode(streamId, enable);
@@ -282,7 +284,10 @@ class FcrStreamControlImpl {
282
284
  startRenderRemoteVideoStream(streamId, type, config, element) {
283
285
  const startTime = Date.now();
284
286
  const parameters = `streamId: ${streamId}, config: ${JSON.stringify(config)}, type: ${type}, element: ${element}`;
285
- this._scene.streamPlayer.subscribeRemoteVideoStream(streamId, type);
287
+
288
+ // 将 FcrVideoStreamType 转换为 AgoraRteStreamLayer
289
+ const streamLayer = this._convertToStreamLayer(type);
290
+ this._scene.streamPlayer.subscribeRemoteVideoStream(streamId, streamLayer);
286
291
  try {
287
292
  this._scene.streamPlayer.startRenderRemoteVideoStream(streamId, config.renderMode, config.isMirror, element);
288
293
  const viewId = this._subscribedStreamsControl.getViewId(element);
@@ -436,6 +441,16 @@ class FcrStreamControlImpl {
436
441
  cause: event.cause
437
442
  };
438
443
  };
444
+
445
+ /**
446
+ * 将 FcrVideoStreamType 转换为 AgoraRteStreamLayer
447
+ * @param streamType - FcrVideoStreamType (HIGH_STREAM=0, LOW_STREAM=1)
448
+ * @returns AgoraRteStreamLayer (HIGH=1, LOW=0)
449
+ * @version 3.10.0
450
+ */
451
+ _convertToStreamLayer(streamType) {
452
+ return streamType === _type.FcrVideoStreamType.HIGH_STREAM ? _imports.AgoraRteStreamLayer.HIGH : _imports.AgoraRteStreamLayer.LOW;
453
+ }
439
454
  _putUserStream = (userId, stream) => {
440
455
  if (!this._streamMapByUserId[userId]) {
441
456
  this._streamMapByUserId[userId] = [];
@@ -7,8 +7,8 @@ Object.defineProperty(exports, "__esModule", {
7
7
  value: true
8
8
  });
9
9
  exports.FcrSttControlImpl = void 0;
10
+ require("core-js/modules/es.array.includes.js");
10
11
  require("core-js/modules/es.array.push.js");
11
- require("core-js/modules/es.json.stringify.js");
12
12
  require("core-js/modules/esnext.iterator.constructor.js");
13
13
  require("core-js/modules/esnext.iterator.filter.js");
14
14
  require("core-js/modules/esnext.iterator.map.js");
@@ -74,7 +74,6 @@ class FcrSttControlImpl {
74
74
  return;
75
75
  }
76
76
  const sttStreamMessageData = await (0, _imports.deCompressGzipToJson)(data.payload);
77
- this.logger.info('onStreamMessageReceived sttStreamMessageData: ', JSON.stringify(sttStreamMessageData));
78
77
  this._handleSttStreamMessageData(sttStreamMessageData, sceneId);
79
78
  },
80
79
  onUserPropertiesUpdated: (sceneId, event) => {
package/lib/schema.js CHANGED
@@ -69,6 +69,7 @@ Object.defineProperty(exports, "z", {
69
69
  return _imports.z;
70
70
  }
71
71
  });
72
+ require("core-js/modules/es.array.includes.js");
72
73
  require("core-js/modules/esnext.iterator.constructor.js");
73
74
  require("core-js/modules/esnext.iterator.some.js");
74
75
  var _types = require("./room-control/interpreter-control/types");
package/lib/type.d.ts CHANGED
@@ -76,6 +76,7 @@ export declare enum FcrPlatform {
76
76
  ANDROID = 5,
77
77
  WEB_MOBILE = 6,
78
78
  HARMONY = 7,
79
+ LINUX = 8,
79
80
  CONNECTOR_PSTN = 101,
80
81
  CONNECTOR_SIP = 102,
81
82
  CONNECTOR_H323 = 103
package/lib/type.js CHANGED
@@ -365,6 +365,7 @@ let FcrPlatform = exports.FcrPlatform = /*#__PURE__*/function (FcrPlatform) {
365
365
  FcrPlatform[FcrPlatform["ANDROID"] = 5] = "ANDROID";
366
366
  FcrPlatform[FcrPlatform["WEB_MOBILE"] = 6] = "WEB_MOBILE";
367
367
  FcrPlatform[FcrPlatform["HARMONY"] = 7] = "HARMONY";
368
+ FcrPlatform[FcrPlatform["LINUX"] = 8] = "LINUX";
368
369
  FcrPlatform[FcrPlatform["CONNECTOR_PSTN"] = 101] = "CONNECTOR_PSTN";
369
370
  FcrPlatform[FcrPlatform["CONNECTOR_SIP"] = 102] = "CONNECTOR_SIP";
370
371
  FcrPlatform[FcrPlatform["CONNECTOR_H323"] = 103] = "CONNECTOR_H323";
@@ -30,44 +30,30 @@ require("core-js/modules/esnext.set.union.v2.js");
30
30
  require("core-js/modules/esnext.set.union.js");
31
31
  var _imports = require("../imports");
32
32
  const DEFAULT_LOG_FILE_SIZE = 512;
33
- const isTrueValue = value => {
34
- return value === 'true' || !!value;
35
- };
36
- exports.isTrueValue = isTrueValue;
37
- const getCoreIpList = parameters => {
38
- return parameters?.core?.coreIpList;
39
- };
40
- exports.getCoreIpList = getCoreIpList;
41
- const getEasemobChatIpList = parameters => {
42
- return parameters?.core?.easemobChatIpList;
43
- };
44
- exports.getEasemobChatIpList = getEasemobChatIpList;
45
- const getEasemobRestIpList = parameters => {
46
- return parameters?.core?.easemobRestIpList;
47
- };
48
- exports.getEasemobRestIpList = getEasemobRestIpList;
49
- const isEndpointRegionDisabled = parameters => {
50
- return isTrueValue(parameters?.core?.disableEndpointRegion);
51
- };
52
-
53
33
  /** RTC preset parameters configuration mapping table */
54
- exports.isEndpointRegionDisabled = isEndpointRegionDisabled;
55
34
  const RTC_PRESET_PARAMS_MAP = {
56
35
  [_imports.FcrApplicationPlatform.WINDOWS]: [{
57
36
  'rtc.video.default_hw_decoder_thres': 921600
37
+ }, {
38
+ 'rtc.video.h264_hw_min_res_level': 4
58
39
  }],
59
40
  [_imports.FcrApplicationPlatform.MACOS]: [{
60
41
  'che.video.screenCaptureMode': 1
61
42
  }, {
62
43
  'che.video.screen_disable_frame_transparent_check': true
44
+ }, {
45
+ 'rtc.video.h264_hw_min_res_level': 4
63
46
  }],
64
47
  [_imports.FcrApplicationPlatform.WEB_DESKTOP]: [{
65
48
  RESTRICTION_SET_PLAYBACK_DEVICE: false
49
+ }],
50
+ [_imports.FcrApplicationPlatform.HARMONY]: [{
51
+ 'engine.video.enable_hw_encoder': false
66
52
  }]
67
53
  };
68
54
 
69
- /** desktop common parameters */
70
- const DESKTOP_COMMON_PARAMS = [
55
+ /** HARMONY or ELECTRON common parameters */
56
+ const HARMONY_OR_ELECTRON_COMMON_PARAMS = [
71
57
  // audio parameters settings
72
58
  {
73
59
  'che.audio.bitrate_level': 1
@@ -76,19 +62,13 @@ const DESKTOP_COMMON_PARAMS = [
76
62
  },
77
63
  // video parameters settings
78
64
  {
79
- 'rtc.video.color_space_enable': true
80
- }, {
81
- 'rtc.video.videoFullrange': 1
82
- }, {
83
- 'rtc.video.matrixCoefficients': 5
84
- }, {
85
65
  'rtc.video.new_complexity': true
86
66
  }, {
87
67
  'rtc.video.default_complexity': 1027
88
68
  }, {
89
69
  'che.video.videoCodecIndex': 1
90
70
  }, {
91
- 'rtc.video.low_stream_enable_hw_encoder': true
71
+ 'che.video.minQP': 21
92
72
  }, {
93
73
  'rtc.video.enable_doc_screen_share_sr': true
94
74
  }, {
@@ -102,11 +82,52 @@ const DESKTOP_COMMON_PARAMS = [
102
82
  'che.video.brightness_detection_enable': false
103
83
  }, {
104
84
  'che.video.lowest_dev_score_4_seg': 0
85
+ }, {
86
+ 'che.video.lowest_dev_score_4_beauty': 0
105
87
  }, {
106
88
  'rtc.video.downMaxRetryTimes': 5
107
89
  }, {
108
- 'che.video.lowest_dev_score_4_beauty': 0
90
+ 'rtc.video.low_stream_enable_hw_encoder': false
91
+ }, {
92
+ 'rtc.video.enable_minor_stream_intra_request': true
93
+ }];
94
+
95
+ /** ELECTRON common parameters */
96
+ const ELECTRON_COMMON_PARAMS = [
97
+ // video parameters settings
98
+ {
99
+ 'rtc.video.color_space_enable': true
100
+ }, {
101
+ 'rtc.video.videoFullrange': 1
102
+ }, {
103
+ 'rtc.video.matrixCoefficients': 5
109
104
  }];
105
+
106
+ /** ELECTRON platforms set */
107
+ const ELECTRON_PLATFORMS = new Set([_imports.FcrApplicationPlatform.WINDOWS, _imports.FcrApplicationPlatform.MACOS, _imports.FcrApplicationPlatform.LINUX]);
108
+
109
+ /** HARMONY or ELECTRON platforms set */
110
+ const HARMONY_OR_ELECTRON_PLATFORMS = new Set([_imports.FcrApplicationPlatform.HARMONY, ...ELECTRON_PLATFORMS]);
111
+ const isTrueValue = value => {
112
+ return value === 'true' || !!value;
113
+ };
114
+ exports.isTrueValue = isTrueValue;
115
+ const getCoreIpList = parameters => {
116
+ return parameters?.core?.coreIpList;
117
+ };
118
+ exports.getCoreIpList = getCoreIpList;
119
+ const getEasemobChatIpList = parameters => {
120
+ return parameters?.core?.easemobChatIpList;
121
+ };
122
+ exports.getEasemobChatIpList = getEasemobChatIpList;
123
+ const getEasemobRestIpList = parameters => {
124
+ return parameters?.core?.easemobRestIpList;
125
+ };
126
+ exports.getEasemobRestIpList = getEasemobRestIpList;
127
+ const isEndpointRegionDisabled = parameters => {
128
+ return isTrueValue(parameters?.core?.disableEndpointRegion);
129
+ };
130
+ exports.isEndpointRegionDisabled = isEndpointRegionDisabled;
110
131
  const getNeedLogUpload = parameters => {
111
132
  if ((0, _imports.isBoolean)(parameters?.core?.needLogUpload)) {
112
133
  return parameters.core.needLogUpload;
@@ -140,7 +161,8 @@ const DESKTOP_PLATFORMS = new Set([_imports.FcrApplicationPlatform.WINDOWS, _imp
140
161
  const getRtcPresetParameters = () => {
141
162
  const platform = (0, _imports.getPlatform)();
142
163
  const platformParams = RTC_PRESET_PARAMS_MAP[platform] ?? [];
143
- const desktopParams = DESKTOP_PLATFORMS.has(platform) ? DESKTOP_COMMON_PARAMS : [];
144
- return [...platformParams, ...desktopParams].map(p => JSON.stringify(p));
164
+ const electronParams = ELECTRON_PLATFORMS.has(platform) ? ELECTRON_COMMON_PARAMS : [];
165
+ const harmonyOrElectronParams = HARMONY_OR_ELECTRON_PLATFORMS.has(platform) ? HARMONY_OR_ELECTRON_COMMON_PARAMS : [];
166
+ return [...platformParams, ...electronParams, ...harmonyOrElectronParams].map(p => JSON.stringify(p));
145
167
  };
146
168
  exports.getRtcPresetParameters = getRtcPresetParameters;
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.ROOM_NON_RETRYABLE_ERRORS = exports.ROOM_JOIN_NON_RETRYABLE_ERRORS = void 0;
7
7
  exports.canRetryError = canRetryError;
8
8
  exports.canRetryJoinError = canRetryJoinError;
9
+ require("core-js/modules/es.array.includes.js");
9
10
  var _imports = require("../imports");
10
11
  /**
11
12
  * 通用重试辅助工具
@@ -15,11 +15,11 @@ const COMMON_HIGH_CAMERA_CONFIG = {
15
15
  };
16
16
  const COMMON_LOW_CAMERA_CONFIG = {
17
17
  dimensions: {
18
- width: 480,
19
- height: 270
18
+ width: 384,
19
+ height: 216
20
20
  },
21
- bitrate: 350,
22
- frameRate: 15
21
+ bitrate: 300,
22
+ frameRate: 10
23
23
  };
24
24
  const COMMON_FULL_HIGH_CAMERA_CONFIG = {
25
25
  dimensions: {
@@ -51,11 +51,20 @@ const MOBILE_HIGH_CAMERA_CONFIG = {
51
51
  height: 540
52
52
  },
53
53
  bitrate: 1000,
54
- frameRate: 24
54
+ frameRate: 15
55
+ };
56
+ const LINUX_HIGH_CAMERA_CONFIG = {
57
+ dimensions: {
58
+ width: 960,
59
+ height: 540
60
+ },
61
+ bitrate: 1000,
62
+ frameRate: 15
55
63
  };
56
64
  const HIGH_CAMERA_CONFIG_MAP = {
57
65
  [_imports.FcrApplicationPlatform.HARMONY]: MOBILE_HIGH_CAMERA_CONFIG,
58
- [_imports.FcrApplicationPlatform.WEB_MOBILE]: MOBILE_HIGH_CAMERA_CONFIG
66
+ [_imports.FcrApplicationPlatform.WEB_MOBILE]: MOBILE_HIGH_CAMERA_CONFIG,
67
+ [_imports.FcrApplicationPlatform.LINUX]: LINUX_HIGH_CAMERA_CONFIG
59
68
  };
60
69
  const LOW_CAMERA_CONFIG_MAP = {};
61
70
  const FULL_HIGH_CAMERA_CONFIG_MAP = {};
@@ -16,6 +16,7 @@ import "core-js/modules/esnext.map.some.js";
16
16
  import "core-js/modules/esnext.map.update.js";
17
17
  import "core-js/modules/esnext.symbol.metadata.js";
18
18
  let _initProto, _renewUserTokenDecs, _createMainRoomControlDecs, _createWaitingRoomControlDecs, _createRoomRouterDecs, _createRoomControlAndJoinDecs, _sendPeerMessageDecs, _setParametersDecs;
19
+ import "core-js/modules/es.array.includes.js";
19
20
  import "core-js/modules/es.json.stringify.js";
20
21
  import "core-js/modules/esnext.iterator.constructor.js";
21
22
  import "core-js/modules/esnext.iterator.map.js";
package/lib-es/imports.js CHANGED
@@ -40,6 +40,7 @@ export { AgoraError as FcrError } from 'agora-foundation/lib/utilities/error/ago
40
40
  export { AgoraRteConnectionState, AgoraRteEngine, convertStreamTypeToPublishState, AgoraRteLatencyLevel } from 'agora-rte-sdk';
41
41
  export { AgoraRteRoomConnectorType, AgoraRteStreamPrivilegeOperation, AgoraRteStreamPrivilegeVideoSourceType, AgoraRteStreamPrivilegeAudioSourceType, AgoraRteMediaStreamType } from 'agora-rte-sdk/lib/core/scene/type';
42
42
  export { AgoraRtcRegion, AgoraRtcVideoSourceType, AgoraRtcAudioSourceType, AgoraRtcMediaSourceState, AgoraRtcRenderMode, AgoraRtcVideoStreamType, AgoraRtcCapability, AgoraRtcAiDenoiseLevel, AgoraRtcAudioOutputRouting, AgoraRtcLatencyLevelType, AgoraRtcEncryptionMode } from 'agora-rte-sdk/lib/core/rtc/type';
43
+ export { AgoraRteStreamLayer } from 'agora-rte-sdk/lib/type';
43
44
  export { AgoraRtmRegion } from 'agora-rte-sdk/lib/core/rtm/type';
44
45
  export { AgoraRteRegion, AgoraRteAudioSourceType, AgoraRteVideoSourceType, AgoraRteMediaPublishState, AgoraRteScreenScenarioType as FcrScreenScenarioType, AgoraRteMediaSourceState } from 'agora-rte-sdk/lib/type';
45
46
  export { AgoraRestfulClientError } from 'agora-rte-sdk/lib/core/services/client';
@@ -44,6 +44,9 @@ export class FcrMonitorControlImpl {
44
44
  async uploadEvent(event) {
45
45
  return this._monitor.uploadEvent(event);
46
46
  }
47
+ queryDeviceScore() {
48
+ return this._monitor.queryDeviceScore();
49
+ }
47
50
  setNeedLogUpload(isNeed) {
48
51
  this._needLogUpload = isNeed;
49
52
  }
@@ -16,6 +16,7 @@ import "core-js/modules/esnext.map.some.js";
16
16
  import "core-js/modules/esnext.map.update.js";
17
17
  import "core-js/modules/esnext.symbol.metadata.js";
18
18
  let _initProto, _isPlatformAbilitySupportedDecs;
19
+ import "core-js/modules/es.array.includes.js";
19
20
  function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function (e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O.static = l, O.private = f, f ? 2 === o ? k = function (e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function (e) { return e[n]; }, (o < 2 || 4 === o) && (F = function (e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == typeof P && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol.for("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function (t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
20
21
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
21
22
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
@@ -42,7 +43,7 @@ export class FcrAbilityControlImpl {
42
43
  getPlatformAbility(ability) {
43
44
  const platforms = this._scene.getScenePropertiesByKeyPath(`setting.ability.${ability}`);
44
45
  if (!Array.isArray(platforms)) {
45
- return [FcrPlatform.WEB_DESKTOP, FcrPlatform.MACOS, FcrPlatform.WINDOWS, FcrPlatform.IOS, FcrPlatform.ANDROID, FcrPlatform.WEB_MOBILE, FcrPlatform.HARMONY, FcrPlatform.CONNECTOR_PSTN, FcrPlatform.CONNECTOR_SIP, FcrPlatform.CONNECTOR_H323];
46
+ return [FcrPlatform.WEB_DESKTOP, FcrPlatform.MACOS, FcrPlatform.WINDOWS, FcrPlatform.IOS, FcrPlatform.ANDROID, FcrPlatform.WEB_MOBILE, FcrPlatform.HARMONY, FcrPlatform.LINUX, FcrPlatform.CONNECTOR_PSTN, FcrPlatform.CONNECTOR_SIP, FcrPlatform.CONNECTOR_H323];
46
47
  }
47
48
  return platforms;
48
49
  }
@@ -16,6 +16,7 @@ import "core-js/modules/esnext.map.some.js";
16
16
  import "core-js/modules/esnext.map.update.js";
17
17
  import "core-js/modules/esnext.symbol.metadata.js";
18
18
  let _initProto, _joinDecs, _updateRoomPropertiesDecs, _updateIncrementRoomPropertiesDecs, _deleteRoomPropertiesDecs, _startCloudRecordingDecs, _startLiveStreamingDecs, _updateLiveStreamingLayoutDecs, _sendRoomMessageDecs;
19
+ import "core-js/modules/es.array.includes.js";
19
20
  function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function (e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O.static = l, O.private = f, f ? 2 === o ? k = function (e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function (e) { return e[n]; }, (o < 2 || 4 === o) && (F = function (e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == typeof P && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol.for("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function (t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
20
21
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
21
22
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
@@ -16,6 +16,7 @@ import "core-js/modules/esnext.map.some.js";
16
16
  import "core-js/modules/esnext.map.update.js";
17
17
  import "core-js/modules/esnext.symbol.metadata.js";
18
18
  let _initProto, _createRoomControlDecs, _setInterpreterUsersDecs;
19
+ import "core-js/modules/es.array.includes.js";
19
20
  import "core-js/modules/esnext.iterator.constructor.js";
20
21
  import "core-js/modules/esnext.iterator.map.js";
21
22
  function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function (e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O.static = l, O.private = f, f ? 2 === o ? k = function (e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function (e) { return e[n]; }, (o < 2 || 4 === o) && (F = function (e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == typeof P && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol.for("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function (t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
@@ -16,6 +16,7 @@ import "core-js/modules/esnext.map.some.js";
16
16
  import "core-js/modules/esnext.map.update.js";
17
17
  import "core-js/modules/esnext.symbol.metadata.js";
18
18
  let _initProto, _enableWaitingRoomDecs, _moveToWaitingRoomByUserIdsDecs;
19
+ import "core-js/modules/es.array.includes.js";
19
20
  import "core-js/modules/es.json.stringify.js";
20
21
  import "core-js/modules/esnext.iterator.constructor.js";
21
22
  import "core-js/modules/esnext.iterator.find.js";
@@ -1,6 +1,7 @@
1
1
  import "core-js/modules/esnext.function.metadata.js";
2
2
  import "core-js/modules/esnext.symbol.metadata.js";
3
3
  let _initProto, _addLocalStreamsDecs, _bindLocalStreamsDecs, _updatePublishPrivilegeOfStreamsDecs, _removeStreamsDecs, _setVideoEncoderConfigDecs, _setDualStreamModeDecs, _setScreenScenarioDecs, _startRenderRemoteVideoStreamDecs, _stopRenderRemoteVideoStreamDecs, _startPlayRemoteAudioStreamDecs, _stopPlayRemoteAudioStreamDecs, _takeSnapshotDecs, _addLocalScreenStreamDecs, _adjustRemoteAudioStreamVolumeDecs, _mergeAudioStreamDecs, _splitAudioStreamDecs;
4
+ import "core-js/modules/es.array.includes.js";
4
5
  import "core-js/modules/es.array.push.js";
5
6
  import "core-js/modules/es.json.stringify.js";
6
7
  import "core-js/modules/esnext.iterator.constructor.js";
@@ -29,13 +30,13 @@ function _setFunctionName(e, t, n) { "symbol" == typeof t && (t = (t = t.descrip
29
30
  function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? typeof e : "null")); return e; }
30
31
  import { AgoraObservable, bound, convertStreamTypeToPublishState, objectSchema, trace, AgoraRteVideoSourceType, v4 } from '../../imports';
31
32
  import { FcrReturnCode, FcrUserRoleToStringMap } from '../../type';
32
- import { FcrVideoSourceType, FcrAudioSourceType, FcrMediaSourceState } from '../../type';
33
+ import { FcrVideoStreamType, FcrVideoSourceType, FcrAudioSourceType, FcrMediaSourceState } from '../../type';
33
34
  import { convertRteUserToFcrUser } from '../../utilities/user';
34
35
  import { handleRequestError } from '../../utilities/error';
35
36
  import { createLogger, generateLogObserver } from '../../utilities/logger';
36
37
  import validateParams from '../../utilities/validate-params';
37
38
  import { stringArraySchema, stringSchema, numberSchema, fcrStreamBindConfigArrySchema, agoraRtcVideoEncoderConfigurationSchema, fcrVideoStreamTypeSchema, fcrRenderConfigSchema, fcrRenderViewSchema, fcrScreenStreamCreateConfigSchema, fcrLocalStreamCreateArrayConfigSchema, fcrUpdateStreamPrivilegeScopeSchema, fcrUpdateStreamCustomSchema, createUnionSchema, fcrSizeSchema, fcrScreenScenarioTypeSchema } from '../../schema';
38
- import { AgoraRteStreamPrivilegeOperation } from '../../imports';
39
+ import { AgoraRteStreamPrivilegeOperation, AgoraRteStreamLayer } from '../../imports';
39
40
  import { ErrorModuleCode } from '../../imports';
40
41
 
41
42
  /**
@@ -268,7 +269,8 @@ export class FcrStreamControlImpl {
268
269
  return res;
269
270
  }
270
271
  setVideoEncoderConfig(streamId, config, streamType) {
271
- return this._scene.localUser.setVideoEncoderConfig(config, streamType, streamId);
272
+ const streamLayer = this._convertToStreamLayer(streamType);
273
+ return this._scene.localUser.setVideoEncoderConfig(config, streamLayer, streamId);
272
274
  }
273
275
  setDualStreamMode(streamId, enable) {
274
276
  return this._scene.localUser.setDualStreamMode(streamId, enable);
@@ -279,7 +281,10 @@ export class FcrStreamControlImpl {
279
281
  startRenderRemoteVideoStream(streamId, type, config, element) {
280
282
  const startTime = Date.now();
281
283
  const parameters = `streamId: ${streamId}, config: ${JSON.stringify(config)}, type: ${type}, element: ${element}`;
282
- this._scene.streamPlayer.subscribeRemoteVideoStream(streamId, type);
284
+
285
+ // 将 FcrVideoStreamType 转换为 AgoraRteStreamLayer
286
+ const streamLayer = this._convertToStreamLayer(type);
287
+ this._scene.streamPlayer.subscribeRemoteVideoStream(streamId, streamLayer);
283
288
  try {
284
289
  this._scene.streamPlayer.startRenderRemoteVideoStream(streamId, config.renderMode, config.isMirror, element);
285
290
  const viewId = this._subscribedStreamsControl.getViewId(element);
@@ -433,6 +438,16 @@ export class FcrStreamControlImpl {
433
438
  cause: event.cause
434
439
  };
435
440
  };
441
+
442
+ /**
443
+ * 将 FcrVideoStreamType 转换为 AgoraRteStreamLayer
444
+ * @param streamType - FcrVideoStreamType (HIGH_STREAM=0, LOW_STREAM=1)
445
+ * @returns AgoraRteStreamLayer (HIGH=1, LOW=0)
446
+ * @version 3.10.0
447
+ */
448
+ _convertToStreamLayer(streamType) {
449
+ return streamType === FcrVideoStreamType.HIGH_STREAM ? AgoraRteStreamLayer.HIGH : AgoraRteStreamLayer.LOW;
450
+ }
436
451
  _putUserStream = (userId, stream) => {
437
452
  if (!this._streamMapByUserId[userId]) {
438
453
  this._streamMapByUserId[userId] = [];
@@ -1,8 +1,8 @@
1
1
  import "core-js/modules/esnext.function.metadata.js";
2
2
  import "core-js/modules/esnext.symbol.metadata.js";
3
3
  let _initProto, _startCaptionDecs, _startTranscribingDecs, _updateSourceLanguageDecs, _subscribeTranscribingLanguageDecs;
4
+ import "core-js/modules/es.array.includes.js";
4
5
  import "core-js/modules/es.array.push.js";
5
- import "core-js/modules/es.json.stringify.js";
6
6
  import "core-js/modules/esnext.iterator.constructor.js";
7
7
  import "core-js/modules/esnext.iterator.filter.js";
8
8
  import "core-js/modules/esnext.iterator.map.js";
@@ -68,7 +68,6 @@ export class FcrSttControlImpl {
68
68
  return;
69
69
  }
70
70
  const sttStreamMessageData = await deCompressGzipToJson(data.payload);
71
- this.logger.info('onStreamMessageReceived sttStreamMessageData: ', JSON.stringify(sttStreamMessageData));
72
71
  this._handleSttStreamMessageData(sttStreamMessageData, sceneId);
73
72
  },
74
73
  onUserPropertiesUpdated: (sceneId, event) => {
package/lib-es/schema.js CHANGED
@@ -1,3 +1,4 @@
1
+ import "core-js/modules/es.array.includes.js";
1
2
  import "core-js/modules/esnext.iterator.constructor.js";
2
3
  import "core-js/modules/esnext.iterator.some.js";
3
4
  import { FcrLanguage } from './room-control/interpreter-control/types';
package/lib-es/type.js CHANGED
@@ -86,6 +86,7 @@ export let FcrPlatform = /*#__PURE__*/function (FcrPlatform) {
86
86
  FcrPlatform[FcrPlatform["ANDROID"] = 5] = "ANDROID";
87
87
  FcrPlatform[FcrPlatform["WEB_MOBILE"] = 6] = "WEB_MOBILE";
88
88
  FcrPlatform[FcrPlatform["HARMONY"] = 7] = "HARMONY";
89
+ FcrPlatform[FcrPlatform["LINUX"] = 8] = "LINUX";
89
90
  FcrPlatform[FcrPlatform["CONNECTOR_PSTN"] = 101] = "CONNECTOR_PSTN";
90
91
  FcrPlatform[FcrPlatform["CONNECTOR_SIP"] = 102] = "CONNECTOR_SIP";
91
92
  FcrPlatform[FcrPlatform["CONNECTOR_H323"] = 103] = "CONNECTOR_H323";
@@ -24,39 +24,30 @@ import "core-js/modules/esnext.set.union.v2.js";
24
24
  import "core-js/modules/esnext.set.union.js";
25
25
  import { FcrApplicationPlatform, getPlatform, isBoolean, isNumber } from '../imports';
26
26
  const DEFAULT_LOG_FILE_SIZE = 512;
27
- export const isTrueValue = value => {
28
- return value === 'true' || !!value;
29
- };
30
- export const getCoreIpList = parameters => {
31
- return parameters?.core?.coreIpList;
32
- };
33
- export const getEasemobChatIpList = parameters => {
34
- return parameters?.core?.easemobChatIpList;
35
- };
36
- export const getEasemobRestIpList = parameters => {
37
- return parameters?.core?.easemobRestIpList;
38
- };
39
- export const isEndpointRegionDisabled = parameters => {
40
- return isTrueValue(parameters?.core?.disableEndpointRegion);
41
- };
42
-
43
27
  /** RTC preset parameters configuration mapping table */
44
28
  const RTC_PRESET_PARAMS_MAP = {
45
29
  [FcrApplicationPlatform.WINDOWS]: [{
46
30
  'rtc.video.default_hw_decoder_thres': 921600
31
+ }, {
32
+ 'rtc.video.h264_hw_min_res_level': 4
47
33
  }],
48
34
  [FcrApplicationPlatform.MACOS]: [{
49
35
  'che.video.screenCaptureMode': 1
50
36
  }, {
51
37
  'che.video.screen_disable_frame_transparent_check': true
38
+ }, {
39
+ 'rtc.video.h264_hw_min_res_level': 4
52
40
  }],
53
41
  [FcrApplicationPlatform.WEB_DESKTOP]: [{
54
42
  RESTRICTION_SET_PLAYBACK_DEVICE: false
43
+ }],
44
+ [FcrApplicationPlatform.HARMONY]: [{
45
+ 'engine.video.enable_hw_encoder': false
55
46
  }]
56
47
  };
57
48
 
58
- /** desktop common parameters */
59
- const DESKTOP_COMMON_PARAMS = [
49
+ /** HARMONY or ELECTRON common parameters */
50
+ const HARMONY_OR_ELECTRON_COMMON_PARAMS = [
60
51
  // audio parameters settings
61
52
  {
62
53
  'che.audio.bitrate_level': 1
@@ -65,19 +56,13 @@ const DESKTOP_COMMON_PARAMS = [
65
56
  },
66
57
  // video parameters settings
67
58
  {
68
- 'rtc.video.color_space_enable': true
69
- }, {
70
- 'rtc.video.videoFullrange': 1
71
- }, {
72
- 'rtc.video.matrixCoefficients': 5
73
- }, {
74
59
  'rtc.video.new_complexity': true
75
60
  }, {
76
61
  'rtc.video.default_complexity': 1027
77
62
  }, {
78
63
  'che.video.videoCodecIndex': 1
79
64
  }, {
80
- 'rtc.video.low_stream_enable_hw_encoder': true
65
+ 'che.video.minQP': 21
81
66
  }, {
82
67
  'rtc.video.enable_doc_screen_share_sr': true
83
68
  }, {
@@ -91,11 +76,47 @@ const DESKTOP_COMMON_PARAMS = [
91
76
  'che.video.brightness_detection_enable': false
92
77
  }, {
93
78
  'che.video.lowest_dev_score_4_seg': 0
79
+ }, {
80
+ 'che.video.lowest_dev_score_4_beauty': 0
94
81
  }, {
95
82
  'rtc.video.downMaxRetryTimes': 5
96
83
  }, {
97
- 'che.video.lowest_dev_score_4_beauty': 0
84
+ 'rtc.video.low_stream_enable_hw_encoder': false
85
+ }, {
86
+ 'rtc.video.enable_minor_stream_intra_request': true
87
+ }];
88
+
89
+ /** ELECTRON common parameters */
90
+ const ELECTRON_COMMON_PARAMS = [
91
+ // video parameters settings
92
+ {
93
+ 'rtc.video.color_space_enable': true
94
+ }, {
95
+ 'rtc.video.videoFullrange': 1
96
+ }, {
97
+ 'rtc.video.matrixCoefficients': 5
98
98
  }];
99
+
100
+ /** ELECTRON platforms set */
101
+ const ELECTRON_PLATFORMS = new Set([FcrApplicationPlatform.WINDOWS, FcrApplicationPlatform.MACOS, FcrApplicationPlatform.LINUX]);
102
+
103
+ /** HARMONY or ELECTRON platforms set */
104
+ const HARMONY_OR_ELECTRON_PLATFORMS = new Set([FcrApplicationPlatform.HARMONY, ...ELECTRON_PLATFORMS]);
105
+ export const isTrueValue = value => {
106
+ return value === 'true' || !!value;
107
+ };
108
+ export const getCoreIpList = parameters => {
109
+ return parameters?.core?.coreIpList;
110
+ };
111
+ export const getEasemobChatIpList = parameters => {
112
+ return parameters?.core?.easemobChatIpList;
113
+ };
114
+ export const getEasemobRestIpList = parameters => {
115
+ return parameters?.core?.easemobRestIpList;
116
+ };
117
+ export const isEndpointRegionDisabled = parameters => {
118
+ return isTrueValue(parameters?.core?.disableEndpointRegion);
119
+ };
99
120
  export const getNeedLogUpload = parameters => {
100
121
  if (isBoolean(parameters?.core?.needLogUpload)) {
101
122
  return parameters.core.needLogUpload;
@@ -125,6 +146,7 @@ const DESKTOP_PLATFORMS = new Set([FcrApplicationPlatform.WINDOWS, FcrApplicatio
125
146
  export const getRtcPresetParameters = () => {
126
147
  const platform = getPlatform();
127
148
  const platformParams = RTC_PRESET_PARAMS_MAP[platform] ?? [];
128
- const desktopParams = DESKTOP_PLATFORMS.has(platform) ? DESKTOP_COMMON_PARAMS : [];
129
- return [...platformParams, ...desktopParams].map(p => JSON.stringify(p));
149
+ const electronParams = ELECTRON_PLATFORMS.has(platform) ? ELECTRON_COMMON_PARAMS : [];
150
+ const harmonyOrElectronParams = HARMONY_OR_ELECTRON_PLATFORMS.has(platform) ? HARMONY_OR_ELECTRON_COMMON_PARAMS : [];
151
+ return [...platformParams, ...electronParams, ...harmonyOrElectronParams].map(p => JSON.stringify(p));
130
152
  };
@@ -1,3 +1,4 @@
1
+ import "core-js/modules/es.array.includes.js";
1
2
  /**
2
3
  * 通用重试辅助工具
3
4
  *
@@ -9,11 +9,11 @@ const COMMON_HIGH_CAMERA_CONFIG = {
9
9
  };
10
10
  const COMMON_LOW_CAMERA_CONFIG = {
11
11
  dimensions: {
12
- width: 480,
13
- height: 270
12
+ width: 384,
13
+ height: 216
14
14
  },
15
- bitrate: 350,
16
- frameRate: 15
15
+ bitrate: 300,
16
+ frameRate: 10
17
17
  };
18
18
  const COMMON_FULL_HIGH_CAMERA_CONFIG = {
19
19
  dimensions: {
@@ -45,11 +45,20 @@ const MOBILE_HIGH_CAMERA_CONFIG = {
45
45
  height: 540
46
46
  },
47
47
  bitrate: 1000,
48
- frameRate: 24
48
+ frameRate: 15
49
+ };
50
+ const LINUX_HIGH_CAMERA_CONFIG = {
51
+ dimensions: {
52
+ width: 960,
53
+ height: 540
54
+ },
55
+ bitrate: 1000,
56
+ frameRate: 15
49
57
  };
50
58
  const HIGH_CAMERA_CONFIG_MAP = {
51
59
  [FcrApplicationPlatform.HARMONY]: MOBILE_HIGH_CAMERA_CONFIG,
52
- [FcrApplicationPlatform.WEB_MOBILE]: MOBILE_HIGH_CAMERA_CONFIG
60
+ [FcrApplicationPlatform.WEB_MOBILE]: MOBILE_HIGH_CAMERA_CONFIG,
61
+ [FcrApplicationPlatform.LINUX]: LINUX_HIGH_CAMERA_CONFIG
53
62
  };
54
63
  const LOW_CAMERA_CONFIG_MAP = {};
55
64
  const FULL_HIGH_CAMERA_CONFIG_MAP = {};
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.9.1",
4
+ "version": "3.10.0-beta",
5
5
  "module": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
7
7
  "files": [
@@ -41,7 +41,7 @@
41
41
  "@types/lodash": "^4.14.168",
42
42
  "@types/sinon": "^17.0.2",
43
43
  "@types/uuid": "^8.3.0",
44
- "agora-toolchain": "3.9.1",
44
+ "agora-toolchain": "3.10.0-beta",
45
45
  "core-js": "^3.33.3",
46
46
  "decomment": "^0.9.5",
47
47
  "husky": "^9.0.11",
@@ -61,8 +61,8 @@
61
61
  "@netless/video-js-plugin": "^0.3.8",
62
62
  "@netless/white-snapshot": "^0.4.2",
63
63
  "@netless/window-manager": "^1.0.7-beta.6",
64
- "agora-foundation": "3.9.1",
65
- "agora-rte-sdk": "3.9.1",
64
+ "agora-foundation": "3.10.0-beta",
65
+ "agora-rte-sdk": "3.10.0-beta",
66
66
  "await-to-js": "^3.0.0",
67
67
  "dayjs": "^1.10.4",
68
68
  "easemob-websdk": "4.13.0",