agora-electron-sdk 4.3.2 → 4.4.0-dev.1
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/gulpfile.js +3 -1
- package/js/AgoraSdk.js +4 -4
- package/js/Private/AgoraBase.js +367 -326
- package/js/Private/AgoraMediaBase.js +265 -76
- package/js/Private/AgoraMediaPlayerTypes.js +12 -30
- package/js/Private/IAgoraH265Transcoder.js +2 -5
- package/js/Private/IAgoraLog.js +2 -5
- package/js/Private/IAgoraMediaEngine.js +2 -5
- package/js/Private/IAgoraMediaPlayer.js +4 -10
- package/js/Private/IAgoraMediaRecorder.js +2 -5
- package/js/Private/IAgoraMediaStreamingSource.js +2 -5
- package/js/Private/IAgoraMusicContentCenter.js +21 -68
- package/js/Private/IAgoraRhythmPlayer.js +2 -5
- package/js/Private/IAgoraRtcEngine.js +76 -130
- package/js/Private/IAgoraRtcEngineEx.js +5 -28
- package/js/Private/IAgoraSpatialAudio.js +6 -15
- package/js/Private/IAudioDeviceManager.js +2 -5
- package/js/Private/impl/AgoraMediaBaseImpl.js +11 -14
- package/js/Private/impl/IAgoraH265TranscoderImpl.js +43 -46
- package/js/Private/impl/IAgoraMediaEngineImpl.js +155 -172
- package/js/Private/impl/IAgoraMediaPlayerImpl.js +534 -546
- package/js/Private/impl/IAgoraMediaRecorderImpl.js +26 -29
- package/js/Private/impl/IAgoraMusicContentCenterImpl.js +218 -251
- package/js/Private/impl/IAgoraRtcEngineExImpl.js +434 -436
- package/js/Private/impl/IAgoraRtcEngineImpl.js +2445 -2423
- package/js/Private/impl/IAgoraSpatialAudioImpl.js +167 -170
- package/js/Private/impl/IAudioDeviceManagerImpl.js +232 -235
- package/js/Private/internal/AgoraH265TranscoderInternal.js +33 -57
- package/js/Private/internal/AgoraMediaBaseInternal.js +9 -28
- package/js/Private/internal/AudioDeviceManagerInternal.js +24 -44
- package/js/Private/internal/IrisApiEngine.js +94 -145
- package/js/Private/internal/LocalSpatialAudioEngineInternal.js +3 -23
- package/js/Private/internal/MediaEngineInternal.js +69 -94
- package/js/Private/internal/MediaPlayerInternal.js +105 -125
- package/js/Private/internal/MediaRecorderInternal.js +37 -64
- package/js/Private/internal/MusicContentCenterInternal.js +92 -129
- package/js/Private/internal/RtcEngineExInternal.js +213 -243
- package/js/Private/ti/AgoraBase-ti.js +2 -2
- package/js/Private/ti/AgoraMediaBase-ti.js +2 -2
- package/js/Private/ti/AgoraMediaPlayerTypes-ti.js +1 -1
- package/js/Private/ti/IAgoraH265Transcoder-ti.js +2 -2
- package/js/Private/ti/IAgoraLog-ti.js +1 -1
- package/js/Private/ti/IAgoraMediaEngine-ti.js +1 -1
- package/js/Private/ti/IAgoraMediaPlayer-ti.js +2 -2
- package/js/Private/ti/IAgoraMediaPlayerSource-ti.js +2 -2
- package/js/Private/ti/IAgoraMediaRecorder-ti.js +1 -1
- package/js/Private/ti/IAgoraMediaStreamingSource-ti.js +1 -1
- package/js/Private/ti/IAgoraMusicContentCenter-ti.js +2 -2
- package/js/Private/ti/IAgoraRhythmPlayer-ti.js +1 -1
- package/js/Private/ti/IAgoraRtcEngine-ti.js +7 -7
- package/js/Private/ti/IAgoraRtcEngineEx-ti.js +1 -1
- package/js/Private/ti/IAgoraSpatialAudio-ti.js +1 -1
- package/js/Private/ti/IAudioDeviceManager-ti.js +1 -1
- package/js/Renderer/AgoraView.js +100 -145
- package/js/Renderer/IRenderer.js +43 -53
- package/js/Renderer/IRendererManager.js +106 -132
- package/js/Renderer/RendererCache.js +63 -96
- package/js/Renderer/RendererManager.js +35 -69
- package/js/Renderer/WebGLRenderer/index.js +77 -106
- package/js/Renderer/YUVCanvasRenderer/index.js +18 -40
- package/js/Utils.js +45 -64
- package/package.json +9 -7
- package/scripts/checkElectron.js +41 -0
- package/scripts/downloadPrebuild.js +56 -24
- package/scripts/synclib.js +6 -6
- package/ts/Private/AgoraBase.ts +269 -4
- package/ts/Private/AgoraMediaBase.ts +343 -1
- package/ts/Private/IAgoraMediaEngine.ts +3 -3
- package/ts/Private/IAgoraRtcEngine.ts +130 -119
- package/ts/Private/IAgoraRtcEngineEx.ts +14 -9
- package/ts/Private/impl/IAgoraRtcEngineExImpl.ts +30 -0
- package/ts/Private/impl/IAgoraRtcEngineImpl.ts +181 -61
- package/ts/Private/internal/IrisApiEngine.ts +3 -7
- package/ts/Private/internal/MediaEngineInternal.ts +0 -1
- package/ts/Private/internal/RtcEngineExInternal.ts +8 -4
- package/ts/Private/ti/IAgoraRtcEngine-ti.ts +5 -5
- package/ts/Renderer/IRenderer.ts +1 -2
- package/ts/Renderer/IRendererManager.ts +21 -12
- package/ts/Utils.ts +15 -0
- package/types/Private/AgoraBase.d.ts +264 -8
- package/types/Private/AgoraBase.d.ts.map +1 -1
- package/types/Private/AgoraMediaBase.d.ts +336 -1
- package/types/Private/AgoraMediaBase.d.ts.map +1 -1
- package/types/Private/IAgoraMediaEngine.d.ts +3 -3
- package/types/Private/IAgoraRtcEngine.d.ts +106 -116
- package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngineEx.d.ts +10 -10
- package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
- package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts +3 -1
- package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -1
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +13 -5
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -1
- package/types/Private/internal/IrisApiEngine.d.ts.map +1 -1
- package/types/Private/internal/MediaEngineInternal.d.ts.map +1 -1
- package/types/Private/internal/RtcEngineExInternal.d.ts +1 -0
- package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -1
- package/types/Renderer/IRenderer.d.ts.map +1 -1
- package/types/Renderer/IRendererManager.d.ts.map +1 -1
- package/types/Utils.d.ts +4 -0
- package/types/Utils.d.ts.map +1 -1
|
@@ -1,86 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
4
|
};
|
|
20
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
6
|
exports.H265TranscoderInternal = void 0;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
function H265TranscoderInternal() {
|
|
30
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
31
|
-
}
|
|
32
|
-
H265TranscoderInternal.prototype.release = function () {
|
|
7
|
+
const ts_interface_checker_1 = require("ts-interface-checker");
|
|
8
|
+
const IAgoraH265TranscoderImpl_1 = require("../impl/IAgoraH265TranscoderImpl");
|
|
9
|
+
const IAgoraH265Transcoder_ti_1 = __importDefault(require("../ti/IAgoraH265Transcoder-ti"));
|
|
10
|
+
const checkers = (0, ts_interface_checker_1.createCheckers)(IAgoraH265Transcoder_ti_1.default);
|
|
11
|
+
const IrisApiEngine_1 = require("./IrisApiEngine");
|
|
12
|
+
class H265TranscoderInternal extends IAgoraH265TranscoderImpl_1.IH265TranscoderImpl {
|
|
13
|
+
release() {
|
|
33
14
|
H265TranscoderInternal._h265_transcoder_observers = [];
|
|
34
15
|
this.removeAllListeners();
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
_a[eventType] = undefined,
|
|
41
|
-
_a))) {
|
|
16
|
+
}
|
|
17
|
+
_addListenerPreCheck(eventType) {
|
|
18
|
+
if (checkers.IH265TranscoderObserver?.strictTest({
|
|
19
|
+
[eventType]: undefined,
|
|
20
|
+
})) {
|
|
42
21
|
if (H265TranscoderInternal._h265_transcoder_observers.length === 0) {
|
|
43
22
|
this.registerTranscoderObserver({});
|
|
44
23
|
}
|
|
45
24
|
}
|
|
46
25
|
return true;
|
|
47
|
-
}
|
|
48
|
-
|
|
26
|
+
}
|
|
27
|
+
addListener(eventType, listener) {
|
|
49
28
|
this._addListenerPreCheck(eventType);
|
|
50
|
-
|
|
29
|
+
const callback = (eventProcessor, data) => {
|
|
51
30
|
if (eventProcessor.type(data) !== IrisApiEngine_1.EVENT_TYPE.IAgoraH265Transcoder) {
|
|
52
31
|
return;
|
|
53
32
|
}
|
|
54
|
-
eventProcessor.func.map(
|
|
55
|
-
|
|
56
|
-
it((_a = {}, _a[eventType] = listener, _a), eventType, data);
|
|
33
|
+
eventProcessor.func.map((it) => {
|
|
34
|
+
it({ [eventType]: listener }, eventType, data);
|
|
57
35
|
});
|
|
58
36
|
};
|
|
59
37
|
// @ts-ignore
|
|
60
38
|
listener.agoraCallback = callback;
|
|
61
39
|
IrisApiEngine_1.DeviceEventEmitter.addListener(eventType, callback);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
var _a;
|
|
40
|
+
}
|
|
41
|
+
removeListener(eventType, listener) {
|
|
65
42
|
IrisApiEngine_1.DeviceEventEmitter.removeListener(eventType,
|
|
66
43
|
// @ts-ignore
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
44
|
+
listener?.agoraCallback ?? listener);
|
|
45
|
+
}
|
|
46
|
+
removeAllListeners(eventType) {
|
|
70
47
|
IrisApiEngine_1.DeviceEventEmitter.removeAllListeners(eventType);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (!H265TranscoderInternal._h265_transcoder_observers.find(
|
|
48
|
+
}
|
|
49
|
+
registerTranscoderObserver(observer) {
|
|
50
|
+
if (!H265TranscoderInternal._h265_transcoder_observers.find((value) => value === observer)) {
|
|
74
51
|
H265TranscoderInternal._h265_transcoder_observers.push(observer);
|
|
75
52
|
}
|
|
76
|
-
return
|
|
77
|
-
}
|
|
78
|
-
|
|
53
|
+
return super.registerTranscoderObserver(observer);
|
|
54
|
+
}
|
|
55
|
+
unregisterTranscoderObserver(observer) {
|
|
79
56
|
H265TranscoderInternal._h265_transcoder_observers =
|
|
80
|
-
H265TranscoderInternal._h265_transcoder_observers.filter(
|
|
81
|
-
return
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return H265TranscoderInternal;
|
|
85
|
-
}(IAgoraH265TranscoderImpl_1.IH265TranscoderImpl));
|
|
57
|
+
H265TranscoderInternal._h265_transcoder_observers.filter((value) => value !== observer);
|
|
58
|
+
return super.unregisterTranscoderObserver(observer);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
86
61
|
exports.H265TranscoderInternal = H265TranscoderInternal;
|
|
62
|
+
H265TranscoderInternal._h265_transcoder_observers = [];
|
|
@@ -1,34 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.VideoFrameMetaInfoInternal = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
_this._videoFrameMetaInfo = videoFrameMetaInfo;
|
|
25
|
-
return _this;
|
|
4
|
+
const AgoraMediaBaseImpl_1 = require("../impl/AgoraMediaBaseImpl");
|
|
5
|
+
class VideoFrameMetaInfoInternal extends AgoraMediaBaseImpl_1.IVideoFrameMetaInfoImpl {
|
|
6
|
+
constructor(videoFrameMetaInfo) {
|
|
7
|
+
super();
|
|
8
|
+
this._videoFrameMetaInfo = videoFrameMetaInfo;
|
|
26
9
|
}
|
|
27
|
-
|
|
28
|
-
var _a;
|
|
10
|
+
getMetaInfoStr(key) {
|
|
29
11
|
// @ts-ignore
|
|
30
|
-
return
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
}(AgoraMediaBaseImpl_1.IVideoFrameMetaInfoImpl));
|
|
12
|
+
return this._videoFrameMetaInfo?.[key];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
34
15
|
exports.VideoFrameMetaInfoInternal = VideoFrameMetaInfoInternal;
|
|
@@ -1,64 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.AudioDeviceManagerInternal = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
AudioDeviceManagerInternal.prototype.getPlaybackDeviceInfo = function () {
|
|
27
|
-
var apiType = this.getApiTypeFromGetPlaybackDeviceInfo();
|
|
28
|
-
var jsonParams = {};
|
|
29
|
-
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
4
|
+
const IAudioDeviceManagerImpl_1 = require("../impl/IAudioDeviceManagerImpl");
|
|
5
|
+
const IrisApiEngine_1 = require("./IrisApiEngine");
|
|
6
|
+
class AudioDeviceManagerInternal extends IAudioDeviceManagerImpl_1.IAudioDeviceManagerImpl {
|
|
7
|
+
getPlaybackDeviceInfo() {
|
|
8
|
+
const apiType = this.getApiTypeFromGetPlaybackDeviceInfo();
|
|
9
|
+
const jsonParams = {};
|
|
10
|
+
const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
30
11
|
return {
|
|
31
12
|
deviceId: jsonResults.deviceId,
|
|
32
13
|
deviceName: jsonResults.deviceName,
|
|
33
14
|
};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
15
|
+
}
|
|
16
|
+
getRecordingDeviceInfo() {
|
|
17
|
+
const apiType = this.getApiTypeFromGetRecordingDeviceInfo();
|
|
18
|
+
const jsonParams = {};
|
|
19
|
+
const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
39
20
|
return {
|
|
40
21
|
deviceId: jsonResults.deviceId,
|
|
41
22
|
deviceName: jsonResults.deviceName,
|
|
42
23
|
};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
24
|
+
}
|
|
25
|
+
getPlaybackDefaultDevice() {
|
|
26
|
+
const apiType = this.getApiTypeFromGetPlaybackDefaultDevice();
|
|
27
|
+
const jsonParams = {};
|
|
28
|
+
const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
48
29
|
return {
|
|
49
30
|
deviceId: jsonResults.deviceId,
|
|
50
31
|
deviceName: jsonResults.deviceName,
|
|
51
32
|
};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
33
|
+
}
|
|
34
|
+
getRecordingDefaultDevice() {
|
|
35
|
+
const apiType = this.getApiTypeFromGetRecordingDefaultDevice();
|
|
36
|
+
const jsonParams = {};
|
|
37
|
+
const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
57
38
|
return {
|
|
58
39
|
deviceId: jsonResults.deviceId,
|
|
59
40
|
deviceName: jsonResults.deviceName,
|
|
60
41
|
};
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
}(IAudioDeviceManagerImpl_1.IAudioDeviceManagerImpl));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
64
44
|
exports.AudioDeviceManagerInternal = AudioDeviceManagerInternal;
|