agora-rte-sdk 3.10.2 → 3.11.0-rc.2
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.
- package/lib/core/engine/index.js +8 -1
- package/lib/core/media/index.js +180 -6
- package/lib/core/media/screen.js +1 -1
- package/lib/core/media/type.d.ts +82 -0
- package/lib/core/media/type.js +4 -0
- package/lib/core/rtc/canvas.d.ts +5 -3
- package/lib/core/rtc/canvas.js +4 -2
- package/lib/core/rtc/client.d.ts +11 -3
- package/lib/core/rtc/client.js +24 -0
- package/lib/core/rtc/publish-pool.d.ts +1 -0
- package/lib/core/rtc/publish-pool.js +7 -0
- package/lib/core/rtc/source-manager.d.ts +29 -4
- package/lib/core/rtc/type.d.ts +53 -0
- package/lib/core/rtc/type.js +35 -1
- package/lib/core/rtm/client.d.ts +1 -2
- package/lib/core/scene/index.js +4 -3
- package/lib/core/scene/type.d.ts +10 -0
- package/lib/core/scene/type.js +8 -4
- package/lib/index.d.ts +3 -1
- package/lib/index.js +21 -8
- package/lib/plugin/rtc/electron/canvas-tag-pool.d.ts +3 -3
- package/lib/plugin/rtc/electron/canvas-tag-pool.js +23 -10
- package/lib/plugin/rtc/electron/capture-enhancement.d.ts +1 -1
- package/lib/plugin/rtc/electron/channel.d.ts +4 -3
- package/lib/plugin/rtc/electron/channel.js +41 -10
- package/lib/plugin/rtc/electron/client.d.ts +2 -2
- package/lib/plugin/rtc/electron/client.js +2 -2
- package/lib/plugin/rtc/electron/constants.d.ts +141 -1
- package/lib/plugin/rtc/electron/constants.js +88 -1
- package/lib/plugin/rtc/electron/convert-type.d.ts +1 -1
- package/lib/plugin/rtc/electron/index.d.ts +2 -0
- package/lib/plugin/rtc/electron/index.js +7 -0
- package/lib/plugin/rtc/electron/media-recorder/media-recorder-manager.d.ts +94 -0
- package/lib/plugin/rtc/electron/media-recorder/media-recorder-manager.js +731 -0
- package/lib/plugin/rtc/electron/publish-pool.d.ts +4 -2
- package/lib/plugin/rtc/electron/publish-pool.js +9 -1
- package/lib/plugin/rtc/electron/publisher.d.ts +3 -3
- package/lib/plugin/rtc/electron/publisher.js +14 -8
- package/lib/plugin/rtc/electron/source-manager.d.ts +15 -3
- package/lib/plugin/rtc/electron/source-manager.js +132 -26
- package/lib/plugin/rtc/electron/source-state-control/source-state-control.d.ts +6 -0
- package/lib/plugin/rtc/electron/source-state-control/source-state-control.js +5 -0
- package/lib/plugin/rtc/electron/subscriber.d.ts +1 -1
- package/lib/plugin/rtc/electron/type.d.ts +1 -1
- package/lib/plugin/rtc/electron/utils.d.ts +3 -3
- package/lib/plugin/rtc/electron/utils.js +14 -11
- package/lib/plugin/rtc/web/source-manager.d.ts +7 -2
- package/lib/plugin/rtc/web/source-manager.js +25 -1
- package/lib/plugin/rtm/client.d.ts +2 -3
- package/lib/plugin/rtm/client.js +14 -12
- package/lib/plugin/rtm/index.js +1 -1
- package/lib-es/core/engine/index.js +8 -1
- package/lib-es/core/media/index.js +175 -1
- package/lib-es/core/media/screen.js +1 -1
- package/lib-es/core/media/type.js +5 -0
- package/lib-es/core/rtc/canvas.js +4 -2
- package/lib-es/core/rtc/client.js +24 -1
- package/lib-es/core/rtc/publish-pool.js +7 -0
- package/lib-es/core/rtc/type.js +39 -0
- package/lib-es/core/scene/index.js +5 -4
- package/lib-es/core/scene/type.js +5 -0
- package/lib-es/index.js +1 -0
- package/lib-es/plugin/rtc/electron/canvas-tag-pool.js +23 -10
- package/lib-es/plugin/rtc/electron/channel.js +39 -8
- package/lib-es/plugin/rtc/electron/client.js +2 -2
- package/lib-es/plugin/rtc/electron/constants.js +87 -0
- package/lib-es/plugin/rtc/electron/index.js +1 -0
- package/lib-es/plugin/rtc/electron/media-recorder/media-recorder-manager.js +725 -0
- package/lib-es/plugin/rtc/electron/publish-pool.js +10 -2
- package/lib-es/plugin/rtc/electron/publisher.js +14 -8
- package/lib-es/plugin/rtc/electron/source-manager.js +132 -26
- package/lib-es/plugin/rtc/electron/source-state-control/source-state-control.js +5 -0
- package/lib-es/plugin/rtc/electron/utils.js +15 -12
- package/lib-es/plugin/rtc/web/source-manager.js +25 -1
- package/lib-es/plugin/rtm/client.js +14 -12
- package/lib-es/plugin/rtm/index.js +1 -1
- package/package.json +7 -5
package/lib/core/engine/index.js
CHANGED
|
@@ -123,6 +123,12 @@ var AgoraRteEngineImpl = exports.AgoraRteEngineImpl = /*#__PURE__*/function () {
|
|
|
123
123
|
this._mediaControl.addObserver(this._mediaControlObserver);
|
|
124
124
|
if (this._rtcClient) {
|
|
125
125
|
this._mediaControl.setRtcClient(this._rtcClient);
|
|
126
|
+
|
|
127
|
+
// Set client recording manager if available (Electron platform)
|
|
128
|
+
var clientRecordingManager = this._rtcClient.getMediaRecorderManager();
|
|
129
|
+
if (clientRecordingManager) {
|
|
130
|
+
this._mediaControl.setClientRecordingManager(clientRecordingManager);
|
|
131
|
+
}
|
|
126
132
|
}
|
|
127
133
|
if (this._rtmClient) {
|
|
128
134
|
this._rtmClient.addObserver(this._rtmClientObserver);
|
|
@@ -172,7 +178,7 @@ var AgoraRteEngineImpl = exports.AgoraRteEngineImpl = /*#__PURE__*/function () {
|
|
|
172
178
|
while (1) switch (_context.prev = _context.next) {
|
|
173
179
|
case 0:
|
|
174
180
|
_context.next = 1;
|
|
175
|
-
return this.rtmClient.login(this._config.userToken
|
|
181
|
+
return this.rtmClient.login(this._config.userToken);
|
|
176
182
|
case 1:
|
|
177
183
|
case "end":
|
|
178
184
|
return _context.stop();
|
|
@@ -295,6 +301,7 @@ var AgoraRteEngineImpl = exports.AgoraRteEngineImpl = /*#__PURE__*/function () {
|
|
|
295
301
|
}, {
|
|
296
302
|
key: "renewUserToken",
|
|
297
303
|
value: function renewUserToken(token) {
|
|
304
|
+
this._config.userToken = token;
|
|
298
305
|
this._httpAuthHeadersProvider.putHeaders((0, _defineProperty2["default"])({}, _constants.HTTP_HEADER_K_AUTHORIZATION, (0, _authHeaders.getAuthorization)(token)));
|
|
299
306
|
return this.rtmClient.renewToken(token);
|
|
300
307
|
}
|
package/lib/core/media/index.js
CHANGED
|
@@ -20,8 +20,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
20
20
|
value: true
|
|
21
21
|
});
|
|
22
22
|
exports.AgoraRteMediaControlImpl = void 0;
|
|
23
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
23
24
|
require("core-js/modules/es.error.cause.js");
|
|
24
25
|
require("core-js/modules/es.error.to-string.js");
|
|
26
|
+
require("core-js/modules/es.array.concat.js");
|
|
25
27
|
require("core-js/modules/es.array.for-each.js");
|
|
26
28
|
require("core-js/modules/es.array.iterator.js");
|
|
27
29
|
require("core-js/modules/es.map.js");
|
|
@@ -47,12 +49,14 @@ require("core-js/modules/esnext.map.update.js");
|
|
|
47
49
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
48
50
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
49
51
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
52
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
50
53
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
51
54
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
52
55
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
53
56
|
var _constant = require("../../constant");
|
|
54
57
|
var _imports = require("../../imports");
|
|
55
|
-
var _type = require("
|
|
58
|
+
var _type = require("../../type");
|
|
59
|
+
var _type2 = require("../rtc/type");
|
|
56
60
|
var _logger = require("../utilities/logger");
|
|
57
61
|
var _camera = require("./camera");
|
|
58
62
|
var _loopback = require("./loopback");
|
|
@@ -80,24 +84,31 @@ var AgoraRteMediaControlImpl = exports.AgoraRteMediaControlImpl = /*#__PURE__*/f
|
|
|
80
84
|
(0, _defineProperty2["default"])(this, "_microphoneAudioTracksMap", new Map());
|
|
81
85
|
(0, _defineProperty2["default"])(this, "_screenShareTracksMap", new Map());
|
|
82
86
|
(0, _defineProperty2["default"])(this, "_loopbackAudioTracksMap", new Map());
|
|
87
|
+
// Screen share state
|
|
88
|
+
(0, _defineProperty2["default"])(this, "_isScreenShareActive", false);
|
|
83
89
|
(0, _defineProperty2["default"])(this, "_cameraTrackObserver", {
|
|
84
90
|
onCameraStateUpdated: function onCameraStateUpdated(deviceId, state) {
|
|
85
|
-
_this._observable.notifyObservers('onTrackVideoStateUpdated', deviceId,
|
|
91
|
+
_this._observable.notifyObservers('onTrackVideoStateUpdated', deviceId, _type2.AgoraRtcVideoSourceType.CAMERA, state);
|
|
86
92
|
}
|
|
87
93
|
});
|
|
88
94
|
(0, _defineProperty2["default"])(this, "_microphoneTrackObserver", {
|
|
89
95
|
onMicrophoneStateUpdated: function onMicrophoneStateUpdated(deviceId, state) {
|
|
90
|
-
_this._observable.notifyObservers('onTrackAudioStateUpdated', deviceId,
|
|
96
|
+
_this._observable.notifyObservers('onTrackAudioStateUpdated', deviceId, _type2.AgoraRtcAudioSourceType.MICROPHONE, state);
|
|
91
97
|
}
|
|
92
98
|
});
|
|
93
99
|
(0, _defineProperty2["default"])(this, "_screenTrackObserver", {
|
|
94
100
|
onScreenCaptureStateUpdated: function onScreenCaptureStateUpdated(deviceId, state) {
|
|
95
|
-
|
|
101
|
+
if (state === _type.AgoraRteMediaSourceState.OPEN) {
|
|
102
|
+
_this.setScreenShareState(true, deviceId);
|
|
103
|
+
} else if ((state === _type.AgoraRteMediaSourceState.CLOSE || state === _type.AgoraRteMediaSourceState.ERROR) && _this._currentScreenShareSourceId === deviceId) {
|
|
104
|
+
_this.setScreenShareState(false);
|
|
105
|
+
}
|
|
106
|
+
_this._observable.notifyObservers('onTrackVideoStateUpdated', deviceId, _type2.AgoraRtcVideoSourceType.SCREEN, state);
|
|
96
107
|
}
|
|
97
108
|
});
|
|
98
109
|
(0, _defineProperty2["default"])(this, "_loopbackTrackObserver", {
|
|
99
110
|
onLoopbackRecordingStateUpdated: function onLoopbackRecordingStateUpdated(deviceId, state) {
|
|
100
|
-
_this._observable.notifyObservers('onTrackAudioStateUpdated', deviceId,
|
|
111
|
+
_this._observable.notifyObservers('onTrackAudioStateUpdated', deviceId, _type2.AgoraRtcAudioSourceType.LOOPBACK, state);
|
|
101
112
|
}
|
|
102
113
|
});
|
|
103
114
|
(0, _defineProperty2["default"])(this, "_sourceManagerObserver", {
|
|
@@ -342,15 +353,178 @@ var AgoraRteMediaControlImpl = exports.AgoraRteMediaControlImpl = /*#__PURE__*/f
|
|
|
342
353
|
}, {
|
|
343
354
|
key: "release",
|
|
344
355
|
value: function release() {
|
|
356
|
+
var _this$_clientRecordin;
|
|
345
357
|
this.rtcClient.sourceManager.removeObserver(this._sourceManagerObserver);
|
|
346
358
|
this.rtcClient.removeObserver(this._rtcClientObserver);
|
|
359
|
+
(_this$_clientRecordin = this._clientRecordingManager) === null || _this$_clientRecordin === void 0 || _this$_clientRecordin.release();
|
|
360
|
+
this._clientRecordingManager = undefined;
|
|
347
361
|
this._rtcClient = null;
|
|
348
362
|
return _constant.AgoraRteReturnCode.SUCCESS;
|
|
349
363
|
}
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Set the client recording manager for handling client-side recording.
|
|
367
|
+
* This is called by platform-specific implementations (e.g., Electron).
|
|
368
|
+
*/
|
|
369
|
+
}, {
|
|
370
|
+
key: "setClientRecordingManager",
|
|
371
|
+
value: function setClientRecordingManager(manager) {
|
|
372
|
+
this._clientRecordingManager = manager;
|
|
373
|
+
}
|
|
374
|
+
}, {
|
|
375
|
+
key: "startClientRecording",
|
|
376
|
+
value: function () {
|
|
377
|
+
var _startClientRecording = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(channelId, uid, config, isScreenShareActive, currentScreenShareSourceId) {
|
|
378
|
+
return _regenerator["default"].wrap(function (_context) {
|
|
379
|
+
while (1) switch (_context.prev = _context.next) {
|
|
380
|
+
case 0:
|
|
381
|
+
if (this._clientRecordingManager) {
|
|
382
|
+
_context.next = 1;
|
|
383
|
+
break;
|
|
384
|
+
}
|
|
385
|
+
this.logger.warn('startClientRecording: client recording manager is not available. ' + 'This feature is only supported on Electron platform.');
|
|
386
|
+
return _context.abrupt("return");
|
|
387
|
+
case 1:
|
|
388
|
+
_context.next = 2;
|
|
389
|
+
return this._clientRecordingManager.startClientRecording(channelId, uid, config, isScreenShareActive, currentScreenShareSourceId);
|
|
390
|
+
case 2:
|
|
391
|
+
case "end":
|
|
392
|
+
return _context.stop();
|
|
393
|
+
}
|
|
394
|
+
}, _callee, this);
|
|
395
|
+
}));
|
|
396
|
+
function startClientRecording(_x, _x2, _x3, _x4, _x5) {
|
|
397
|
+
return _startClientRecording.apply(this, arguments);
|
|
398
|
+
}
|
|
399
|
+
return startClientRecording;
|
|
400
|
+
}()
|
|
401
|
+
}, {
|
|
402
|
+
key: "stopClientRecording",
|
|
403
|
+
value: function () {
|
|
404
|
+
var _stopClientRecording = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
405
|
+
return _regenerator["default"].wrap(function (_context2) {
|
|
406
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
407
|
+
case 0:
|
|
408
|
+
if (this._clientRecordingManager) {
|
|
409
|
+
_context2.next = 1;
|
|
410
|
+
break;
|
|
411
|
+
}
|
|
412
|
+
this.logger.warn('stopClientRecording: client recording manager is not available');
|
|
413
|
+
return _context2.abrupt("return");
|
|
414
|
+
case 1:
|
|
415
|
+
_context2.next = 2;
|
|
416
|
+
return this._clientRecordingManager.stopClientRecording();
|
|
417
|
+
case 2:
|
|
418
|
+
case "end":
|
|
419
|
+
return _context2.stop();
|
|
420
|
+
}
|
|
421
|
+
}, _callee2, this);
|
|
422
|
+
}));
|
|
423
|
+
function stopClientRecording() {
|
|
424
|
+
return _stopClientRecording.apply(this, arguments);
|
|
425
|
+
}
|
|
426
|
+
return stopClientRecording;
|
|
427
|
+
}()
|
|
428
|
+
}, {
|
|
429
|
+
key: "resumeClientRecordingOwnCapture",
|
|
430
|
+
value: function () {
|
|
431
|
+
var _resumeClientRecordingOwnCapture = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
|
432
|
+
return _regenerator["default"].wrap(function (_context3) {
|
|
433
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
434
|
+
case 0:
|
|
435
|
+
if (this._clientRecordingManager) {
|
|
436
|
+
_context3.next = 1;
|
|
437
|
+
break;
|
|
438
|
+
}
|
|
439
|
+
this.logger.warn('resumeClientRecordingOwnCapture: client recording manager is not available');
|
|
440
|
+
return _context3.abrupt("return");
|
|
441
|
+
case 1:
|
|
442
|
+
_context3.next = 2;
|
|
443
|
+
return this._clientRecordingManager.resumeOwnCapture();
|
|
444
|
+
case 2:
|
|
445
|
+
case "end":
|
|
446
|
+
return _context3.stop();
|
|
447
|
+
}
|
|
448
|
+
}, _callee3, this);
|
|
449
|
+
}));
|
|
450
|
+
function resumeClientRecordingOwnCapture() {
|
|
451
|
+
return _resumeClientRecordingOwnCapture.apply(this, arguments);
|
|
452
|
+
}
|
|
453
|
+
return resumeClientRecordingOwnCapture;
|
|
454
|
+
}()
|
|
455
|
+
}, {
|
|
456
|
+
key: "releaseClientRecordingOwnCapture",
|
|
457
|
+
value: function releaseClientRecordingOwnCapture() {
|
|
458
|
+
if (!this._clientRecordingManager) {
|
|
459
|
+
this.logger.warn('releaseClientRecordingOwnCapture: client recording manager is not available');
|
|
460
|
+
return;
|
|
461
|
+
}
|
|
462
|
+
this._clientRecordingManager.releaseOwnCapture();
|
|
463
|
+
}
|
|
464
|
+
}, {
|
|
465
|
+
key: "isClientRecordingActive",
|
|
466
|
+
value: function isClientRecordingActive() {
|
|
467
|
+
var _this$_clientRecordin2, _this$_clientRecordin3;
|
|
468
|
+
return (_this$_clientRecordin2 = (_this$_clientRecordin3 = this._clientRecordingManager) === null || _this$_clientRecordin3 === void 0 ? void 0 : _this$_clientRecordin3.isLocalClientRecordingActive()) !== null && _this$_clientRecordin2 !== void 0 ? _this$_clientRecordin2 : false;
|
|
469
|
+
}
|
|
470
|
+
}, {
|
|
471
|
+
key: "isClientRecordingOwnsCapture",
|
|
472
|
+
value: function isClientRecordingOwnsCapture() {
|
|
473
|
+
var _this$_clientRecordin4, _this$_clientRecordin5;
|
|
474
|
+
return (_this$_clientRecordin4 = (_this$_clientRecordin5 = this._clientRecordingManager) === null || _this$_clientRecordin5 === void 0 ? void 0 : _this$_clientRecordin5.isClientRecordingOwnsCapture()) !== null && _this$_clientRecordin4 !== void 0 ? _this$_clientRecordin4 : false;
|
|
475
|
+
}
|
|
476
|
+
}, {
|
|
477
|
+
key: "addClientRecordingObserver",
|
|
478
|
+
value: function addClientRecordingObserver(observer) {
|
|
479
|
+
var _this$_clientRecordin6;
|
|
480
|
+
(_this$_clientRecordin6 = this._clientRecordingManager) === null || _this$_clientRecordin6 === void 0 || _this$_clientRecordin6.addObserver(observer);
|
|
481
|
+
}
|
|
482
|
+
}, {
|
|
483
|
+
key: "removeClientRecordingObserver",
|
|
484
|
+
value: function removeClientRecordingObserver(observer) {
|
|
485
|
+
var _this$_clientRecordin7;
|
|
486
|
+
(_this$_clientRecordin7 = this._clientRecordingManager) === null || _this$_clientRecordin7 === void 0 || _this$_clientRecordin7.removeObserver(observer);
|
|
487
|
+
}
|
|
488
|
+
}, {
|
|
489
|
+
key: "isScreenShareActive",
|
|
490
|
+
value: function isScreenShareActive() {
|
|
491
|
+
return this._isScreenShareActive;
|
|
492
|
+
}
|
|
493
|
+
}, {
|
|
494
|
+
key: "getCurrentScreenShareSourceId",
|
|
495
|
+
value: function getCurrentScreenShareSourceId() {
|
|
496
|
+
return this._currentScreenShareSourceId;
|
|
497
|
+
}
|
|
498
|
+
}, {
|
|
499
|
+
key: "setScreenShareState",
|
|
500
|
+
value: function setScreenShareState(active, sourceId) {
|
|
501
|
+
this._isScreenShareActive = active;
|
|
502
|
+
this._currentScreenShareSourceId = active ? sourceId : undefined;
|
|
503
|
+
this.logger.info("Screen share state updated: active=".concat(active, ", sourceId=").concat(sourceId));
|
|
504
|
+
}
|
|
505
|
+
}, {
|
|
506
|
+
key: "waitForScreenCaptureStopped",
|
|
507
|
+
value: function () {
|
|
508
|
+
var _waitForScreenCaptureStopped = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
|
509
|
+
return _regenerator["default"].wrap(function (_context4) {
|
|
510
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
511
|
+
case 0:
|
|
512
|
+
return _context4.abrupt("return", this.rtcClient.sourceManager.waitForScreenCaptureStopped());
|
|
513
|
+
case 1:
|
|
514
|
+
case "end":
|
|
515
|
+
return _context4.stop();
|
|
516
|
+
}
|
|
517
|
+
}, _callee4, this);
|
|
518
|
+
}));
|
|
519
|
+
function waitForScreenCaptureStopped() {
|
|
520
|
+
return _waitForScreenCaptureStopped.apply(this, arguments);
|
|
521
|
+
}
|
|
522
|
+
return waitForScreenCaptureStopped;
|
|
523
|
+
}()
|
|
350
524
|
}]);
|
|
351
525
|
}();
|
|
352
526
|
_AgoraRteMediaControlImpl = AgoraRteMediaControlImpl;
|
|
353
|
-
var _applyDecs$e = _applyDecs(_AgoraRteMediaControlImpl, [[_observeSystemSelectedSpeakerChangedDecs, 2, "observeSystemSelectedSpeakerChanged"], [_observeSystemSelectedMicrophoneChangedDecs, 2, "observeSystemSelectedMicrophoneChanged"], [_imports.trace, 2, "disableAGC"], [_imports.trace, 2, "enableAGC"], [_setSelectedSpeakerDecs, 2, "setSelectedSpeaker"], [_setSelectedSpeakerVolumeDecs, 2, "setSelectedSpeakerVolume"], [_setEnableSpeakerDecs, 2, "setEnableSpeaker"], [_startSpeakerTestDecs, 2, "startSpeakerTest"], [_imports.trace, 2, "stopSpeakerTest"], [_adjustAudioOutputVolumeDecs, 2, "adjustAudioOutputVolume"], [_imports.trace, 2, "release"]], []).e;
|
|
527
|
+
var _applyDecs$e = _applyDecs(_AgoraRteMediaControlImpl, [[_observeSystemSelectedSpeakerChangedDecs, 2, "observeSystemSelectedSpeakerChanged"], [_observeSystemSelectedMicrophoneChangedDecs, 2, "observeSystemSelectedMicrophoneChanged"], [_imports.trace, 2, "disableAGC"], [_imports.trace, 2, "enableAGC"], [_setSelectedSpeakerDecs, 2, "setSelectedSpeaker"], [_setSelectedSpeakerVolumeDecs, 2, "setSelectedSpeakerVolume"], [_setEnableSpeakerDecs, 2, "setEnableSpeaker"], [_startSpeakerTestDecs, 2, "startSpeakerTest"], [_imports.trace, 2, "stopSpeakerTest"], [_adjustAudioOutputVolumeDecs, 2, "adjustAudioOutputVolume"], [_imports.trace, 2, "release"], [_imports.trace, 2, "startClientRecording"], [_imports.trace, 2, "stopClientRecording"], [_imports.trace, 2, "resumeClientRecordingOwnCapture"]], []).e;
|
|
354
528
|
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e, 1);
|
|
355
529
|
_initProto = _applyDecs$e2[0];
|
|
356
530
|
_applyDecs$e;
|
package/lib/core/media/screen.js
CHANGED
|
@@ -124,7 +124,7 @@ var AgoraRteScreenTrackImpl = exports.AgoraRteScreenTrackImpl = /*#__PURE__*/fun
|
|
|
124
124
|
if (this._params) {
|
|
125
125
|
return this._rtcClient.sourceManager.startScreenCaptureByWindowIdWithParams(this._sourceId, this._params);
|
|
126
126
|
} else {
|
|
127
|
-
return this._rtcClient.sourceManager.startScreenCaptureByWindowId(this._sourceId);
|
|
127
|
+
return this._rtcClient.sourceManager.startScreenCaptureByWindowId(this._sourceId, true);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
}
|
package/lib/core/media/type.d.ts
CHANGED
|
@@ -4,6 +4,29 @@ import { AgoraRteCameraTrack } from './camera';
|
|
|
4
4
|
import { AgoraRteLoopbackTrack } from './loopback';
|
|
5
5
|
import { AgoraRteMicrophoneTrack } from './microphone';
|
|
6
6
|
import { AgoraRteScreenTrack } from './screen';
|
|
7
|
+
import { AgoraRteClientRecordingConfig, AgoraRteClientRecordingObserver } from '../scene/type';
|
|
8
|
+
/**
|
|
9
|
+
* Client recording manager interface.
|
|
10
|
+
* Platform-specific implementations (Electron/Web) should implement this interface.
|
|
11
|
+
*/
|
|
12
|
+
export interface AgoraRteClientRecordingManager {
|
|
13
|
+
addObserver(observer: AgoraRteClientRecordingObserver): void;
|
|
14
|
+
removeObserver(observer: AgoraRteClientRecordingObserver): void;
|
|
15
|
+
isLocalClientRecordingActive(): boolean;
|
|
16
|
+
isClientRecordingOwnsCapture(): boolean;
|
|
17
|
+
startClientRecording(channelId: string, uid: number, config?: AgoraRteClientRecordingConfig, isScreenShareActive?: boolean, currentScreenShareSourceId?: string): Promise<void>;
|
|
18
|
+
stopClientRecording(): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Resume recording's own window capture after it was released.
|
|
21
|
+
*/
|
|
22
|
+
resumeOwnCapture(): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Release the recording's own screen/window capture without stopping the recording.
|
|
25
|
+
* Called before starting screen share to free the capture resource.
|
|
26
|
+
*/
|
|
27
|
+
releaseOwnCapture(): void;
|
|
28
|
+
release(): void;
|
|
29
|
+
}
|
|
7
30
|
/**
|
|
8
31
|
* 音频的输出位置
|
|
9
32
|
*/
|
|
@@ -226,6 +249,65 @@ export interface AgoraRteMediaControl {
|
|
|
226
249
|
* Releases the resources used by the media control.
|
|
227
250
|
*/
|
|
228
251
|
release(): number;
|
|
252
|
+
/**
|
|
253
|
+
* Start client recording.
|
|
254
|
+
* @param channelId The channel ID for recording.
|
|
255
|
+
* @param uid The user ID for recording.
|
|
256
|
+
* @param config Recording configuration including storage path, etc.
|
|
257
|
+
* @param isScreenShareActive Whether screen sharing is currently active.
|
|
258
|
+
* @param currentScreenShareSourceId Current screen share source ID if active.
|
|
259
|
+
* @returns A promise that resolves when recording starts successfully.
|
|
260
|
+
*/
|
|
261
|
+
startClientRecording(channelId: string, uid: number, config?: AgoraRteClientRecordingConfig, isScreenShareActive?: boolean, currentScreenShareSourceId?: string): Promise<void>;
|
|
262
|
+
/**
|
|
263
|
+
* Stop client recording.
|
|
264
|
+
* @returns A promise that resolves when recording stops successfully.
|
|
265
|
+
*/
|
|
266
|
+
stopClientRecording(): Promise<void>;
|
|
267
|
+
/**
|
|
268
|
+
* Resume recording's own window capture.
|
|
269
|
+
*/
|
|
270
|
+
resumeClientRecordingOwnCapture(): Promise<void>;
|
|
271
|
+
/**
|
|
272
|
+
* Release the recording's own screen/window capture without stopping the recording.
|
|
273
|
+
* Called before starting screen share to free the capture resource.
|
|
274
|
+
*/
|
|
275
|
+
releaseClientRecordingOwnCapture(): void;
|
|
276
|
+
/**
|
|
277
|
+
* Check whether client recording is currently active.
|
|
278
|
+
* @returns Whether client recording is active.
|
|
279
|
+
*/
|
|
280
|
+
isClientRecordingActive(): boolean;
|
|
281
|
+
/**
|
|
282
|
+
* Check whether client recording owns its own screen capture.
|
|
283
|
+
* @returns Whether client recording owns its own capture.
|
|
284
|
+
*/
|
|
285
|
+
isClientRecordingOwnsCapture(): boolean;
|
|
286
|
+
/**
|
|
287
|
+
* Add an observer for client recording events.
|
|
288
|
+
* @param observer The observer to add.
|
|
289
|
+
*/
|
|
290
|
+
addClientRecordingObserver(observer: AgoraRteClientRecordingObserver): void;
|
|
291
|
+
/**
|
|
292
|
+
* Remove an observer for client recording events.
|
|
293
|
+
* @param observer The observer to remove.
|
|
294
|
+
*/
|
|
295
|
+
removeClientRecordingObserver(observer: AgoraRteClientRecordingObserver): void;
|
|
296
|
+
/**
|
|
297
|
+
* Check if screen sharing is currently active.
|
|
298
|
+
* @returns Whether screen sharing is active.
|
|
299
|
+
*/
|
|
300
|
+
isScreenShareActive(): boolean;
|
|
301
|
+
/**
|
|
302
|
+
* Get the current screen share source ID if screen sharing is active.
|
|
303
|
+
* @returns The screen share source ID, or undefined if not sharing.
|
|
304
|
+
*/
|
|
305
|
+
getCurrentScreenShareSourceId(): string | undefined;
|
|
306
|
+
/**
|
|
307
|
+
* Wait for the SDK's onLocalVideoStateChanged(VideoSourceScreenPrimary, Stopped) callback.
|
|
308
|
+
* Used to ensure the SDK has fully processed a screen capture stop before starting a new one.
|
|
309
|
+
*/
|
|
310
|
+
waitForScreenCaptureStopped(): Promise<void>;
|
|
229
311
|
}
|
|
230
312
|
export type AgoraRteObservableTrack<T> = {
|
|
231
313
|
addObserver(observer: T): void;
|
package/lib/core/media/type.js
CHANGED
|
@@ -37,6 +37,10 @@ Object.defineProperty(exports, "AgoraRteVideoRenderMode", {
|
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
var _type = require("../rtc/type");
|
|
40
|
+
/**
|
|
41
|
+
* Client recording manager interface.
|
|
42
|
+
* Platform-specific implementations (Electron/Web) should implement this interface.
|
|
43
|
+
*/
|
|
40
44
|
/**
|
|
41
45
|
* 音频的输出位置
|
|
42
46
|
*/
|
package/lib/core/rtc/canvas.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Logger } from '../../imports';
|
|
2
2
|
import { AgoraRteRenderView } from '../../type';
|
|
3
|
-
import { AgoraRtcConnection, AgoraRtcRenderMode, AgoraRtcRenderResultType, AgoraRtcRenderSourceType } from './type';
|
|
3
|
+
import { AgoraRtcConnection, AgoraRtcMediaSourceIndex, AgoraRtcRenderMode, AgoraRtcRenderResultType, AgoraRtcRenderSourceType } from './type';
|
|
4
4
|
export declare abstract class AgoraRtcCanvasHelper {
|
|
5
5
|
protected logger: Logger;
|
|
6
6
|
canvasMap: Map<AgoraRteRenderView, string>;
|
|
@@ -15,7 +15,8 @@ export declare class AgoraRtcCanvasTag {
|
|
|
15
15
|
sourceId: string;
|
|
16
16
|
connection?: AgoraRtcConnection;
|
|
17
17
|
isLocal: boolean;
|
|
18
|
-
|
|
18
|
+
localCameraSourceIndex?: AgoraRtcMediaSourceIndex;
|
|
19
|
+
constructor(canvas: AgoraRtcVideoCanvas, sourceId: string, isLocal: boolean, connection?: AgoraRtcConnection, localCameraSourceIndex?: AgoraRtcMediaSourceIndex);
|
|
19
20
|
normalize(): {
|
|
20
21
|
canvas: {
|
|
21
22
|
view: unknown;
|
|
@@ -25,6 +26,7 @@ export declare class AgoraRtcCanvasTag {
|
|
|
25
26
|
sourceId: string;
|
|
26
27
|
connection: string | undefined;
|
|
27
28
|
isLocal: boolean;
|
|
29
|
+
localCameraSourceIndex: AgoraRtcMediaSourceIndex | undefined;
|
|
28
30
|
};
|
|
29
31
|
}
|
|
30
32
|
export declare class AgoraRtcVideoCanvas {
|
|
@@ -47,7 +49,7 @@ export declare class AgoraRtcVideoCanvas {
|
|
|
47
49
|
export declare abstract class AgoraRtcCanvasTagPool {
|
|
48
50
|
protected logger: Logger;
|
|
49
51
|
abstract getTagWithCanvasId(canvasAddress: AgoraRteRenderView): AgoraRtcCanvasTag | undefined;
|
|
50
|
-
abstract addTagWithCanvasId(canvasAddress: AgoraRteRenderView, sourceId: string, canvas: AgoraRtcVideoCanvas, isLocal: boolean, connection?: AgoraRtcConnection): void;
|
|
52
|
+
abstract addTagWithCanvasId(canvasAddress: AgoraRteRenderView, sourceId: string, canvas: AgoraRtcVideoCanvas, isLocal: boolean, connection?: AgoraRtcConnection, localCameraSourceIndex?: AgoraRtcMediaSourceIndex): void;
|
|
51
53
|
abstract ifNeedStopRenderCanvas(canvasAddress: AgoraRteRenderView): void;
|
|
52
54
|
abstract ifNeedStopLocalRenderCanvas(canvasAddress: AgoraRteRenderView): void;
|
|
53
55
|
abstract stopRenderOnAllCanvasWithSourceId(sourceId: string): void;
|
package/lib/core/rtc/canvas.js
CHANGED
|
@@ -43,13 +43,14 @@ var AgoraRtcCanvasHelper = exports.AgoraRtcCanvasHelper = /*#__PURE__*/(0, _crea
|
|
|
43
43
|
(0, _defineProperty2["default"])(this, "canvasMap", new Map());
|
|
44
44
|
});
|
|
45
45
|
var AgoraRtcCanvasTag = exports.AgoraRtcCanvasTag = /*#__PURE__*/function () {
|
|
46
|
-
function AgoraRtcCanvasTag(canvas, sourceId, isLocal, connection) {
|
|
46
|
+
function AgoraRtcCanvasTag(canvas, sourceId, isLocal, connection, localCameraSourceIndex) {
|
|
47
47
|
(0, _classCallCheck2["default"])(this, AgoraRtcCanvasTag);
|
|
48
48
|
(0, _defineProperty2["default"])(this, "__json_serializable__", true);
|
|
49
49
|
this.canvas = canvas;
|
|
50
50
|
this.sourceId = sourceId;
|
|
51
51
|
this.connection = connection;
|
|
52
52
|
this.isLocal = isLocal;
|
|
53
|
+
this.localCameraSourceIndex = localCameraSourceIndex;
|
|
53
54
|
}
|
|
54
55
|
return (0, _createClass2["default"])(AgoraRtcCanvasTag, [{
|
|
55
56
|
key: "normalize",
|
|
@@ -58,7 +59,8 @@ var AgoraRtcCanvasTag = exports.AgoraRtcCanvasTag = /*#__PURE__*/function () {
|
|
|
58
59
|
canvas: this.canvas.normalize(),
|
|
59
60
|
sourceId: this.sourceId,
|
|
60
61
|
connection: this.connection ? this.connection.toString() : undefined,
|
|
61
|
-
isLocal: this.isLocal
|
|
62
|
+
isLocal: this.isLocal,
|
|
63
|
+
localCameraSourceIndex: this.localCameraSourceIndex
|
|
62
64
|
};
|
|
63
65
|
}
|
|
64
66
|
}]);
|
package/lib/core/rtc/client.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { AgoraRteRenderView } from '../../imports';
|
|
2
2
|
import { AgoraRtcChannelClient } from './channel';
|
|
3
|
-
import { AgoraRtcDeviceInfo, AgoraRtcLatencyLevelType, AgoraRtcClientObserver, AgoraRtcRenderMode, AgoraRtcCapability, AgoraRtcAudioOutputRouting, AgoraRtcScreenCaptureType } from './type';
|
|
3
|
+
import { AgoraRtcChannelType, AgoraRtcDeviceInfo, AgoraRtcLatencyLevelType, AgoraRtcClientObserver, AgoraRtcRenderMode, AgoraRtcCapability, AgoraRtcAudioOutputRouting, AgoraRtcScreenCaptureType } from './type';
|
|
4
4
|
import { AgoraRtcSourceManager } from './source-manager';
|
|
5
5
|
import { AgoraRtcCaptureEnhancement } from './capture-enhancement';
|
|
6
6
|
import { AgoraRtcCanvasHelper } from './canvas';
|
|
7
7
|
import { AgoraRtcAccessPointConfig } from '../engine/ap-detector';
|
|
8
|
+
import type { AgoraRteClientRecordingManager } from '../media/type';
|
|
8
9
|
/**
|
|
9
10
|
* Abstract class that defines the interface for an Agora RTC client. This class provides methods for managing cameras, microphones, speakers, and screen capture, as well as creating and managing Agora RTC channels.
|
|
10
11
|
*/
|
|
@@ -19,10 +20,11 @@ export declare abstract class AgoraRtcClient {
|
|
|
19
20
|
/**
|
|
20
21
|
* Creates an Agora RTC channel client.
|
|
21
22
|
* @param channelId The ID of the channel to join.
|
|
23
|
+
* @param localUserId The local user ID.
|
|
22
24
|
* @param latencyLevel The latency level to use for the channel.
|
|
23
|
-
* @param channelType The
|
|
25
|
+
* @param channelType The channel type. Standard for normal communication, LargeScale for large-scale broadcast.
|
|
24
26
|
*/
|
|
25
|
-
abstract createChannelClient(channelId: string, localUserId: string, latencyLevel: AgoraRtcLatencyLevelType): AgoraRtcChannelClient;
|
|
27
|
+
abstract createChannelClient(channelId: string, localUserId: string, latencyLevel: AgoraRtcLatencyLevelType, channelType?: AgoraRtcChannelType): AgoraRtcChannelClient;
|
|
26
28
|
/**
|
|
27
29
|
* Sets the client parameters.
|
|
28
30
|
* @param parameters The parameters to set.
|
|
@@ -212,4 +214,10 @@ export declare abstract class AgoraRtcClient {
|
|
|
212
214
|
* Releases the client resources.
|
|
213
215
|
*/
|
|
214
216
|
abstract release(): void;
|
|
217
|
+
/**
|
|
218
|
+
* Gets the media recorder manager for client-side recording.
|
|
219
|
+
* Only available on Electron platform.
|
|
220
|
+
* @returns The media recorder manager, or undefined if not supported.
|
|
221
|
+
*/
|
|
222
|
+
getMediaRecorderManager(): AgoraRteClientRecordingManager | undefined;
|
|
215
223
|
}
|
package/lib/core/rtc/client.js
CHANGED
|
@@ -156,5 +156,29 @@ var AgoraRtcClient = exports.AgoraRtcClient = /*#__PURE__*/function () {
|
|
|
156
156
|
/**
|
|
157
157
|
* Releases the client resources.
|
|
158
158
|
*/
|
|
159
|
+
}, {
|
|
160
|
+
key: "getMediaRecorderManager",
|
|
161
|
+
value:
|
|
162
|
+
/**
|
|
163
|
+
* Gets the media recorder manager for client-side recording.
|
|
164
|
+
* Only available on Electron platform.
|
|
165
|
+
* @returns The media recorder manager, or undefined if not supported.
|
|
166
|
+
*/
|
|
167
|
+
function getMediaRecorderManager() {
|
|
168
|
+
return this.sourceManager.getMediaRecorderManager();
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Sets the audio raw data observer configuration for a specific device.
|
|
173
|
+
* @param deviceId The ID of the device to set the audio raw data observer configuration for.
|
|
174
|
+
* @param config The audio raw data observer configuration to set.
|
|
175
|
+
*/
|
|
176
|
+
// abstract setAudioRawDataConfig(deviceId: string, config: AgoraRtcAudioRawDataConfig): number;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Checks if the client has screen capture permission.
|
|
180
|
+
* @returns Whether the client has screen capture permission.
|
|
181
|
+
*/
|
|
182
|
+
// abstract hasScreenCapturePermission(): boolean;
|
|
159
183
|
}]);
|
|
160
184
|
}();
|
|
@@ -11,6 +11,7 @@ export declare abstract class AgoraRtcStreamPublishPool<TItem extends AgoraRtcSt
|
|
|
11
11
|
protected onBeforeUpdate(item: TItem): void;
|
|
12
12
|
protected shouldNotifyUpdate(item: TItem): boolean;
|
|
13
13
|
protected shouldNotifyVideoEncoderConfig(item: TItem, wasVideoPublished: boolean): boolean;
|
|
14
|
+
protected onBeforeJoinChannel(item: TItem): void;
|
|
14
15
|
private getOrCreateItem;
|
|
15
16
|
publishVideo(token: string | undefined, streamId: string, sourceId: string, type: AgoraRtcVideoSourceType, state: AgoraRtcMediaSourceState): number;
|
|
16
17
|
publishAudio(token: string | undefined, streamId: string, sourceId: string, type: AgoraRtcAudioSourceType, state: AgoraRtcMediaSourceState): number;
|
|
@@ -108,6 +108,11 @@ var AgoraRtcStreamPublishPool = exports.AgoraRtcStreamPublishPool = /*#__PURE__*
|
|
|
108
108
|
value: function shouldNotifyVideoEncoderConfig(item, wasVideoPublished) {
|
|
109
109
|
return false;
|
|
110
110
|
}
|
|
111
|
+
}, {
|
|
112
|
+
key: "onBeforeJoinChannel",
|
|
113
|
+
value: function onBeforeJoinChannel(item) {
|
|
114
|
+
// To be implemented by subclass if needed
|
|
115
|
+
}
|
|
111
116
|
}, {
|
|
112
117
|
key: "getOrCreateItem",
|
|
113
118
|
value: function getOrCreateItem(streamId, token) {
|
|
@@ -136,6 +141,7 @@ var AgoraRtcStreamPublishPool = exports.AgoraRtcStreamPublishPool = /*#__PURE__*
|
|
|
136
141
|
this.observable.notifyObservers('onConnectionSetVideoEncoderConfig', item);
|
|
137
142
|
}
|
|
138
143
|
if (!item.isMainConnection && !item.connectionIsJoin && item.token) {
|
|
144
|
+
this.onBeforeJoinChannel(item);
|
|
139
145
|
this.observable.notifyObservers('onConnectionJoinChannel', item);
|
|
140
146
|
item.connectionIsJoin = true;
|
|
141
147
|
this._itemMap.set(streamId, item);
|
|
@@ -162,6 +168,7 @@ var AgoraRtcStreamPublishPool = exports.AgoraRtcStreamPublishPool = /*#__PURE__*
|
|
|
162
168
|
item.audioSourceState = state;
|
|
163
169
|
item.token = token;
|
|
164
170
|
if (!item.isMainConnection && !item.connectionIsJoin && item.token) {
|
|
171
|
+
this.onBeforeJoinChannel(item);
|
|
165
172
|
this.observable.notifyObservers('onConnectionJoinChannel', item);
|
|
166
173
|
item.connectionIsJoin = true;
|
|
167
174
|
this._itemMap.set(streamId, item);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AgoraRtcCameraPosition, AgoraRtcDeviceInfo, AgoraRtcDisplayInfo, AgoraRtcWindowInfo, AgoraRtcScreenCaptureParams, AgoraRtcVideoOrientation, AgoraRtcCameraCaptureParams, AgoraRtcMediaSourceState, AgoraRtcSourceManagerObserver, AgoraRtcScreenCaptureType, AgoraRtcMediaSourceIndex } from './type';
|
|
2
|
+
import { AgoraRteClientRecordingManager } from '../media/type';
|
|
2
3
|
export interface AgoraRtcSourceManager {
|
|
3
4
|
readonly keepRecording: boolean;
|
|
4
5
|
addObserver(observer: AgoraRtcSourceManagerObserver): void;
|
|
@@ -126,10 +127,10 @@ export interface AgoraRtcSourceManager {
|
|
|
126
127
|
startScreenCaptureByWindowIdWithParams(windowId: string, params: AgoraRtcScreenCaptureParams): number;
|
|
127
128
|
/**
|
|
128
129
|
* Starts screen capture by window ID.
|
|
129
|
-
* @param
|
|
130
|
-
* @param
|
|
130
|
+
* @param windowId The ID of the window to start screen capture for.
|
|
131
|
+
* @param enableHighLight Whether to enable highlight border (default: true). Set to false for client recording.
|
|
131
132
|
*/
|
|
132
|
-
startScreenCaptureByWindowId(windowId: string): number;
|
|
133
|
+
startScreenCaptureByWindowId(windowId: string, enableHighLight: boolean): number;
|
|
133
134
|
/**
|
|
134
135
|
* For mobile only.
|
|
135
136
|
* Starts screen capture by screen ID.
|
|
@@ -153,8 +154,26 @@ export interface AgoraRtcSourceManager {
|
|
|
153
154
|
* Stops screen capture.
|
|
154
155
|
* @param sourceId The ID of the screen capture to stop.
|
|
155
156
|
* @param type The type of the screen capture.
|
|
157
|
+
* @param forceCleanState If true, forcefully reset the internal source state after stopping,
|
|
158
|
+
* without notifying upper layers. Used by client recording to ensure
|
|
159
|
+
* stale enabled state doesn't block subsequent capture starts.
|
|
160
|
+
*/
|
|
161
|
+
stopScreenCapture(sourceId: string, type: AgoraRtcScreenCaptureType, forceCleanState?: boolean): number;
|
|
162
|
+
/**
|
|
163
|
+
* Returns a promise that resolves when the SDK's onLocalVideoStateChanged callback
|
|
164
|
+
* fires with state=Stopped for VideoSourceScreenPrimary.
|
|
165
|
+
* Used to wait for the SDK to fully process a screen capture stop before starting a new one.
|
|
166
|
+
*/
|
|
167
|
+
waitForScreenCaptureStopped(): Promise<void>;
|
|
168
|
+
/**
|
|
169
|
+
* Protect a source ID from being closed by onLocalVideoStateChanged callbacks.
|
|
170
|
+
* Used when recording starts its own window capture while screen share is stopping.
|
|
171
|
+
*/
|
|
172
|
+
protectSourceId(sourceId: string): void;
|
|
173
|
+
/**
|
|
174
|
+
* Remove protection from a source ID.
|
|
156
175
|
*/
|
|
157
|
-
|
|
176
|
+
unprotectSourceId(sourceId: string): void;
|
|
158
177
|
/**
|
|
159
178
|
* For PC only.
|
|
160
179
|
* Updates the screen capture exclude window list by display id.
|
|
@@ -207,4 +226,10 @@ export interface AgoraRtcSourceManager {
|
|
|
207
226
|
*/
|
|
208
227
|
observeSystemSelectedMicrophoneChanged(enable: boolean): number;
|
|
209
228
|
setLoopbackInstalled(installed: boolean): void;
|
|
229
|
+
/**
|
|
230
|
+
* Gets the media recorder manager for client-side recording.
|
|
231
|
+
* Only available on Electron platform.
|
|
232
|
+
* @returns The media recorder manager, or undefined if not supported.
|
|
233
|
+
*/
|
|
234
|
+
getMediaRecorderManager(): AgoraRteClientRecordingManager | undefined;
|
|
210
235
|
}
|