agora-rte-sdk 3.7.8 → 3.8.0-alpha

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 (71) hide show
  1. package/lib/constant.d.ts +2 -1
  2. package/lib/constant.js +26 -0
  3. package/lib/core/engine/ap-detector.js +2 -4
  4. package/lib/core/engine/index.d.ts +3 -0
  5. package/lib/core/engine/index.js +10 -4
  6. package/lib/core/media/camera.d.ts +1 -1
  7. package/lib/core/media/camera.js +15 -15
  8. package/lib/core/media/index.d.ts +8 -8
  9. package/lib/core/media/index.js +16 -16
  10. package/lib/core/media/loopback.d.ts +1 -1
  11. package/lib/core/media/loopback.js +15 -15
  12. package/lib/core/media/microphone.d.ts +1 -1
  13. package/lib/core/media/microphone.js +15 -15
  14. package/lib/core/media/screen.d.ts +1 -1
  15. package/lib/core/media/screen.js +15 -15
  16. package/lib/core/processor/synchronizer/synchronizer-manager.d.ts +4 -0
  17. package/lib/core/processor/synchronizer/synchronizer-manager.js +41 -10
  18. package/lib/core/rtc/channel.d.ts +8 -1
  19. package/lib/core/rtc/publisher.d.ts +7 -0
  20. package/lib/core/rtc/type.d.ts +13 -0
  21. package/lib/core/scene/index.d.ts +4 -2
  22. package/lib/core/scene/index.js +29 -17
  23. package/lib/core/scene/local-user.d.ts +7 -6
  24. package/lib/core/scene/local-user.js +12 -7
  25. package/lib/core/scene/stream-player.d.ts +1 -1
  26. package/lib/core/scene/stream-player.js +2 -2
  27. package/lib/core/scene/type.d.ts +10 -0
  28. package/lib/imports.d.ts +4 -1
  29. package/lib/imports.js +22 -1
  30. package/lib/plugin/monitor/index.js +15 -15
  31. package/lib/plugin/restful-client/index.d.ts +4 -2
  32. package/lib/plugin/restful-client/index.js +14 -7
  33. package/lib/plugin/rtc/electron/capture-enhancement.js +16 -4
  34. package/lib/plugin/rtc/electron/channel.d.ts +4 -1
  35. package/lib/plugin/rtc/electron/channel.js +31 -4
  36. package/lib/plugin/rtc/electron/client.js +25 -9
  37. package/lib/plugin/rtc/electron/publish-pool.d.ts +8 -1
  38. package/lib/plugin/rtc/electron/publish-pool.js +47 -49
  39. package/lib/plugin/rtc/electron/publisher.d.ts +7 -0
  40. package/lib/plugin/rtc/electron/publisher.js +143 -26
  41. package/lib/plugin/rtc/electron/source-manager.d.ts +4 -0
  42. package/lib/plugin/rtc/electron/source-manager.js +85 -36
  43. package/lib/plugin/rtc/electron/source-state-control/loopback-state-control.js +3 -1
  44. package/lib/plugin/rtc/electron/type.d.ts +10 -1
  45. package/lib/plugin/rtc/electron/type.js +6 -1
  46. package/lib/plugin/rtc/web/channel.d.ts +3 -1
  47. package/lib/plugin/rtc/web/channel.js +25 -2
  48. package/lib/plugin/rtc/web/client.d.ts +5 -0
  49. package/lib/plugin/rtc/web/client.js +30 -7
  50. package/lib/plugin/rtc/web/device.d.ts +8 -4
  51. package/lib/plugin/rtc/web/device.js +52 -9
  52. package/lib/plugin/rtc/web/publish-pool.d.ts +7 -0
  53. package/lib/plugin/rtc/web/publish-pool.js +43 -43
  54. package/lib/plugin/rtc/web/publish.d.ts +11 -10
  55. package/lib/plugin/rtc/web/publish.js +43 -19
  56. package/lib/plugin/rtc/web/publisher.d.ts +14 -2
  57. package/lib/plugin/rtc/web/publisher.js +136 -6
  58. package/lib/plugin/rtc/web/source-manager.d.ts +4 -2
  59. package/lib/plugin/rtc/web/source-manager.js +52 -34
  60. package/lib/plugin/rtc/web/track-control/camera.d.ts +1 -0
  61. package/lib/plugin/rtc/web/track-control/camera.js +20 -3
  62. package/lib/plugin/rtc/web/track-control/microphone.d.ts +6 -3
  63. package/lib/plugin/rtc/web/track-control/microphone.js +209 -79
  64. package/lib/plugin/rtc/web/track-control/screen.js +19 -14
  65. package/lib/plugin/rtc/web/type.d.ts +10 -0
  66. package/lib/plugin/rtc/web/utils.d.ts +4 -0
  67. package/lib/plugin/rtc/web/utils.js +7 -2
  68. package/lib/plugin/rtm/client.js +5 -8
  69. package/lib/plugin/rtm/index.js +1 -1
  70. package/lib/type.d.ts +1 -1
  71. package/package.json +4 -4
package/lib/constant.d.ts CHANGED
@@ -31,5 +31,6 @@ export declare enum AgoraRtcErrorCode {
31
31
  INVALID_ARGUMENT = 23,
32
32
  UNSUPPORT_SCENARIO_TYPE = 24,
33
33
  CANNOT_SET_SPEAKER_TO_AGORA_ALD = 25,
34
- SOURCE_ID_IS_NOT_VALID = 26
34
+ SOURCE_ID_IS_NOT_VALID = 26,
35
+ CANNOT_SET_DUAL_STREAM_MODE = 27
35
36
  }
package/lib/constant.js CHANGED
@@ -15,31 +15,57 @@ var DEFAULT_RTM_CLIENT_IS_DISABLED = exports.DEFAULT_RTM_CLIENT_IS_DISABLED = fa
15
15
  var AgoraRtcErrorCode = exports.AgoraRtcErrorCode = /*#__PURE__*/function (AgoraRtcErrorCode) {
16
16
  AgoraRtcErrorCode[AgoraRtcErrorCode["UNDEFINED"] = -1] = "UNDEFINED";
17
17
  AgoraRtcErrorCode[AgoraRtcErrorCode["SUCCESS"] = 0] = "SUCCESS";
18
+ // 无法设置视频编码配置
18
19
  AgoraRtcErrorCode[AgoraRtcErrorCode["CANNOT_SET_VIDEO_ENCODER_CONFIG"] = 1] = "CANNOT_SET_VIDEO_ENCODER_CONFIG";
20
+ // 无法找到存在的画布ID
19
21
  AgoraRtcErrorCode[AgoraRtcErrorCode["HAVE_NO_EXIST_CANVAS_ID"] = 2] = "HAVE_NO_EXIST_CANVAS_ID";
22
+ // 无法启用美颜
20
23
  AgoraRtcErrorCode[AgoraRtcErrorCode["CANNOT_ENABLE_BEAUTY"] = 3] = "CANNOT_ENABLE_BEAUTY";
24
+ // 虚拟背景不是图片
21
25
  AgoraRtcErrorCode[AgoraRtcErrorCode["VIRTUAL_BACKGROUND_IS_NOT_IMAGE"] = 4] = "VIRTUAL_BACKGROUND_IS_NOT_IMAGE";
26
+ // 虚拟背景不是有效的图片模式
22
27
  AgoraRtcErrorCode[AgoraRtcErrorCode["VIRTUAL_BACKGROUND_IS_NOT_VALID_IMAGE_PATTERN"] = 5] = "VIRTUAL_BACKGROUND_IS_NOT_VALID_IMAGE_PATTERN";
28
+ // 虚拟背景不是有效的视频模式
23
29
  AgoraRtcErrorCode[AgoraRtcErrorCode["VIRTUAL_BACKGROUND_IS_NOT_VALID_VIDEO_PATTERN"] = 6] = "VIRTUAL_BACKGROUND_IS_NOT_VALID_VIDEO_PATTERN";
30
+ // 虚拟背景不是有效的颜色值
24
31
  AgoraRtcErrorCode[AgoraRtcErrorCode["VIRTUAL_BACKGROUND_IS_NOT_VALID_COLOR_VALUE"] = 7] = "VIRTUAL_BACKGROUND_IS_NOT_VALID_COLOR_VALUE";
25
32
  AgoraRtcErrorCode[AgoraRtcErrorCode["CANNOT_ENABLE_VIRTUAL_BACKGROUND"] = 8] = "CANNOT_ENABLE_VIRTUAL_BACKGROUND";
33
+ // 无法找到未发布的视频
26
34
  AgoraRtcErrorCode[AgoraRtcErrorCode["CANNOT_FIND_ITEM_IN_UNPUBLISH_VIDEO"] = 9] = "CANNOT_FIND_ITEM_IN_UNPUBLISH_VIDEO";
35
+ // 无法找到未发布的音频
27
36
  AgoraRtcErrorCode[AgoraRtcErrorCode["CANNOT_FIND_ITEM_IN_UNPUBLISH_AUDIO"] = 10] = "CANNOT_FIND_ITEM_IN_UNPUBLISH_AUDIO";
37
+ // 无法找到未发布的流
28
38
  AgoraRtcErrorCode[AgoraRtcErrorCode["CANNOT_FIND_ITEM_IN_PAUSE_POOL"] = 11] = "CANNOT_FIND_ITEM_IN_PAUSE_POOL";
39
+ // 无法发布本地视频流
29
40
  AgoraRtcErrorCode[AgoraRtcErrorCode["CANNOT_PUBLISH_LOCAL_VIDEO_STREAM"] = 12] = "CANNOT_PUBLISH_LOCAL_VIDEO_STREAM";
41
+ // 无法发布本地音频流
30
42
  AgoraRtcErrorCode[AgoraRtcErrorCode["CANNOT_PUBLISH_LOCAL_AUDIO_STREAM"] = 13] = "CANNOT_PUBLISH_LOCAL_AUDIO_STREAM";
31
43
  AgoraRtcErrorCode[AgoraRtcErrorCode["VIDEO_SOURCE_TYPE_IS_NONE"] = 14] = "VIDEO_SOURCE_TYPE_IS_NONE";
44
+ // 无法设置摄像头视频方向
32
45
  AgoraRtcErrorCode[AgoraRtcErrorCode["CANNOT_SET_CAMERA_VIDEO_ORIENTATION"] = 15] = "CANNOT_SET_CAMERA_VIDEO_ORIENTATION";
46
+ // 无法启动摄像头捕获
33
47
  AgoraRtcErrorCode[AgoraRtcErrorCode["CANNOT_START_CAMERA_CAPTURE"] = 16] = "CANNOT_START_CAMERA_CAPTURE";
48
+ // 无法停止摄像头捕获
34
49
  AgoraRtcErrorCode[AgoraRtcErrorCode["CANNOT_STOP_CAMERA_CAPTURE"] = 17] = "CANNOT_STOP_CAMERA_CAPTURE";
50
+ // 无法生成视频源索引
35
51
  AgoraRtcErrorCode[AgoraRtcErrorCode["CANNOT_GENERATE_VIDEO_SOURCE_INDEX"] = 18] = "CANNOT_GENERATE_VIDEO_SOURCE_INDEX";
52
+ // 连接不是有效的
36
53
  AgoraRtcErrorCode[AgoraRtcErrorCode["CONNECTION_IS_NOT_VALID"] = 19] = "CONNECTION_IS_NOT_VALID";
54
+ // 源索引不是有效的
37
55
  AgoraRtcErrorCode[AgoraRtcErrorCode["SOURCE_INDEX_IS_NOT_VALID"] = 20] = "SOURCE_INDEX_IS_NOT_VALID";
56
+ // 放置不是渲染的
38
57
  AgoraRtcErrorCode[AgoraRtcErrorCode["PLACEMENT_IS_NOT_RENDERED"] = 21] = "PLACEMENT_IS_NOT_RENDERED";
58
+ // 未知渲染类型
39
59
  AgoraRtcErrorCode[AgoraRtcErrorCode["UNKNOWN_RENDER_TYPE"] = 22] = "UNKNOWN_RENDER_TYPE";
60
+ // 无效的参数
40
61
  AgoraRtcErrorCode[AgoraRtcErrorCode["INVALID_ARGUMENT"] = 23] = "INVALID_ARGUMENT";
62
+ // 不支持的场景类型
41
63
  AgoraRtcErrorCode[AgoraRtcErrorCode["UNSUPPORT_SCENARIO_TYPE"] = 24] = "UNSUPPORT_SCENARIO_TYPE";
64
+ // 无法设置扬声器到AGORA_ALD
42
65
  AgoraRtcErrorCode[AgoraRtcErrorCode["CANNOT_SET_SPEAKER_TO_AGORA_ALD"] = 25] = "CANNOT_SET_SPEAKER_TO_AGORA_ALD";
66
+ // 源ID不是有效的
43
67
  AgoraRtcErrorCode[AgoraRtcErrorCode["SOURCE_ID_IS_NOT_VALID"] = 26] = "SOURCE_ID_IS_NOT_VALID";
68
+ // 无法设置双流模式
69
+ AgoraRtcErrorCode[AgoraRtcErrorCode["CANNOT_SET_DUAL_STREAM_MODE"] = 27] = "CANNOT_SET_DUAL_STREAM_MODE";
44
70
  return AgoraRtcErrorCode;
45
71
  }({});
@@ -148,6 +148,7 @@ var AgoraRteApDetectorImpl = exports.AgoraRteApDetectorImpl = /*#__PURE__*/funct
148
148
  this._externalRtcConfig = this._resolveParamsRtcConfig('externalRtcConfig', externalRtcConfig);
149
149
  this._detectTimeout = this._resolveParamsDetecTimeout(detectTimeout);
150
150
  this._isRedetect = this._resolveParamsIsRedetect(isRedetect);
151
+ this.addObserver((0, _imports.generateLogObserver)(this.logger, ['onDetectionFailure', 'onDetectionSuccess', 'onRedetectionFailure', 'onRedetectionSuccess']));
151
152
  }
152
153
 
153
154
  // ==================== 公有方法 ====================
@@ -307,10 +308,7 @@ var AgoraRteApDetectorImpl = exports.AgoraRteApDetectorImpl = /*#__PURE__*/funct
307
308
  if (internalRtcConfig === undefined && externalRtcConfig === undefined) {
308
309
  return false;
309
310
  }
310
- if ((internalRtcConfig === null || internalRtcConfig === void 0 ? void 0 : internalRtcConfig.serverList) === undefined || (externalRtcConfig === null || externalRtcConfig === void 0 ? void 0 : externalRtcConfig.serverList) === undefined) {
311
- return false;
312
- }
313
- if ((internalRtcConfig === null || internalRtcConfig === void 0 ? void 0 : internalRtcConfig.serverList.length) === 0 && (externalRtcConfig === null || externalRtcConfig === void 0 ? void 0 : externalRtcConfig.serverList.length) === 0) {
311
+ if ((0, _imports.isEmpty)(internalRtcConfig === null || internalRtcConfig === void 0 ? void 0 : internalRtcConfig.serverList) && (0, _imports.isEmpty)(externalRtcConfig === null || externalRtcConfig === void 0 ? void 0 : externalRtcConfig.serverList)) {
314
312
  return false;
315
313
  }
316
314
  return true;
@@ -1,4 +1,5 @@
1
1
  import { AgoraRteMediaControl } from '../media';
2
+ import { AgoraRequestScheduler } from '../../imports';
2
3
  import { AgoraRteEngineConfig, AgoraRteEngineObserver, AgoraRteSceneConfig } from '../../type';
3
4
  import { AgoraRteMonitor } from '../monitor';
4
5
  import { AgoraHttpAuthHeadersProvider } from '../services/type';
@@ -17,6 +18,7 @@ export declare class AgoraRteEngine {
17
18
  private _apiService;
18
19
  private _httpAuthHeadersProvider;
19
20
  private _pluginManager;
21
+ private _requestScheduler;
20
22
  private get rtcClient();
21
23
  private get rtmClient();
22
24
  constructor(config: AgoraRteEngineConfig);
@@ -35,6 +37,7 @@ export declare class AgoraRteEngine {
35
37
  addObserver(observer: AgoraRteEngineObserver): void;
36
38
  removeObserver(observer: AgoraRteEngineObserver): void;
37
39
  getHttpAuthHeadersProvider(): AgoraHttpAuthHeadersProvider;
40
+ getRequestScheduler(): AgoraRequestScheduler;
38
41
  private _handleConnectionStateUpdated;
39
42
  private _handleTokenWillExpire;
40
43
  private _handlePeerMessageReceived;
@@ -94,6 +94,7 @@ var AgoraRteEngine = exports.AgoraRteEngine = /*#__PURE__*/function () {
94
94
  });
95
95
  (0, _defineProperty2["default"])(this, "_apDetector", this._createDefaultApDetector());
96
96
  (0, _defineProperty2["default"])(this, "_pluginManager", (0, _plugin.getPluginManager)());
97
+ (0, _defineProperty2["default"])(this, "_requestScheduler", new _imports.AgoraRequestScheduler());
97
98
  (0, _domainHolder.resetSharedDomainHolder)();
98
99
  this._config = (0, _clone.cloneDeep)(config);
99
100
 
@@ -117,9 +118,9 @@ var AgoraRteEngine = exports.AgoraRteEngine = /*#__PURE__*/function () {
117
118
  }
118
119
  this._httpAuthHeadersProvider = new _authHeaders.AgoraHttpAuthHeadersProviderImpl({
119
120
  userId: this._config.userId,
120
- token: this._config.token
121
+ token: this._config.userToken
121
122
  });
122
- this._restfulClient = new _restfulClient.AgoraRestfulClientImpl(this._httpAuthHeadersProvider, (0, _domainHolder.getSharedDomainHolder)(this._config.rteRegion));
123
+ this._restfulClient = new _restfulClient.AgoraRestfulClientImpl(this._httpAuthHeadersProvider, (0, _domainHolder.getSharedDomainHolder)(this._config.rteRegion), this._requestScheduler);
123
124
  this._apiService = new _api.AgoraRteServiceApi(this._restfulClient, this._config.appId, this._config.rteRegion, !(0, _parameters.isEndpointRegionDisabled)(config.parameters));
124
125
  var monitor = new _monitor.AgoraRteMonitorImpl({
125
126
  appId: this._config.appId,
@@ -161,7 +162,7 @@ var AgoraRteEngine = exports.AgoraRteEngine = /*#__PURE__*/function () {
161
162
  while (1) switch (_context.prev = _context.next) {
162
163
  case 0:
163
164
  _context.next = 1;
164
- return this.rtmClient.login(this._config.token, this._config.userId);
165
+ return this.rtmClient.login(this._config.userToken, this._config.userId);
165
166
  case 1:
166
167
  case "end":
167
168
  return _context.stop();
@@ -319,6 +320,11 @@ var AgoraRteEngine = exports.AgoraRteEngine = /*#__PURE__*/function () {
319
320
  value: function getHttpAuthHeadersProvider() {
320
321
  return this._httpAuthHeadersProvider;
321
322
  }
323
+ }, {
324
+ key: "getRequestScheduler",
325
+ value: function getRequestScheduler() {
326
+ return this._requestScheduler;
327
+ }
322
328
  }, {
323
329
  key: "_handleConnectionStateUpdated",
324
330
  value: function _handleConnectionStateUpdated(state) {
@@ -411,7 +417,7 @@ var AgoraRteEngine = exports.AgoraRteEngine = /*#__PURE__*/function () {
411
417
  this.logger.info("setup fixed service domain list: ".concat(JSON.stringify(rteIpList)));
412
418
  (0, _domainHolder.resetSharedDomainHolder)();
413
419
  (0, _domainHolder.getSharedDomainHolder)(this._config.rteRegion).setFixedDomainList(rteIpList);
414
- this._restfulClient = new _restfulClient.AgoraRestfulClientImpl(this._httpAuthHeadersProvider, (0, _domainHolder.getSharedDomainHolder)(this._config.rteRegion));
420
+ this._restfulClient = new _restfulClient.AgoraRestfulClientImpl(this._httpAuthHeadersProvider, (0, _domainHolder.getSharedDomainHolder)(this._config.rteRegion), this._requestScheduler);
415
421
  this._apiService.setRestfulClient(this._restfulClient);
416
422
  }
417
423
  }
@@ -4,7 +4,7 @@ import { AgoraRteVideoEffectEnhancer } from './effect-enhancer';
4
4
  /**
5
5
  * Interface for a video track from a camera in Agora RTE SDK.
6
6
  */
7
- export interface AgoraRteCameraVideoTrack extends AgoraRteObservableTrack<AgoraRteCameraTrackObserver> {
7
+ export interface AgoraRteCameraTrack extends AgoraRteObservableTrack<AgoraRteCameraTrackObserver> {
8
8
  /**
9
9
  * Gets the device ID of the camera.
10
10
  * @returns The device ID of the camera.
@@ -38,7 +38,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
38
38
  Object.defineProperty(exports, "__esModule", {
39
39
  value: true
40
40
  });
41
- exports.AgoraRteCameraVideoTrackImpl = exports.AgoraRteCameraVideoDummyTrackImpl = void 0;
41
+ exports.AgoraRteCameraTrackImpl = exports.AgoraRteCameraDummyTrackImpl = void 0;
42
42
  require("core-js/modules/es.error.cause.js");
43
43
  require("core-js/modules/es.error.to-string.js");
44
44
  require("core-js/modules/es.function.bind.js");
@@ -55,7 +55,7 @@ var _type2 = require("./type");
55
55
  var _effectEnhancer = require("./effect-enhancer");
56
56
  var _logger = require("../utilities/logger");
57
57
  var _imports = require("../../imports");
58
- var _ref, _AgoraRteCameraVideoTrackImpl;
58
+ var _ref, _AgoraRteCameraTrackImpl;
59
59
  var _initProto;
60
60
  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)); }
61
61
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
@@ -68,13 +68,13 @@ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side
68
68
  * Interface for a video track from a camera in Agora RTE SDK.
69
69
  */
70
70
  //@internal
71
- var AgoraRteCameraVideoTrackImpl = exports.AgoraRteCameraVideoTrackImpl = /*#__PURE__*/function (_ref2) {
72
- function AgoraRteCameraVideoTrackImpl(_rtcClient, _deviceId) {
71
+ var AgoraRteCameraTrackImpl = exports.AgoraRteCameraTrackImpl = /*#__PURE__*/function (_ref2) {
72
+ function AgoraRteCameraTrackImpl(_rtcClient, _deviceId) {
73
73
  var _this;
74
- (0, _classCallCheck2["default"])(this, AgoraRteCameraVideoTrackImpl);
75
- _this = _callSuper(this, AgoraRteCameraVideoTrackImpl, [_rtcClient]);
74
+ (0, _classCallCheck2["default"])(this, AgoraRteCameraTrackImpl);
75
+ _this = _callSuper(this, AgoraRteCameraTrackImpl, [_rtcClient]);
76
76
  (0, _defineProperty2["default"])(_this, "logger", (_initProto(_this), (0, _logger.createLogger)({
77
- prefix: 'AgoraRteCameraVideoTrackImpl'
77
+ prefix: 'AgoraRteCameraTrackImpl'
78
78
  })));
79
79
  (0, _defineProperty2["default"])(_this, "_state", _type.AgoraRteMediaSourceState.CLOSE);
80
80
  _this._deviceId = _deviceId;
@@ -84,8 +84,8 @@ var AgoraRteCameraVideoTrackImpl = exports.AgoraRteCameraVideoTrackImpl = /*#__P
84
84
  });
85
85
  return _this;
86
86
  }
87
- (0, _inherits2["default"])(AgoraRteCameraVideoTrackImpl, _ref2);
88
- return (0, _createClass2["default"])(AgoraRteCameraVideoTrackImpl, [{
87
+ (0, _inherits2["default"])(AgoraRteCameraTrackImpl, _ref2);
88
+ return (0, _createClass2["default"])(AgoraRteCameraTrackImpl, [{
89
89
  key: "getVideoEffectEnhancer",
90
90
  value: function getVideoEffectEnhancer() {
91
91
  return this._effectEnhancer;
@@ -166,14 +166,14 @@ var AgoraRteCameraVideoTrackImpl = exports.AgoraRteCameraVideoTrackImpl = /*#__P
166
166
  }
167
167
  }]);
168
168
  }(_ref = _baseTrack.AgoraRteBaseTrack); // @internal
169
- _AgoraRteCameraVideoTrackImpl = AgoraRteCameraVideoTrackImpl;
170
- var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_AgoraRteCameraVideoTrackImpl, [[_imports.trace, 2, "switchPosition"], [_imports.trace, 2, "start"], [_imports.trace, 2, "stop"], [_imports.trace, 2, "startPreview"], [_imports.trace, 2, "stopPreview"], [_imports.trace, 2, "startTest"], [_imports.trace, 2, "stopTest"], [_imports.trace, 2, "setCaptureParams"], [_imports.trace, 2, "setVideoOrientation"]], [], 0, void 0, _ref).e, 1);
169
+ _AgoraRteCameraTrackImpl = AgoraRteCameraTrackImpl;
170
+ var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_AgoraRteCameraTrackImpl, [[_imports.trace, 2, "switchPosition"], [_imports.trace, 2, "start"], [_imports.trace, 2, "stop"], [_imports.trace, 2, "startPreview"], [_imports.trace, 2, "stopPreview"], [_imports.trace, 2, "startTest"], [_imports.trace, 2, "stopTest"], [_imports.trace, 2, "setCaptureParams"], [_imports.trace, 2, "setVideoOrientation"]], [], 0, void 0, _ref).e, 1);
171
171
  _initProto = _applyDecs$e[0];
172
- var AgoraRteCameraVideoDummyTrackImpl = exports.AgoraRteCameraVideoDummyTrackImpl = /*#__PURE__*/function () {
173
- function AgoraRteCameraVideoDummyTrackImpl() {
174
- (0, _classCallCheck2["default"])(this, AgoraRteCameraVideoDummyTrackImpl);
172
+ var AgoraRteCameraDummyTrackImpl = exports.AgoraRteCameraDummyTrackImpl = /*#__PURE__*/function () {
173
+ function AgoraRteCameraDummyTrackImpl() {
174
+ (0, _classCallCheck2["default"])(this, AgoraRteCameraDummyTrackImpl);
175
175
  }
176
- return (0, _createClass2["default"])(AgoraRteCameraVideoDummyTrackImpl, [{
176
+ return (0, _createClass2["default"])(AgoraRteCameraDummyTrackImpl, [{
177
177
  key: "addObserver",
178
178
  value: function addObserver(observer) {}
179
179
  }, {
@@ -1,8 +1,8 @@
1
1
  import { AgoraRtcAudioOutputRouting, AgoraRtcCapability, AgoraRtcDeviceInfo, AgoraRtcDisplayInfo, AgoraRtcWindowInfo } from '../rtc/type';
2
- import { AgoraRteCameraVideoTrack } from './camera';
3
- import { AgoraRteLoopbackAudioTrack } from './loopback';
4
- import { AgoraRteMicrophoneAudioTrack } from './microphone';
5
- import { AgoraRteScreenVideoTrack } from './screen';
2
+ import { AgoraRteCameraTrack } from './camera';
3
+ import { AgoraRteLoopbackTrack } from './loopback';
4
+ import { AgoraRteMicrophoneTrack } from './microphone';
5
+ import { AgoraRteScreenTrack } from './screen';
6
6
  import { AgoraRteMediaControlObserver } from './type';
7
7
  /**
8
8
  * Interface for the Agora Real-Time Engagement Media Control.
@@ -55,25 +55,25 @@ export interface AgoraRteMediaControl {
55
55
  * @param deviceId The ID of the device.
56
56
  * @returns The camera video track.
57
57
  */
58
- getCameraVideoTrack(deviceId: string): AgoraRteCameraVideoTrack;
58
+ getCameraTrack(deviceId: string): AgoraRteCameraTrack;
59
59
  /**
60
60
  * Retrieves the microphone audio track for a specific device.
61
61
  * @param deviceId The ID of the device.
62
62
  * @returns The microphone audio track.
63
63
  */
64
- getMicrophoneAudioTrack(deviceId: string): AgoraRteMicrophoneAudioTrack;
64
+ getMicrophoneTrack(deviceId: string): AgoraRteMicrophoneTrack;
65
65
  /**
66
66
  * Retrieves the screen video track for a specific source.
67
67
  * @param sourceId The ID of the source.
68
68
  * @returns The screen video track.
69
69
  */
70
- getScreenVideoTrack(sourceId: string): AgoraRteScreenVideoTrack;
70
+ getScreenTrack(sourceId: string): AgoraRteScreenTrack;
71
71
  /**
72
72
  * Retrieves the loopback audio track for a specific source.
73
73
  * @param sourceId The ID of the source.
74
74
  * @returns The loopback audio track.
75
75
  */
76
- getLoopbackAudioTrack(sourceId: string): AgoraRteLoopbackAudioTrack;
76
+ getLoopbackTrack(sourceId: string): AgoraRteLoopbackTrack;
77
77
  /**
78
78
  * Sets a speaker for audio playback.
79
79
  * @param deviceId The ID of the speaker device.
@@ -193,46 +193,46 @@ var AgoraRteMediaControlImpl = exports.AgoraRteMediaControlImpl = /*#__PURE__*/f
193
193
  this.rtcClient.setEnableSpeaker(enable);
194
194
  }
195
195
  }, {
196
- key: "getCameraVideoTrack",
197
- value: function getCameraVideoTrack(deviceId) {
196
+ key: "getCameraTrack",
197
+ value: function getCameraTrack(deviceId) {
198
198
  if (!this._rtcClient) {
199
- return new _camera.AgoraRteCameraVideoDummyTrackImpl();
199
+ return new _camera.AgoraRteCameraDummyTrackImpl();
200
200
  }
201
201
  if (!this._cameraVideoTracksMap.has(deviceId)) {
202
- this._cameraVideoTracksMap.set(deviceId, new _camera.AgoraRteCameraVideoTrackImpl(this.rtcClient, deviceId));
202
+ this._cameraVideoTracksMap.set(deviceId, new _camera.AgoraRteCameraTrackImpl(this.rtcClient, deviceId));
203
203
  }
204
204
  return this._cameraVideoTracksMap.get(deviceId);
205
205
  }
206
206
  }, {
207
- key: "getMicrophoneAudioTrack",
208
- value: function getMicrophoneAudioTrack(deviceId) {
207
+ key: "getMicrophoneTrack",
208
+ value: function getMicrophoneTrack(deviceId) {
209
209
  if (!this._rtcClient) {
210
- return new _microphone.AgoraRteMicrophoneAudioDummyTrackImpl();
210
+ return new _microphone.AgoraRteMicrophoneDummyTrackImpl();
211
211
  }
212
212
  if (!this._microphoneAudioTracksMap.has(deviceId)) {
213
- this._microphoneAudioTracksMap.set(deviceId, new _microphone.AgoraRteMicrophoneAudioTrackImpl(this.rtcClient, deviceId));
213
+ this._microphoneAudioTracksMap.set(deviceId, new _microphone.AgoraRteMicrophoneTrackImpl(this.rtcClient, deviceId));
214
214
  }
215
215
  return this._microphoneAudioTracksMap.get(deviceId);
216
216
  }
217
217
  }, {
218
- key: "getScreenVideoTrack",
219
- value: function getScreenVideoTrack(sourceId) {
218
+ key: "getScreenTrack",
219
+ value: function getScreenTrack(sourceId) {
220
220
  if (!this._rtcClient) {
221
- return new _screen.AgoraRteScreenVideoDummyTrackImpl();
221
+ return new _screen.AgoraRteScreenDummyTrackImpl();
222
222
  }
223
223
  if (!this._screenShareTracksMap.has(sourceId)) {
224
- this._screenShareTracksMap.set(sourceId, new _screen.AgoraRteScreenVideoTrackImpl(this.rtcClient, sourceId));
224
+ this._screenShareTracksMap.set(sourceId, new _screen.AgoraRteScreenTrackImpl(this.rtcClient, sourceId));
225
225
  }
226
226
  return this._screenShareTracksMap.get(sourceId);
227
227
  }
228
228
  }, {
229
- key: "getLoopbackAudioTrack",
230
- value: function getLoopbackAudioTrack(sourceId) {
229
+ key: "getLoopbackTrack",
230
+ value: function getLoopbackTrack(sourceId) {
231
231
  if (!this._rtcClient) {
232
- return new _loopback.AgoraRteLoopbackAudioDummyTrackImpl();
232
+ return new _loopback.AgoraRteLoopbackDummyTrackImpl();
233
233
  }
234
234
  if (!this._loopbackAudioTracksMap.has(sourceId)) {
235
- this._loopbackAudioTracksMap.set(sourceId, new _loopback.AgoraRteLoopbackAudioTrackImpl(this.rtcClient, sourceId));
235
+ this._loopbackAudioTracksMap.set(sourceId, new _loopback.AgoraRteLoopbackTrackImpl(this.rtcClient, sourceId));
236
236
  }
237
237
  return this._loopbackAudioTracksMap.get(sourceId);
238
238
  }
@@ -3,7 +3,7 @@ import { AgoraRteLoopbackObserver, AgoraRteObservableTrack } from './type';
3
3
  /**
4
4
  * Interface for a loopback audio track in Agora RTE SDK.
5
5
  */
6
- export interface AgoraRteLoopbackAudioTrack extends AgoraRteObservableTrack<AgoraRteLoopbackObserver> {
6
+ export interface AgoraRteLoopbackTrack extends AgoraRteObservableTrack<AgoraRteLoopbackObserver> {
7
7
  /**
8
8
  * Gets the device ID of the loopback audio track.
9
9
  * @returns The device ID of the loopback audio track.
@@ -40,7 +40,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
40
40
  Object.defineProperty(exports, "__esModule", {
41
41
  value: true
42
42
  });
43
- exports.AgoraRteLoopbackAudioTrackImpl = exports.AgoraRteLoopbackAudioDummyTrackImpl = void 0;
43
+ exports.AgoraRteLoopbackTrackImpl = exports.AgoraRteLoopbackDummyTrackImpl = void 0;
44
44
  require("core-js/modules/es.function.bind.js");
45
45
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
46
46
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
@@ -53,7 +53,7 @@ var _imports = require("../../imports");
53
53
  var _type = require("../../type");
54
54
  var _logger = require("../utilities/logger");
55
55
  var _baseTrack = require("./base-track");
56
- var _ref, _AgoraRteLoopbackAudioTrackImpl;
56
+ var _ref, _AgoraRteLoopbackTrackImpl;
57
57
  var _initProto;
58
58
  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)); }
59
59
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
@@ -66,13 +66,13 @@ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side
66
66
  * Interface for a loopback audio track in Agora RTE SDK.
67
67
  */
68
68
  //@internal
69
- var AgoraRteLoopbackAudioTrackImpl = exports.AgoraRteLoopbackAudioTrackImpl = /*#__PURE__*/function (_ref2) {
70
- function AgoraRteLoopbackAudioTrackImpl(_rtcClient, _deviceId) {
69
+ var AgoraRteLoopbackTrackImpl = exports.AgoraRteLoopbackTrackImpl = /*#__PURE__*/function (_ref2) {
70
+ function AgoraRteLoopbackTrackImpl(_rtcClient, _deviceId) {
71
71
  var _this;
72
- (0, _classCallCheck2["default"])(this, AgoraRteLoopbackAudioTrackImpl);
73
- _this = _callSuper(this, AgoraRteLoopbackAudioTrackImpl, [_rtcClient]);
72
+ (0, _classCallCheck2["default"])(this, AgoraRteLoopbackTrackImpl);
73
+ _this = _callSuper(this, AgoraRteLoopbackTrackImpl, [_rtcClient]);
74
74
  (0, _defineProperty2["default"])(_this, "logger", (_initProto(_this), (0, _logger.createLogger)({
75
- prefix: 'AgoraRteLoopbackAudioTrackImpl'
75
+ prefix: 'AgoraRteLoopbackTrackImpl'
76
76
  })));
77
77
  (0, _defineProperty2["default"])(_this, "_state", _type.AgoraRteMediaSourceState.CLOSE);
78
78
  _this._deviceId = _deviceId;
@@ -81,8 +81,8 @@ var AgoraRteLoopbackAudioTrackImpl = exports.AgoraRteLoopbackAudioTrackImpl = /*
81
81
  });
82
82
  return _this;
83
83
  }
84
- (0, _inherits2["default"])(AgoraRteLoopbackAudioTrackImpl, _ref2);
85
- return (0, _createClass2["default"])(AgoraRteLoopbackAudioTrackImpl, [{
84
+ (0, _inherits2["default"])(AgoraRteLoopbackTrackImpl, _ref2);
85
+ return (0, _createClass2["default"])(AgoraRteLoopbackTrackImpl, [{
86
86
  key: "getDeviceId",
87
87
  value: function getDeviceId() {
88
88
  return this._deviceId;
@@ -123,14 +123,14 @@ var AgoraRteLoopbackAudioTrackImpl = exports.AgoraRteLoopbackAudioTrackImpl = /*
123
123
  }
124
124
  }]);
125
125
  }(_ref = _baseTrack.AgoraRteBaseTrack); // @internal
126
- _AgoraRteLoopbackAudioTrackImpl = AgoraRteLoopbackAudioTrackImpl;
127
- var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_AgoraRteLoopbackAudioTrackImpl, [[_imports.trace, 2, "start"], [_imports.trace, 2, "stop"], [_imports.trace, 2, "adjustVolume"]], [], 0, void 0, _ref).e, 1);
126
+ _AgoraRteLoopbackTrackImpl = AgoraRteLoopbackTrackImpl;
127
+ var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_AgoraRteLoopbackTrackImpl, [[_imports.trace, 2, "start"], [_imports.trace, 2, "stop"], [_imports.trace, 2, "adjustVolume"]], [], 0, void 0, _ref).e, 1);
128
128
  _initProto = _applyDecs$e[0];
129
- var AgoraRteLoopbackAudioDummyTrackImpl = exports.AgoraRteLoopbackAudioDummyTrackImpl = /*#__PURE__*/function () {
130
- function AgoraRteLoopbackAudioDummyTrackImpl() {
131
- (0, _classCallCheck2["default"])(this, AgoraRteLoopbackAudioDummyTrackImpl);
129
+ var AgoraRteLoopbackDummyTrackImpl = exports.AgoraRteLoopbackDummyTrackImpl = /*#__PURE__*/function () {
130
+ function AgoraRteLoopbackDummyTrackImpl() {
131
+ (0, _classCallCheck2["default"])(this, AgoraRteLoopbackDummyTrackImpl);
132
132
  }
133
- return (0, _createClass2["default"])(AgoraRteLoopbackAudioDummyTrackImpl, [{
133
+ return (0, _createClass2["default"])(AgoraRteLoopbackDummyTrackImpl, [{
134
134
  key: "addObserver",
135
135
  value: function addObserver(observer) {}
136
136
  }, {
@@ -4,7 +4,7 @@ import { AgoraRteAudioEffectEnhancer } from './effect-enhancer';
4
4
  /**
5
5
  * Interface for a microphone audio track in Agora RTE SDK.
6
6
  */
7
- export interface AgoraRteMicrophoneAudioTrack extends AgoraRteObservableTrack<AgoraRteMicrophoneTrackObserver> {
7
+ export interface AgoraRteMicrophoneTrack extends AgoraRteObservableTrack<AgoraRteMicrophoneTrackObserver> {
8
8
  /**
9
9
  * Gets the device ID of the microphone.
10
10
  */
@@ -39,7 +39,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
39
39
  Object.defineProperty(exports, "__esModule", {
40
40
  value: true
41
41
  });
42
- exports.AgoraRteMicrophoneAudioTrackImpl = exports.AgoraRteMicrophoneAudioDummyTrackImpl = void 0;
42
+ exports.AgoraRteMicrophoneTrackImpl = exports.AgoraRteMicrophoneDummyTrackImpl = void 0;
43
43
  require("core-js/modules/es.error.cause.js");
44
44
  require("core-js/modules/es.error.to-string.js");
45
45
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
@@ -54,7 +54,7 @@ var _baseTrack = require("./base-track");
54
54
  var _effectEnhancer = require("./effect-enhancer");
55
55
  var _imports = require("../../imports");
56
56
  var _logger = require("../utilities/logger");
57
- var _ref, _AgoraRteMicrophoneAudioTrackImpl;
57
+ var _ref, _AgoraRteMicrophoneTrackImpl;
58
58
  var _initProto;
59
59
  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)); }
60
60
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
@@ -67,13 +67,13 @@ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side
67
67
  * Interface for a microphone audio track in Agora RTE SDK.
68
68
  */
69
69
  //@internal
70
- var AgoraRteMicrophoneAudioTrackImpl = exports.AgoraRteMicrophoneAudioTrackImpl = /*#__PURE__*/function (_ref2) {
71
- function AgoraRteMicrophoneAudioTrackImpl(_rtcClient, _deviceId) {
70
+ var AgoraRteMicrophoneTrackImpl = exports.AgoraRteMicrophoneTrackImpl = /*#__PURE__*/function (_ref2) {
71
+ function AgoraRteMicrophoneTrackImpl(_rtcClient, _deviceId) {
72
72
  var _this;
73
- (0, _classCallCheck2["default"])(this, AgoraRteMicrophoneAudioTrackImpl);
74
- _this = _callSuper(this, AgoraRteMicrophoneAudioTrackImpl, [_rtcClient]);
73
+ (0, _classCallCheck2["default"])(this, AgoraRteMicrophoneTrackImpl);
74
+ _this = _callSuper(this, AgoraRteMicrophoneTrackImpl, [_rtcClient]);
75
75
  (0, _defineProperty2["default"])(_this, "logger", (_initProto(_this), (0, _logger.createLogger)({
76
- prefix: 'AgoraRteMicrophoneAudioTrackImpl'
76
+ prefix: 'AgoraRteMicrophoneTrackImpl'
77
77
  })));
78
78
  (0, _defineProperty2["default"])(_this, "_state", _type.AgoraRteMediaSourceState.CLOSE);
79
79
  (0, _defineProperty2["default"])(_this, "_sourceManagerObserver", {
@@ -85,8 +85,8 @@ var AgoraRteMicrophoneAudioTrackImpl = exports.AgoraRteMicrophoneAudioTrackImpl
85
85
  _this._rtcClient.sourceManager.addObserver(_this._sourceManagerObserver);
86
86
  return _this;
87
87
  }
88
- (0, _inherits2["default"])(AgoraRteMicrophoneAudioTrackImpl, _ref2);
89
- return (0, _createClass2["default"])(AgoraRteMicrophoneAudioTrackImpl, [{
88
+ (0, _inherits2["default"])(AgoraRteMicrophoneTrackImpl, _ref2);
89
+ return (0, _createClass2["default"])(AgoraRteMicrophoneTrackImpl, [{
90
90
  key: "release",
91
91
  value: function release() {
92
92
  this._rtcClient.sourceManager.removeObserver(this._sourceManagerObserver);
@@ -158,14 +158,14 @@ var AgoraRteMicrophoneAudioTrackImpl = exports.AgoraRteMicrophoneAudioTrackImpl
158
158
  }
159
159
  }]);
160
160
  }(_ref = _baseTrack.AgoraRteBaseTrack); // @internal
161
- _AgoraRteMicrophoneAudioTrackImpl = AgoraRteMicrophoneAudioTrackImpl;
162
- var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_AgoraRteMicrophoneAudioTrackImpl, [[_imports.trace, 2, "release"], [_imports.trace, 2, "setAudioRawDataConfig"], [_imports.trace, 2, "start"], [_imports.trace, 2, "stop"], [_imports.trace, 2, "startTest"], [_imports.trace, 2, "stopTest"], [_imports.trace, 2, "adjustVolume"], [_imports.bound, 2, "_handleMicrophoneStateUpdated"], [_imports.bound, 2, "_handleLocalMicrophoneVolumeUpdated"]], [], 0, void 0, _ref).e, 1);
161
+ _AgoraRteMicrophoneTrackImpl = AgoraRteMicrophoneTrackImpl;
162
+ var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_AgoraRteMicrophoneTrackImpl, [[_imports.trace, 2, "release"], [_imports.trace, 2, "setAudioRawDataConfig"], [_imports.trace, 2, "start"], [_imports.trace, 2, "stop"], [_imports.trace, 2, "startTest"], [_imports.trace, 2, "stopTest"], [_imports.trace, 2, "adjustVolume"], [_imports.bound, 2, "_handleMicrophoneStateUpdated"], [_imports.bound, 2, "_handleLocalMicrophoneVolumeUpdated"]], [], 0, void 0, _ref).e, 1);
163
163
  _initProto = _applyDecs$e[0];
164
- var AgoraRteMicrophoneAudioDummyTrackImpl = exports.AgoraRteMicrophoneAudioDummyTrackImpl = /*#__PURE__*/function () {
165
- function AgoraRteMicrophoneAudioDummyTrackImpl() {
166
- (0, _classCallCheck2["default"])(this, AgoraRteMicrophoneAudioDummyTrackImpl);
164
+ var AgoraRteMicrophoneDummyTrackImpl = exports.AgoraRteMicrophoneDummyTrackImpl = /*#__PURE__*/function () {
165
+ function AgoraRteMicrophoneDummyTrackImpl() {
166
+ (0, _classCallCheck2["default"])(this, AgoraRteMicrophoneDummyTrackImpl);
167
167
  }
168
- return (0, _createClass2["default"])(AgoraRteMicrophoneAudioDummyTrackImpl, [{
168
+ return (0, _createClass2["default"])(AgoraRteMicrophoneDummyTrackImpl, [{
169
169
  key: "addObserver",
170
170
  value: function addObserver(observer) {}
171
171
  }, {
@@ -3,7 +3,7 @@ import { AgoraRteObservableTrack, AgoraRteScreenCaptureParams, AgoraRteScreenCap
3
3
  /**
4
4
  * Interface for a screen video track in Agora RTE SDK.
5
5
  */
6
- export interface AgoraRteScreenVideoTrack extends AgoraRteObservableTrack<AgoraRteScreenTrackObserver> {
6
+ export interface AgoraRteScreenTrack extends AgoraRteObservableTrack<AgoraRteScreenTrackObserver> {
7
7
  /**
8
8
  * Gets the device ID of the screen.
9
9
  * @returns The device ID of the screen.
@@ -40,7 +40,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
40
40
  Object.defineProperty(exports, "__esModule", {
41
41
  value: true
42
42
  });
43
- exports.AgoraRteScreenVideoTrackImpl = exports.AgoraRteScreenVideoDummyTrackImpl = void 0;
43
+ exports.AgoraRteScreenTrackImpl = exports.AgoraRteScreenDummyTrackImpl = void 0;
44
44
  require("core-js/modules/es.function.bind.js");
45
45
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
46
46
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
@@ -55,7 +55,7 @@ var _baseTrack = require("./base-track");
55
55
  var _type3 = require("./type");
56
56
  var _logger = require("../utilities/logger");
57
57
  var _imports = require("../../imports");
58
- var _ref, _AgoraRteScreenVideoTrackImpl;
58
+ var _ref, _AgoraRteScreenTrackImpl;
59
59
  var _initProto;
60
60
  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)); }
61
61
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
@@ -68,13 +68,13 @@ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side
68
68
  * Interface for a screen video track in Agora RTE SDK.
69
69
  */
70
70
  //@internal
71
- var AgoraRteScreenVideoTrackImpl = exports.AgoraRteScreenVideoTrackImpl = /*#__PURE__*/function (_ref2) {
72
- function AgoraRteScreenVideoTrackImpl(_rtcClient, _sourceId) {
71
+ var AgoraRteScreenTrackImpl = exports.AgoraRteScreenTrackImpl = /*#__PURE__*/function (_ref2) {
72
+ function AgoraRteScreenTrackImpl(_rtcClient, _sourceId) {
73
73
  var _this;
74
- (0, _classCallCheck2["default"])(this, AgoraRteScreenVideoTrackImpl);
75
- _this = _callSuper(this, AgoraRteScreenVideoTrackImpl, [_rtcClient]);
74
+ (0, _classCallCheck2["default"])(this, AgoraRteScreenTrackImpl);
75
+ _this = _callSuper(this, AgoraRteScreenTrackImpl, [_rtcClient]);
76
76
  (0, _defineProperty2["default"])(_this, "logger", (_initProto(_this), (0, _logger.createLogger)({
77
- prefix: 'AgoraRteScreenVideoTrackImpl'
77
+ prefix: 'AgoraRteScreenTrackImpl'
78
78
  })));
79
79
  (0, _defineProperty2["default"])(_this, "_state", _type.AgoraRteMediaSourceState.CLOSE);
80
80
  (0, _defineProperty2["default"])(_this, "_captureType", _type3.AgoraRteScreenCaptureType.SCREEN);
@@ -85,8 +85,8 @@ var AgoraRteScreenVideoTrackImpl = exports.AgoraRteScreenVideoTrackImpl = /*#__P
85
85
  });
86
86
  return _this;
87
87
  }
88
- (0, _inherits2["default"])(AgoraRteScreenVideoTrackImpl, _ref2);
89
- return (0, _createClass2["default"])(AgoraRteScreenVideoTrackImpl, [{
88
+ (0, _inherits2["default"])(AgoraRteScreenTrackImpl, _ref2);
89
+ return (0, _createClass2["default"])(AgoraRteScreenTrackImpl, [{
90
90
  key: "getSourceId",
91
91
  value: function getSourceId() {
92
92
  return this._sourceId;
@@ -152,14 +152,14 @@ var AgoraRteScreenVideoTrackImpl = exports.AgoraRteScreenVideoTrackImpl = /*#__P
152
152
  }
153
153
  }]);
154
154
  }(_ref = _baseTrack.AgoraRteBaseTrack); // @internal
155
- _AgoraRteScreenVideoTrackImpl = AgoraRteScreenVideoTrackImpl;
156
- var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_AgoraRteScreenVideoTrackImpl, [[_imports.trace, 2, "setCaptureParams"], [_imports.trace, 2, "start"], [_imports.trace, 2, "stop"], [_imports.trace, 2, "startPreview"], [_imports.trace, 2, "stopPreview"]], [], 0, void 0, _ref).e, 1);
155
+ _AgoraRteScreenTrackImpl = AgoraRteScreenTrackImpl;
156
+ var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_AgoraRteScreenTrackImpl, [[_imports.trace, 2, "setCaptureParams"], [_imports.trace, 2, "start"], [_imports.trace, 2, "stop"], [_imports.trace, 2, "startPreview"], [_imports.trace, 2, "stopPreview"]], [], 0, void 0, _ref).e, 1);
157
157
  _initProto = _applyDecs$e[0];
158
- var AgoraRteScreenVideoDummyTrackImpl = exports.AgoraRteScreenVideoDummyTrackImpl = /*#__PURE__*/function () {
159
- function AgoraRteScreenVideoDummyTrackImpl() {
160
- (0, _classCallCheck2["default"])(this, AgoraRteScreenVideoDummyTrackImpl);
158
+ var AgoraRteScreenDummyTrackImpl = exports.AgoraRteScreenDummyTrackImpl = /*#__PURE__*/function () {
159
+ function AgoraRteScreenDummyTrackImpl() {
160
+ (0, _classCallCheck2["default"])(this, AgoraRteScreenDummyTrackImpl);
161
161
  }
162
- return (0, _createClass2["default"])(AgoraRteScreenVideoDummyTrackImpl, [{
162
+ return (0, _createClass2["default"])(AgoraRteScreenDummyTrackImpl, [{
163
163
  key: "addObserver",
164
164
  value: function addObserver(observer) {}
165
165
  }, {
@@ -33,6 +33,10 @@ export declare class AgoraRteSynchronizerManager {
33
33
  private fallbackToMainThread;
34
34
  private handleWorkerMessage;
35
35
  private handleWorkerError;
36
+ /**
37
+ * 清理worker资源
38
+ */
39
+ private cleanupWorker;
36
40
  private handleTaskReady;
37
41
  private handleSequenceGapDetected;
38
42
  private handleWorkerErrorMessage;