agora-electron-sdk 4.2.6 → 4.3.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/CHANGELOG.md +20 -0
- package/js/Private/AgoraBase.js +139 -174
- package/js/Private/AgoraMediaBase.js +49 -20
- package/js/Private/AgoraMediaPlayerTypes.js +32 -23
- package/js/Private/IAgoraH265Transcoder.js +39 -0
- package/js/Private/IAgoraMediaStreamingSource.js +32 -32
- package/js/Private/IAgoraMusicContentCenter.js +19 -19
- package/js/Private/IAgoraRhythmPlayer.js +9 -9
- package/js/Private/IAgoraRtcEngine.js +12 -12
- package/js/Private/IAgoraSpatialAudio.js +3 -31
- package/js/Private/extension/IAgoraH265TranscoderExtension.js +2 -0
- package/js/Private/impl/AgoraMediaBaseImpl.js +26 -2
- package/js/Private/impl/IAgoraH265TranscoderImpl.js +119 -0
- package/js/Private/impl/IAgoraMediaEngineImpl.js +13 -13
- package/js/Private/impl/IAgoraMediaPlayerImpl.js +92 -74
- package/js/Private/impl/IAgoraMediaPlayerSourceImpl.js +12 -2
- package/js/Private/impl/IAgoraMediaRecorderImpl.js +2 -2
- package/js/Private/impl/IAgoraMusicContentCenterImpl.js +20 -20
- package/js/Private/impl/IAgoraRtcEngineExImpl.js +66 -84
- package/js/Private/impl/IAgoraRtcEngineImpl.js +456 -440
- package/js/Private/impl/IAgoraSpatialAudioImpl.js +157 -181
- package/js/Private/impl/IAudioDeviceManagerImpl.js +22 -22
- package/js/Private/internal/AgoraH265TranscoderInternal.js +86 -0
- package/js/Private/internal/AgoraMediaBaseInternal.js +34 -0
- package/js/Private/internal/IrisApiEngine.js +35 -20
- package/js/Private/internal/LocalSpatialAudioEngineInternal.js +0 -39
- package/js/Private/internal/MediaPlayerInternal.js +22 -21
- package/js/Private/internal/MusicContentCenterInternal.js +1 -4
- package/js/Private/internal/RtcEngineExInternal.js +101 -134
- package/js/Private/ti/AgoraMediaBase-ti.js +1 -1
- package/js/Private/ti/IAgoraH265Transcoder-ti.js +40 -0
- package/js/Private/ti/IAgoraMediaPlayerSource-ti.js +4 -2
- package/js/Private/ti/IAgoraMusicContentCenter-ti.js +5 -5
- package/js/Private/ti/IAgoraRtcEngine-ti.js +12 -11
- package/js/Renderer/AgoraView.js +28 -14
- package/js/Renderer/IRenderer.js +65 -17
- package/js/Renderer/IRendererManager.js +230 -0
- package/js/Renderer/RendererCache.js +170 -0
- package/js/Renderer/RendererManager.js +49 -460
- package/js/Renderer/WebGLRenderer/index.js +82 -234
- package/js/Renderer/YUVCanvasRenderer/index.js +27 -147
- package/js/Types.js +6 -6
- package/js/Utils.js +37 -88
- package/package.json +4 -3
- package/scripts/clean.js +12 -0
- package/scripts/synclib.js +8 -2
- package/ts/Private/AgoraBase.ts +225 -201
- package/ts/Private/AgoraMediaBase.ts +63 -25
- package/ts/Private/AgoraMediaPlayerTypes.ts +67 -24
- package/ts/Private/IAgoraH265Transcoder.ts +73 -0
- package/ts/Private/IAgoraLog.ts +1 -0
- package/ts/Private/IAgoraMediaEngine.ts +12 -7
- package/ts/Private/IAgoraMediaPlayer.ts +47 -21
- package/ts/Private/IAgoraMediaPlayerSource.ts +27 -6
- package/ts/Private/IAgoraMediaStreamingSource.ts +38 -37
- package/ts/Private/IAgoraMusicContentCenter.ts +20 -20
- package/ts/Private/IAgoraRhythmPlayer.ts +7 -6
- package/ts/Private/IAgoraRtcEngine.ts +407 -364
- package/ts/Private/IAgoraRtcEngineEx.ts +25 -61
- package/ts/Private/IAgoraSpatialAudio.ts +80 -191
- package/ts/Private/IAudioDeviceManager.ts +27 -14
- package/ts/Private/extension/IAgoraH265TranscoderExtension.ts +39 -0
- package/ts/Private/impl/AgoraMediaBaseImpl.ts +25 -1
- package/ts/Private/impl/IAgoraH265TranscoderImpl.ts +152 -0
- package/ts/Private/impl/IAgoraMediaEngineImpl.ts +13 -13
- package/ts/Private/impl/IAgoraMediaPlayerImpl.ts +110 -81
- package/ts/Private/impl/IAgoraMediaPlayerSourceImpl.ts +17 -2
- package/ts/Private/impl/IAgoraMediaRecorderImpl.ts +2 -2
- package/ts/Private/impl/IAgoraMusicContentCenterImpl.ts +21 -21
- package/ts/Private/impl/IAgoraRtcEngineExImpl.ts +71 -106
- package/ts/Private/impl/IAgoraRtcEngineImpl.ts +589 -572
- package/ts/Private/impl/IAgoraSpatialAudioImpl.ts +211 -218
- package/ts/Private/impl/IAudioDeviceManagerImpl.ts +22 -22
- package/ts/Private/internal/AgoraH265TranscoderInternal.ts +97 -0
- package/ts/Private/internal/AgoraMediaBaseInternal.ts +15 -0
- package/ts/Private/internal/IrisApiEngine.ts +42 -27
- package/ts/Private/internal/LocalSpatialAudioEngineInternal.ts +1 -86
- package/ts/Private/internal/MediaPlayerInternal.ts +20 -29
- package/ts/Private/internal/MusicContentCenterInternal.ts +1 -5
- package/ts/Private/internal/RtcEngineExInternal.ts +91 -204
- package/ts/Private/ti/AgoraMediaBase-ti.ts +1 -1
- package/ts/Private/ti/IAgoraH265Transcoder-ti.ts +16 -0
- package/ts/Private/ti/IAgoraMediaPlayerSource-ti.ts +4 -2
- package/ts/Private/ti/IAgoraMusicContentCenter-ti.ts +5 -5
- package/ts/Private/ti/IAgoraRtcEngine-ti.ts +12 -11
- package/ts/Renderer/AgoraView.ts +29 -19
- package/ts/Renderer/IRenderer.ts +71 -22
- package/ts/Renderer/IRendererManager.ts +273 -19
- package/ts/Renderer/RendererCache.ts +167 -0
- package/ts/Renderer/RendererManager.ts +62 -607
- package/ts/Renderer/WebGLRenderer/index.ts +117 -295
- package/ts/Renderer/YUVCanvasRenderer/index.ts +45 -198
- package/ts/Types.ts +17 -194
- package/ts/Utils.ts +36 -100
- package/types/Private/AgoraBase.d.ts +219 -200
- package/types/Private/AgoraBase.d.ts.map +1 -1
- package/types/Private/AgoraMediaBase.d.ts +63 -27
- package/types/Private/AgoraMediaBase.d.ts.map +1 -1
- package/types/Private/AgoraMediaPlayerTypes.d.ts +65 -24
- package/types/Private/AgoraMediaPlayerTypes.d.ts.map +1 -1
- package/types/Private/IAgoraH265Transcoder.d.ts +28 -0
- package/types/Private/IAgoraH265Transcoder.d.ts.map +1 -0
- package/types/Private/IAgoraLog.d.ts.map +1 -1
- package/types/Private/IAgoraMediaEngine.d.ts +11 -6
- package/types/Private/IAgoraMediaEngine.d.ts.map +1 -1
- package/types/Private/IAgoraMediaPlayer.d.ts +42 -20
- package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -1
- package/types/Private/IAgoraMediaPlayerSource.d.ts +23 -6
- package/types/Private/IAgoraMediaPlayerSource.d.ts.map +1 -1
- package/types/Private/IAgoraMediaStreamingSource.d.ts.map +1 -1
- package/types/Private/IAgoraMusicContentCenter.d.ts +19 -19
- package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -1
- package/types/Private/IAgoraRhythmPlayer.d.ts +6 -6
- package/types/Private/IAgoraRhythmPlayer.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngine.d.ts +329 -293
- package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngineEx.d.ts +21 -53
- package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
- package/types/Private/IAgoraSpatialAudio.d.ts +56 -167
- package/types/Private/IAgoraSpatialAudio.d.ts.map +1 -1
- package/types/Private/IAudioDeviceManager.d.ts +27 -14
- package/types/Private/IAudioDeviceManager.d.ts.map +1 -1
- package/types/Private/extension/IAgoraH265TranscoderExtension.d.ts +24 -0
- package/types/Private/extension/IAgoraH265TranscoderExtension.d.ts.map +1 -0
- package/types/Private/impl/AgoraMediaBaseImpl.d.ts +5 -1
- package/types/Private/impl/AgoraMediaBaseImpl.d.ts.map +1 -1
- package/types/Private/impl/IAgoraH265TranscoderImpl.d.ts +15 -0
- package/types/Private/impl/IAgoraH265TranscoderImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts +6 -4
- package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts.map +1 -1
- package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts.map +1 -1
- package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts +2 -4
- package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -1
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +30 -25
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -1
- package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts +20 -22
- package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts.map +1 -1
- package/types/Private/internal/AgoraH265TranscoderInternal.d.ts +14 -0
- package/types/Private/internal/AgoraH265TranscoderInternal.d.ts.map +1 -0
- package/types/Private/internal/AgoraMediaBaseInternal.d.ts +8 -0
- package/types/Private/internal/AgoraMediaBaseInternal.d.ts.map +1 -0
- package/types/Private/internal/IrisApiEngine.d.ts +5 -2
- package/types/Private/internal/IrisApiEngine.d.ts.map +1 -1
- package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts +0 -15
- package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts.map +1 -1
- package/types/Private/internal/MediaPlayerInternal.d.ts.map +1 -1
- package/types/Private/internal/MusicContentCenterInternal.d.ts +0 -1
- package/types/Private/internal/MusicContentCenterInternal.d.ts.map +1 -1
- package/types/Private/internal/RtcEngineExInternal.d.ts +7 -13
- package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -1
- package/types/Private/ti/IAgoraH265Transcoder-ti.d.ts +8 -0
- package/types/Private/ti/IAgoraH265Transcoder-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts.map +1 -1
- package/types/Private/ti/IAgoraRtcEngine-ti.d.ts.map +1 -1
- package/types/Renderer/AgoraView.d.ts +4 -4
- package/types/Renderer/AgoraView.d.ts.map +1 -1
- package/types/Renderer/IRenderer.d.ts +11 -9
- package/types/Renderer/IRenderer.d.ts.map +1 -1
- package/types/Renderer/IRendererManager.d.ts +50 -12
- package/types/Renderer/IRendererManager.d.ts.map +1 -1
- package/types/Renderer/RendererCache.d.ts +36 -0
- package/types/Renderer/RendererCache.d.ts.map +1 -0
- package/types/Renderer/RendererManager.d.ts +13 -139
- package/types/Renderer/RendererManager.d.ts.map +1 -1
- package/types/Renderer/WebGLRenderer/index.d.ts +3 -18
- package/types/Renderer/WebGLRenderer/index.d.ts.map +1 -1
- package/types/Renderer/YUVCanvasRenderer/index.d.ts +4 -10
- package/types/Renderer/YUVCanvasRenderer/index.d.ts.map +1 -1
- package/types/Types.d.ts +11 -187
- package/types/Types.d.ts.map +1 -1
- package/types/Utils.d.ts +3 -20
- package/types/Utils.d.ts.map +1 -1
|
@@ -14,6 +14,17 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
|
+
var __assign = (this && this.__assign) || function () {
|
|
18
|
+
__assign = Object.assign || function(t) {
|
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
+
s = arguments[i];
|
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
+
t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
17
28
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
29
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
30
|
};
|
|
@@ -28,6 +39,7 @@ var IAgoraRtcEngineImpl_1 = require("../impl/IAgoraRtcEngineImpl");
|
|
|
28
39
|
var AgoraBase_ti_1 = __importDefault(require("../ti/AgoraBase-ti"));
|
|
29
40
|
var AgoraMediaBase_ti_1 = __importDefault(require("../ti/AgoraMediaBase-ti"));
|
|
30
41
|
var IAgoraRtcEngine_ti_1 = __importDefault(require("../ti/IAgoraRtcEngine-ti"));
|
|
42
|
+
var AgoraH265TranscoderInternal_1 = require("./AgoraH265TranscoderInternal");
|
|
31
43
|
var AudioDeviceManagerInternal_1 = require("./AudioDeviceManagerInternal");
|
|
32
44
|
var IrisApiEngine_1 = require("./IrisApiEngine");
|
|
33
45
|
var LocalSpatialAudioEngineInternal_1 = require("./LocalSpatialAudioEngineInternal");
|
|
@@ -45,10 +57,10 @@ var RtcEngineExInternal = /** @class */ (function (_super) {
|
|
|
45
57
|
_this._media_engine = new MediaEngineInternal_1.MediaEngineInternal();
|
|
46
58
|
_this._music_content_center = new MusicContentCenterInternal_1.MusicContentCenterInternal();
|
|
47
59
|
_this._local_spatial_audio_engine = new LocalSpatialAudioEngineInternal_1.LocalSpatialAudioEngineInternal();
|
|
60
|
+
_this._h265_transcoder = new AgoraH265TranscoderInternal_1.H265TranscoderInternal();
|
|
48
61
|
return _this;
|
|
49
62
|
}
|
|
50
63
|
RtcEngineExInternal.prototype.initialize = function (context) {
|
|
51
|
-
var _a;
|
|
52
64
|
if (Utils_1.AgoraEnv.webEnvReady) {
|
|
53
65
|
// @ts-ignore
|
|
54
66
|
window.AgoraEnv = Utils_1.AgoraEnv;
|
|
@@ -57,7 +69,6 @@ var RtcEngineExInternal = /** @class */ (function (_super) {
|
|
|
57
69
|
Utils_1.AgoraEnv.AgoraRendererManager = new RendererManager();
|
|
58
70
|
}
|
|
59
71
|
}
|
|
60
|
-
(_a = Utils_1.AgoraEnv.AgoraRendererManager) === null || _a === void 0 ? void 0 : _a.enableRender();
|
|
61
72
|
var ret = _super.prototype.initialize.call(this, context);
|
|
62
73
|
IrisApiEngine_1.callIrisApi.call(this, 'RtcEngine_setAppType', {
|
|
63
74
|
appType: 3,
|
|
@@ -68,7 +79,7 @@ var RtcEngineExInternal = /** @class */ (function (_super) {
|
|
|
68
79
|
var _a;
|
|
69
80
|
if (sync === void 0) { sync = false; }
|
|
70
81
|
Utils_1.AgoraEnv.AgoraElectronBridge.ReleaseRenderer();
|
|
71
|
-
(_a = Utils_1.AgoraEnv.AgoraRendererManager) === null || _a === void 0 ? void 0 : _a.
|
|
82
|
+
(_a = Utils_1.AgoraEnv.AgoraRendererManager) === null || _a === void 0 ? void 0 : _a.release();
|
|
72
83
|
Utils_1.AgoraEnv.AgoraRendererManager = undefined;
|
|
73
84
|
this._audio_device_manager.release();
|
|
74
85
|
this._video_device_manager.release();
|
|
@@ -84,6 +95,7 @@ var RtcEngineExInternal = /** @class */ (function (_super) {
|
|
|
84
95
|
MediaPlayerInternal_1.MediaPlayerInternal._video_frame_observers.clear();
|
|
85
96
|
MediaPlayerInternal_1.MediaPlayerInternal._audio_spectrum_observers.clear();
|
|
86
97
|
MediaRecorderInternal_1.MediaRecorderInternal._observers.clear();
|
|
98
|
+
this._h265_transcoder.release();
|
|
87
99
|
this.removeAllListeners();
|
|
88
100
|
_super.prototype.release.call(this, sync);
|
|
89
101
|
};
|
|
@@ -99,7 +111,7 @@ var RtcEngineExInternal = /** @class */ (function (_super) {
|
|
|
99
111
|
_b[eventType] = undefined,
|
|
100
112
|
_b))) {
|
|
101
113
|
if (RtcEngineExInternal._direct_cdn_streaming_event_handler.length === 0) {
|
|
102
|
-
|
|
114
|
+
(0, Utils_1.logError)('Please call `startDirectCdnStreaming` before you want to receive event by `addListener`');
|
|
103
115
|
return false;
|
|
104
116
|
}
|
|
105
117
|
}
|
|
@@ -107,7 +119,7 @@ var RtcEngineExInternal = /** @class */ (function (_super) {
|
|
|
107
119
|
_c[eventType] = undefined,
|
|
108
120
|
_c))) {
|
|
109
121
|
if (RtcEngineExInternal._metadata_observer.length === 0) {
|
|
110
|
-
|
|
122
|
+
(0, Utils_1.logError)('Please call `registerMediaMetadataObserver` before you want to receive event by `addListener`');
|
|
111
123
|
return false;
|
|
112
124
|
}
|
|
113
125
|
}
|
|
@@ -115,7 +127,7 @@ var RtcEngineExInternal = /** @class */ (function (_super) {
|
|
|
115
127
|
_d[eventType] = undefined,
|
|
116
128
|
_d))) {
|
|
117
129
|
if (RtcEngineExInternal._audio_encoded_frame_observers.length === 0) {
|
|
118
|
-
|
|
130
|
+
(0, Utils_1.logError)('Please call `registerAudioEncodedFrameObserver` before you want to receive event by `addListener`');
|
|
119
131
|
return false;
|
|
120
132
|
}
|
|
121
133
|
}
|
|
@@ -153,7 +165,7 @@ var RtcEngineExInternal = /** @class */ (function (_super) {
|
|
|
153
165
|
IrisApiEngine_1.DeviceEventEmitter.removeAllListeners(eventType);
|
|
154
166
|
};
|
|
155
167
|
RtcEngineExInternal.prototype.getVersion = function () {
|
|
156
|
-
var apiType = '
|
|
168
|
+
var apiType = 'RtcEngine_getVersion_915cb25';
|
|
157
169
|
var jsonParams = {};
|
|
158
170
|
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
159
171
|
return {
|
|
@@ -213,76 +225,51 @@ var RtcEngineExInternal = /** @class */ (function (_super) {
|
|
|
213
225
|
};
|
|
214
226
|
RtcEngineExInternal.prototype.getApiTypeFromJoinChannel = function (token, channelId, uid, options) {
|
|
215
227
|
if (Utils_1.AgoraEnv.AgoraRendererManager) {
|
|
216
|
-
Utils_1.AgoraEnv.AgoraRendererManager.
|
|
228
|
+
Utils_1.AgoraEnv.AgoraRendererManager.defaultChannelId = channelId;
|
|
217
229
|
}
|
|
218
|
-
return
|
|
230
|
+
return options === undefined
|
|
231
|
+
? 'RtcEngine_joinChannel_f097389'
|
|
232
|
+
: 'RtcEngine_joinChannel_cdbb747';
|
|
219
233
|
};
|
|
220
234
|
RtcEngineExInternal.prototype.getApiTypeFromLeaveChannel = function (options) {
|
|
221
235
|
return options === undefined
|
|
222
236
|
? 'RtcEngine_leaveChannel'
|
|
223
|
-
: '
|
|
237
|
+
: 'RtcEngine_leaveChannel_2c0e3aa';
|
|
224
238
|
};
|
|
225
239
|
RtcEngineExInternal.prototype.getApiTypeFromSetClientRole = function (role, options) {
|
|
226
240
|
return options === undefined
|
|
227
|
-
? '
|
|
228
|
-
: '
|
|
229
|
-
};
|
|
230
|
-
RtcEngineExInternal.prototype.getApiTypeFromStartEchoTest = function (config) {
|
|
231
|
-
return 'RtcEngine_startEchoTest3';
|
|
232
|
-
};
|
|
233
|
-
RtcEngineExInternal.prototype.getApiTypeFromStartPreview = function (sourceType) {
|
|
234
|
-
if (sourceType === void 0) { sourceType = AgoraMediaBase_1.VideoSourceType.VideoSourceCameraPrimary; }
|
|
235
|
-
return 'RtcEngine_startPreview2';
|
|
236
|
-
};
|
|
237
|
-
RtcEngineExInternal.prototype.getApiTypeFromStopPreview = function (sourceType) {
|
|
238
|
-
if (sourceType === void 0) { sourceType = AgoraMediaBase_1.VideoSourceType.VideoSourceCameraPrimary; }
|
|
239
|
-
return 'RtcEngine_stopPreview2';
|
|
240
|
-
};
|
|
241
|
-
RtcEngineExInternal.prototype.getApiTypeFromStartAudioRecording = function (config) {
|
|
242
|
-
return 'RtcEngine_startAudioRecording3';
|
|
241
|
+
? 'RtcEngine_setClientRole_3426fa6'
|
|
242
|
+
: 'RtcEngine_setClientRole_b46cc48';
|
|
243
243
|
};
|
|
244
|
-
RtcEngineExInternal.prototype.
|
|
245
|
-
|
|
246
|
-
return 'RtcEngine_startAudioMixing2';
|
|
244
|
+
RtcEngineExInternal.prototype.getApiTypeFromStartPreviewWithoutSourceType = function () {
|
|
245
|
+
return 'RtcEngine_startPreview';
|
|
247
246
|
};
|
|
248
247
|
RtcEngineExInternal.prototype.getApiTypeFromEnableDualStreamMode = function (enabled, streamConfig) {
|
|
249
248
|
return streamConfig === undefined
|
|
250
|
-
? '
|
|
251
|
-
: '
|
|
249
|
+
? 'RtcEngine_enableDualStreamMode_5039d15'
|
|
250
|
+
: 'RtcEngine_enableDualStreamMode_9822d8a';
|
|
252
251
|
};
|
|
253
252
|
RtcEngineExInternal.prototype.getApiTypeFromSetDualStreamMode = function (mode, streamConfig) {
|
|
254
253
|
return streamConfig === undefined
|
|
255
|
-
? '
|
|
256
|
-
: '
|
|
257
|
-
};
|
|
258
|
-
RtcEngineExInternal.prototype.getApiTypeFromLeaveChannelEx = function (connection, options) {
|
|
259
|
-
return 'RtcEngineEx_leaveChannelEx2';
|
|
260
|
-
};
|
|
261
|
-
RtcEngineExInternal.prototype.getApiTypeFromCreateDataStream = function (config) {
|
|
262
|
-
return 'RtcEngine_createDataStream2';
|
|
263
|
-
};
|
|
264
|
-
RtcEngineExInternal.prototype.getApiTypeFromAddVideoWatermark = function (watermarkUrl, options) {
|
|
265
|
-
return 'RtcEngine_addVideoWatermark2';
|
|
254
|
+
? 'RtcEngine_setDualStreamMode_3a7f662'
|
|
255
|
+
: 'RtcEngine_setDualStreamMode_b3a4f6c';
|
|
266
256
|
};
|
|
267
257
|
RtcEngineExInternal.prototype.getApiTypeFromJoinChannelWithUserAccount = function (token, channelId, userAccount, options) {
|
|
268
258
|
if (Utils_1.AgoraEnv.AgoraRendererManager) {
|
|
269
|
-
Utils_1.AgoraEnv.AgoraRendererManager.
|
|
259
|
+
Utils_1.AgoraEnv.AgoraRendererManager.defaultChannelId = channelId;
|
|
270
260
|
}
|
|
271
261
|
return options === undefined
|
|
272
|
-
? '
|
|
273
|
-
: '
|
|
274
|
-
};
|
|
275
|
-
RtcEngineExInternal.prototype.getApiTypeFromCreateDataStreamEx = function (config, connection) {
|
|
276
|
-
return 'RtcEngineEx_createDataStreamEx2';
|
|
262
|
+
? 'RtcEngine_joinChannelWithUserAccount_0e4f59e'
|
|
263
|
+
: 'RtcEngine_joinChannelWithUserAccount_4685af9';
|
|
277
264
|
};
|
|
278
265
|
RtcEngineExInternal.prototype.getApiTypeFromStartScreenCaptureBySourceType = function (sourceType, config) {
|
|
279
|
-
return '
|
|
266
|
+
return 'RtcEngine_startScreenCapture_9ebb320';
|
|
280
267
|
};
|
|
281
268
|
RtcEngineExInternal.prototype.getApiTypeFromStopScreenCaptureBySourceType = function (sourceType) {
|
|
282
|
-
return '
|
|
269
|
+
return 'RtcEngine_stopScreenCapture_4fd718e';
|
|
283
270
|
};
|
|
284
271
|
RtcEngineExInternal.prototype.getApiTypeFromPreloadChannelWithUserAccount = function (token, channelId, userAccount) {
|
|
285
|
-
return '
|
|
272
|
+
return 'RtcEngine_preloadChannel_a0779eb';
|
|
286
273
|
};
|
|
287
274
|
RtcEngineExInternal.prototype.getAudioDeviceManager = function () {
|
|
288
275
|
return this._audio_device_manager;
|
|
@@ -299,6 +286,9 @@ var RtcEngineExInternal = /** @class */ (function (_super) {
|
|
|
299
286
|
RtcEngineExInternal.prototype.getLocalSpatialAudioEngine = function () {
|
|
300
287
|
return this._local_spatial_audio_engine;
|
|
301
288
|
};
|
|
289
|
+
RtcEngineExInternal.prototype.getH265Transcoder = function () {
|
|
290
|
+
return this._h265_transcoder;
|
|
291
|
+
};
|
|
302
292
|
RtcEngineExInternal.prototype.registerAudioEncodedFrameObserver = function (config, observer) {
|
|
303
293
|
if (!RtcEngineExInternal._audio_encoded_frame_observers.find(function (value) { return value === observer; })) {
|
|
304
294
|
RtcEngineExInternal._audio_encoded_frame_observers.push(observer);
|
|
@@ -358,108 +348,85 @@ var RtcEngineExInternal = /** @class */ (function (_super) {
|
|
|
358
348
|
return screenCaptureSources;
|
|
359
349
|
};
|
|
360
350
|
RtcEngineExInternal.prototype.setupLocalVideo = function (canvas) {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
return ((_b = (_a = Utils_1.AgoraEnv.AgoraRendererManager) === null || _a === void 0 ? void 0 : _a.setupLocalVideo({
|
|
368
|
-
videoSourceType: sourceType,
|
|
369
|
-
channelId: '',
|
|
370
|
-
uid: uid,
|
|
371
|
-
view: view,
|
|
372
|
-
rendererOptions: {
|
|
373
|
-
contentMode: renderMode,
|
|
374
|
-
mirror: mirrorMode === AgoraBase_1.VideoMirrorModeType.VideoMirrorModeEnabled,
|
|
375
|
-
},
|
|
376
|
-
})) !== null && _b !== void 0 ? _b : -AgoraBase_1.ErrorCodeType.ErrNotInitialized);
|
|
351
|
+
if (!Utils_1.AgoraEnv.AgoraRendererManager)
|
|
352
|
+
return -AgoraBase_1.ErrorCodeType.ErrNotInitialized;
|
|
353
|
+
var renderer = Utils_1.AgoraEnv.AgoraRendererManager.addOrRemoveRenderer(canvas);
|
|
354
|
+
if (!renderer)
|
|
355
|
+
return -AgoraBase_1.ErrorCodeType.ErrFailed;
|
|
356
|
+
return AgoraBase_1.ErrorCodeType.ErrOk;
|
|
377
357
|
};
|
|
378
358
|
RtcEngineExInternal.prototype.setupRemoteVideo = function (canvas) {
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
view: view,
|
|
386
|
-
rendererOptions: {
|
|
387
|
-
contentMode: renderMode,
|
|
388
|
-
mirror: mirrorMode === AgoraBase_1.VideoMirrorModeType.VideoMirrorModeEnabled,
|
|
389
|
-
},
|
|
390
|
-
})) !== null && _d !== void 0 ? _d : -AgoraBase_1.ErrorCodeType.ErrNotInitialized);
|
|
359
|
+
if (!Utils_1.AgoraEnv.AgoraRendererManager)
|
|
360
|
+
return -AgoraBase_1.ErrorCodeType.ErrNotInitialized;
|
|
361
|
+
var renderer = Utils_1.AgoraEnv.AgoraRendererManager.addOrRemoveRenderer(canvas);
|
|
362
|
+
if (!renderer)
|
|
363
|
+
return -AgoraBase_1.ErrorCodeType.ErrFailed;
|
|
364
|
+
return AgoraBase_1.ErrorCodeType.ErrOk;
|
|
391
365
|
};
|
|
392
366
|
RtcEngineExInternal.prototype.setupRemoteVideoEx = function (canvas, connection) {
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
var
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
uid: uid,
|
|
400
|
-
view: view,
|
|
401
|
-
rendererOptions: {
|
|
402
|
-
contentMode: renderMode,
|
|
403
|
-
mirror: mirrorMode === AgoraBase_1.VideoMirrorModeType.VideoMirrorModeEnabled,
|
|
404
|
-
},
|
|
405
|
-
})) !== null && _b !== void 0 ? _b : -AgoraBase_1.ErrorCodeType.ErrNotInitialized);
|
|
367
|
+
if (!Utils_1.AgoraEnv.AgoraRendererManager)
|
|
368
|
+
return -AgoraBase_1.ErrorCodeType.ErrNotInitialized;
|
|
369
|
+
var renderer = Utils_1.AgoraEnv.AgoraRendererManager.addOrRemoveRenderer(__assign(__assign({}, canvas), connection));
|
|
370
|
+
if (!renderer)
|
|
371
|
+
return -AgoraBase_1.ErrorCodeType.ErrFailed;
|
|
372
|
+
return AgoraBase_1.ErrorCodeType.ErrOk;
|
|
406
373
|
};
|
|
407
374
|
RtcEngineExInternal.prototype.setLocalRenderMode = function (renderMode, mirrorMode) {
|
|
408
|
-
var _a, _b;
|
|
409
375
|
if (mirrorMode === void 0) { mirrorMode = AgoraBase_1.VideoMirrorModeType.VideoMirrorModeAuto; }
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
376
|
+
if (!Utils_1.AgoraEnv.AgoraRendererManager)
|
|
377
|
+
return -AgoraBase_1.ErrorCodeType.ErrNotInitialized;
|
|
378
|
+
var result = Utils_1.AgoraEnv.AgoraRendererManager.setRendererContext({
|
|
379
|
+
sourceType: AgoraMediaBase_1.VideoSourceType.VideoSourceCamera,
|
|
380
|
+
renderMode: renderMode,
|
|
381
|
+
mirrorMode: mirrorMode,
|
|
382
|
+
});
|
|
383
|
+
if (!result)
|
|
384
|
+
return -AgoraBase_1.ErrorCodeType.ErrFailed;
|
|
385
|
+
return AgoraBase_1.ErrorCodeType.ErrOk;
|
|
419
386
|
};
|
|
420
387
|
RtcEngineExInternal.prototype.setRemoteRenderMode = function (uid, renderMode, mirrorMode) {
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
388
|
+
if (!Utils_1.AgoraEnv.AgoraRendererManager)
|
|
389
|
+
return -AgoraBase_1.ErrorCodeType.ErrNotInitialized;
|
|
390
|
+
var result = Utils_1.AgoraEnv.AgoraRendererManager.setRendererContext({
|
|
391
|
+
sourceType: AgoraMediaBase_1.VideoSourceType.VideoSourceRemote,
|
|
425
392
|
uid: uid,
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
393
|
+
renderMode: renderMode,
|
|
394
|
+
mirrorMode: mirrorMode,
|
|
395
|
+
});
|
|
396
|
+
if (!result)
|
|
397
|
+
return -AgoraBase_1.ErrorCodeType.ErrFailed;
|
|
398
|
+
return AgoraBase_1.ErrorCodeType.ErrOk;
|
|
431
399
|
};
|
|
432
400
|
RtcEngineExInternal.prototype.setRemoteRenderModeEx = function (uid, renderMode, mirrorMode, connection) {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
rendererOptions: {
|
|
440
|
-
contentMode: renderMode,
|
|
441
|
-
mirror: mirrorMode === AgoraBase_1.VideoMirrorModeType.VideoMirrorModeEnabled,
|
|
442
|
-
},
|
|
443
|
-
})) !== null && _b !== void 0 ? _b : -AgoraBase_1.ErrorCodeType.ErrNotInitialized);
|
|
401
|
+
if (!Utils_1.AgoraEnv.AgoraRendererManager)
|
|
402
|
+
return -AgoraBase_1.ErrorCodeType.ErrNotInitialized;
|
|
403
|
+
var result = Utils_1.AgoraEnv.AgoraRendererManager.setRendererContext(__assign(__assign({ sourceType: AgoraMediaBase_1.VideoSourceType.VideoSourceRemote }, connection), { uid: uid, renderMode: renderMode, mirrorMode: mirrorMode }));
|
|
404
|
+
if (!result)
|
|
405
|
+
return -AgoraBase_1.ErrorCodeType.ErrFailed;
|
|
406
|
+
return AgoraBase_1.ErrorCodeType.ErrOk;
|
|
444
407
|
};
|
|
445
408
|
RtcEngineExInternal.prototype.setLocalVideoMirrorMode = function (mirrorMode) {
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
409
|
+
if (!Utils_1.AgoraEnv.AgoraRendererManager)
|
|
410
|
+
return -AgoraBase_1.ErrorCodeType.ErrNotInitialized;
|
|
411
|
+
var result = Utils_1.AgoraEnv.AgoraRendererManager.setRendererContext({
|
|
412
|
+
sourceType: AgoraMediaBase_1.VideoSourceType.VideoSourceCamera,
|
|
413
|
+
mirrorMode: mirrorMode,
|
|
414
|
+
});
|
|
415
|
+
if (!result)
|
|
416
|
+
return -AgoraBase_1.ErrorCodeType.ErrFailed;
|
|
417
|
+
return AgoraBase_1.ErrorCodeType.ErrOk;
|
|
455
418
|
};
|
|
456
419
|
RtcEngineExInternal.prototype.destroyRendererByView = function (view) {
|
|
457
420
|
var _a;
|
|
458
|
-
(_a = Utils_1.AgoraEnv.AgoraRendererManager) === null || _a === void 0 ? void 0 : _a.
|
|
421
|
+
(_a = Utils_1.AgoraEnv.AgoraRendererManager) === null || _a === void 0 ? void 0 : _a.removeRendererFromCache({ view: view });
|
|
459
422
|
};
|
|
460
|
-
RtcEngineExInternal.prototype.destroyRendererByConfig = function (
|
|
423
|
+
RtcEngineExInternal.prototype.destroyRendererByConfig = function (sourceType, channelId, uid) {
|
|
461
424
|
var _a;
|
|
462
|
-
(_a = Utils_1.AgoraEnv.AgoraRendererManager) === null || _a === void 0 ? void 0 : _a.
|
|
425
|
+
(_a = Utils_1.AgoraEnv.AgoraRendererManager) === null || _a === void 0 ? void 0 : _a.removeRendererFromCache({
|
|
426
|
+
sourceType: sourceType,
|
|
427
|
+
channelId: channelId,
|
|
428
|
+
uid: uid,
|
|
429
|
+
});
|
|
463
430
|
};
|
|
464
431
|
RtcEngineExInternal._event_handlers = [];
|
|
465
432
|
RtcEngineExInternal._direct_cdn_streaming_event_handler = [];
|
|
@@ -56,7 +56,7 @@ exports.IVideoFrameObserver = t.iface([], {
|
|
|
56
56
|
"onTranscodedVideoFrame": t.opt(t.func("void", t.param("videoFrame", "VideoFrame"))),
|
|
57
57
|
});
|
|
58
58
|
exports.IMediaRecorderObserver = t.iface([], {
|
|
59
|
-
"onRecorderStateChanged": t.opt(t.func("void", t.param("channelId", "string"), t.param("uid", "number"), t.param("state", "RecorderState"), t.param("
|
|
59
|
+
"onRecorderStateChanged": t.opt(t.func("void", t.param("channelId", "string"), t.param("uid", "number"), t.param("state", "RecorderState"), t.param("reason", "RecorderReasonCode"))),
|
|
60
60
|
"onRecorderInfoUpdated": t.opt(t.func("void", t.param("channelId", "string"), t.param("uid", "number"), t.param("info", "RecorderInfo"))),
|
|
61
61
|
});
|
|
62
62
|
var exportedTypeSuite = {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.IH265TranscoderObserver = void 0;
|
|
27
|
+
/**
|
|
28
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
29
|
+
*/
|
|
30
|
+
var t = __importStar(require("ts-interface-checker"));
|
|
31
|
+
// tslint:disable:object-literal-key-quotes
|
|
32
|
+
exports.IH265TranscoderObserver = t.iface([], {
|
|
33
|
+
"onEnableTranscode": t.opt(t.func("void", t.param("result", "H265TranscodeResult"))),
|
|
34
|
+
"onQueryChannel": t.opt(t.func("void", t.param("result", "H265TranscodeResult"), t.param("originChannel", "string"), t.param("transcodeChannel", "string"))),
|
|
35
|
+
"onTriggerTranscode": t.opt(t.func("void", t.param("result", "H265TranscodeResult"))),
|
|
36
|
+
});
|
|
37
|
+
var exportedTypeSuite = {
|
|
38
|
+
IH265TranscoderObserver: exports.IH265TranscoderObserver,
|
|
39
|
+
};
|
|
40
|
+
exports.default = exportedTypeSuite;
|
|
@@ -30,8 +30,8 @@ exports.IMediaPlayerSourceObserver = void 0;
|
|
|
30
30
|
var t = __importStar(require("ts-interface-checker"));
|
|
31
31
|
// tslint:disable:object-literal-key-quotes
|
|
32
32
|
exports.IMediaPlayerSourceObserver = t.iface([], {
|
|
33
|
-
"onPlayerSourceStateChanged": t.opt(t.func("void", t.param("state", "MediaPlayerState"), t.param("
|
|
34
|
-
"onPositionChanged": t.opt(t.func("void", t.param("positionMs", "number"))),
|
|
33
|
+
"onPlayerSourceStateChanged": t.opt(t.func("void", t.param("state", "MediaPlayerState"), t.param("reason", "MediaPlayerReason"))),
|
|
34
|
+
"onPositionChanged": t.opt(t.func("void", t.param("positionMs", "number"), t.param("timestampMs", "number"))),
|
|
35
35
|
"onPlayerEvent": t.opt(t.func("void", t.param("eventCode", "MediaPlayerEvent"), t.param("elapsedTime", "number"), t.param("message", "string"))),
|
|
36
36
|
"onMetaData": t.opt(t.func("void", t.param("data", "Uint8Array"), t.param("length", "number"))),
|
|
37
37
|
"onPlayBufferUpdated": t.opt(t.func("void", t.param("playCachedBuffer", "number"))),
|
|
@@ -40,6 +40,8 @@ exports.IMediaPlayerSourceObserver = t.iface([], {
|
|
|
40
40
|
"onAgoraCDNTokenWillExpire": t.opt(t.func("void")),
|
|
41
41
|
"onPlayerSrcInfoChanged": t.opt(t.func("void", t.param("from", "SrcInfo"), t.param("to", "SrcInfo"))),
|
|
42
42
|
"onPlayerInfoUpdated": t.opt(t.func("void", t.param("info", "PlayerUpdatedInfo"))),
|
|
43
|
+
"onPlayerCacheStats": t.opt(t.func("void", t.param("stats", "CacheStatistics"))),
|
|
44
|
+
"onPlayerPlaybackStats": t.opt(t.func("void", t.param("stats", "PlayerPlaybackStats"))),
|
|
43
45
|
"onAudioVolumeIndication": t.opt(t.func("void", t.param("volume", "number"))),
|
|
44
46
|
});
|
|
45
47
|
var exportedTypeSuite = {
|
|
@@ -30,11 +30,11 @@ exports.IMusicContentCenterEventHandler = void 0;
|
|
|
30
30
|
var t = __importStar(require("ts-interface-checker"));
|
|
31
31
|
// tslint:disable:object-literal-key-quotes
|
|
32
32
|
exports.IMusicContentCenterEventHandler = t.iface([], {
|
|
33
|
-
"onMusicChartsResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("result", t.array("MusicChartInfo")), t.param("
|
|
34
|
-
"onMusicCollectionResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("result", "MusicCollection"), t.param("
|
|
35
|
-
"onLyricResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("songCode", "number"), t.param("lyricUrl", "string"), t.param("
|
|
36
|
-
"onSongSimpleInfoResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("songCode", "number"), t.param("simpleInfo", "string"), t.param("
|
|
37
|
-
"onPreLoadEvent": t.opt(t.func("void", t.param("requestId", "string"), t.param("songCode", "number"), t.param("percent", "number"), t.param("lyricUrl", "string"), t.param("
|
|
33
|
+
"onMusicChartsResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("result", t.array("MusicChartInfo")), t.param("reason", "MusicContentCenterStateReason"))),
|
|
34
|
+
"onMusicCollectionResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("result", "MusicCollection"), t.param("reason", "MusicContentCenterStateReason"))),
|
|
35
|
+
"onLyricResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("songCode", "number"), t.param("lyricUrl", "string"), t.param("reason", "MusicContentCenterStateReason"))),
|
|
36
|
+
"onSongSimpleInfoResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("songCode", "number"), t.param("simpleInfo", "string"), t.param("reason", "MusicContentCenterStateReason"))),
|
|
37
|
+
"onPreLoadEvent": t.opt(t.func("void", t.param("requestId", "string"), t.param("songCode", "number"), t.param("percent", "number"), t.param("lyricUrl", "string"), t.param("state", "PreloadState"), t.param("reason", "MusicContentCenterStateReason"))),
|
|
38
38
|
});
|
|
39
39
|
var exportedTypeSuite = {
|
|
40
40
|
IMusicContentCenterEventHandler: exports.IMusicContentCenterEventHandler,
|
|
@@ -53,7 +53,7 @@ exports.IRtcEngineEventHandler = t.iface([], {
|
|
|
53
53
|
"onFirstLocalVideoFramePublished": t.opt(t.func("void", t.param("source", "VideoSourceType"), t.param("elapsed", "number"))),
|
|
54
54
|
"onFirstRemoteVideoDecoded": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("width", "number"), t.param("height", "number"), t.param("elapsed", "number"))),
|
|
55
55
|
"onVideoSizeChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("sourceType", "VideoSourceType"), t.param("uid", "number"), t.param("width", "number"), t.param("height", "number"), t.param("rotation", "number"))),
|
|
56
|
-
"onLocalVideoStateChanged": t.opt(t.func("void", t.param("source", "VideoSourceType"), t.param("state", "LocalVideoStreamState"), t.param("
|
|
56
|
+
"onLocalVideoStateChanged": t.opt(t.func("void", t.param("source", "VideoSourceType"), t.param("state", "LocalVideoStreamState"), t.param("reason", "LocalVideoStreamReason"))),
|
|
57
57
|
"onRemoteVideoStateChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("state", "RemoteVideoState"), t.param("reason", "RemoteVideoStateReason"), t.param("elapsed", "number"))),
|
|
58
58
|
"onFirstRemoteVideoFrame": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("width", "number"), t.param("height", "number"), t.param("elapsed", "number"))),
|
|
59
59
|
"onUserJoined": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("elapsed", "number"))),
|
|
@@ -63,8 +63,8 @@ exports.IRtcEngineEventHandler = t.iface([], {
|
|
|
63
63
|
"onUserEnableVideo": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("enabled", "boolean"))),
|
|
64
64
|
"onUserStateChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("state", "number"))),
|
|
65
65
|
"onUserEnableLocalVideo": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("enabled", "boolean"))),
|
|
66
|
-
"onLocalAudioStats": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("stats", "LocalAudioStats"))),
|
|
67
66
|
"onRemoteAudioStats": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("stats", "RemoteAudioStats"))),
|
|
67
|
+
"onLocalAudioStats": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("stats", "LocalAudioStats"))),
|
|
68
68
|
"onLocalVideoStats": t.opt(t.func("void", t.param("source", "VideoSourceType"), t.param("stats", "LocalVideoStats"))),
|
|
69
69
|
"onRemoteVideoStats": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("stats", "RemoteVideoStats"))),
|
|
70
70
|
"onCameraReady": t.opt(t.func("void")),
|
|
@@ -73,7 +73,7 @@ exports.IRtcEngineEventHandler = t.iface([], {
|
|
|
73
73
|
"onFacePositionChanged": t.opt(t.func("void", t.param("imageWidth", "number"), t.param("imageHeight", "number"), t.param("vecRectangle", t.array("Rectangle")), t.param("vecDistance", t.array("number")), t.param("numFaces", "number"))),
|
|
74
74
|
"onVideoStopped": t.opt(t.func("void")),
|
|
75
75
|
"onAudioMixingStateChanged": t.opt(t.func("void", t.param("state", "AudioMixingStateType"), t.param("reason", "AudioMixingReasonType"))),
|
|
76
|
-
"onRhythmPlayerStateChanged": t.opt(t.func("void", t.param("state", "RhythmPlayerStateType"), t.param("
|
|
76
|
+
"onRhythmPlayerStateChanged": t.opt(t.func("void", t.param("state", "RhythmPlayerStateType"), t.param("reason", "RhythmPlayerReason"))),
|
|
77
77
|
"onConnectionLost": t.opt(t.func("void", t.param("connection", "RtcConnection"))),
|
|
78
78
|
"onConnectionInterrupted": t.opt(t.func("void", t.param("connection", "RtcConnection"))),
|
|
79
79
|
"onConnectionBanned": t.opt(t.func("void", t.param("connection", "RtcConnection"))),
|
|
@@ -83,9 +83,9 @@ exports.IRtcEngineEventHandler = t.iface([], {
|
|
|
83
83
|
"onTokenPrivilegeWillExpire": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("token", "string"))),
|
|
84
84
|
"onLicenseValidationFailure": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("reason", "LicenseErrorType"))),
|
|
85
85
|
"onFirstLocalAudioFramePublished": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("elapsed", "number"))),
|
|
86
|
-
"onFirstRemoteAudioFrame": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("userId", "number"), t.param("elapsed", "number"))),
|
|
87
86
|
"onFirstRemoteAudioDecoded": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("uid", "number"), t.param("elapsed", "number"))),
|
|
88
|
-
"
|
|
87
|
+
"onFirstRemoteAudioFrame": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("userId", "number"), t.param("elapsed", "number"))),
|
|
88
|
+
"onLocalAudioStateChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("state", "LocalAudioStreamState"), t.param("reason", "LocalAudioStreamReason"))),
|
|
89
89
|
"onRemoteAudioStateChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("state", "RemoteAudioState"), t.param("reason", "RemoteAudioStateReason"), t.param("elapsed", "number"))),
|
|
90
90
|
"onActiveSpeaker": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("uid", "number"))),
|
|
91
91
|
"onContentInspectResult": t.opt(t.func("void", t.param("result", "ContentInspectResult"))),
|
|
@@ -93,12 +93,11 @@ exports.IRtcEngineEventHandler = t.iface([], {
|
|
|
93
93
|
"onClientRoleChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("oldRole", "ClientRoleType"), t.param("newRole", "ClientRoleType"), t.param("newRoleOptions", "ClientRoleOptions"))),
|
|
94
94
|
"onClientRoleChangeFailed": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("reason", "ClientRoleChangeFailedReason"), t.param("currentRole", "ClientRoleType"))),
|
|
95
95
|
"onAudioDeviceVolumeChanged": t.opt(t.func("void", t.param("deviceType", "MediaDeviceType"), t.param("volume", "number"), t.param("muted", "boolean"))),
|
|
96
|
-
"onRtmpStreamingStateChanged": t.opt(t.func("void", t.param("url", "string"), t.param("state", "RtmpStreamPublishState"), t.param("
|
|
96
|
+
"onRtmpStreamingStateChanged": t.opt(t.func("void", t.param("url", "string"), t.param("state", "RtmpStreamPublishState"), t.param("reason", "RtmpStreamPublishReason"))),
|
|
97
97
|
"onRtmpStreamingEvent": t.opt(t.func("void", t.param("url", "string"), t.param("eventCode", "RtmpStreamingEvent"))),
|
|
98
98
|
"onTranscodingUpdated": t.opt(t.func("void")),
|
|
99
99
|
"onAudioRoutingChanged": t.opt(t.func("void", t.param("routing", "number"))),
|
|
100
100
|
"onChannelMediaRelayStateChanged": t.opt(t.func("void", t.param("state", "ChannelMediaRelayState"), t.param("code", "ChannelMediaRelayError"))),
|
|
101
|
-
"onChannelMediaRelayEvent": t.opt(t.func("void", t.param("code", "ChannelMediaRelayEvent"))),
|
|
102
101
|
"onLocalPublishFallbackToAudioOnly": t.opt(t.func("void", t.param("isFallbackOrRecover", "boolean"))),
|
|
103
102
|
"onRemoteSubscribeFallbackToAudioOnly": t.opt(t.func("void", t.param("uid", "number"), t.param("isFallbackOrRecover", "boolean"))),
|
|
104
103
|
"onRemoteAudioTransportStats": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("delay", "number"), t.param("lost", "number"), t.param("rxKBitRate", "number"))),
|
|
@@ -111,24 +110,26 @@ exports.IRtcEngineEventHandler = t.iface([], {
|
|
|
111
110
|
"onPermissionError": t.opt(t.func("void", t.param("permissionType", "PermissionType"))),
|
|
112
111
|
"onLocalUserRegistered": t.opt(t.func("void", t.param("uid", "number"), t.param("userAccount", "string"))),
|
|
113
112
|
"onUserInfoUpdated": t.opt(t.func("void", t.param("uid", "number"), t.param("info", "UserInfo"))),
|
|
113
|
+
"onUserAccountUpdated": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("remoteUserAccount", "string"))),
|
|
114
|
+
"onVideoRenderingTracingResult": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("uid", "number"), t.param("currentEvent", "MediaTraceEvent"), t.param("tracingInfo", "VideoRenderingTracingInfo"))),
|
|
115
|
+
"onLocalVideoTranscoderError": t.opt(t.func("void", t.param("stream", "TranscodingVideoStream"), t.param("error", "VideoTranscoderError"))),
|
|
114
116
|
"onUploadLogResult": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("requestId", "string"), t.param("success", "boolean"), t.param("reason", "UploadErrorReason"))),
|
|
115
117
|
"onAudioSubscribeStateChanged": t.opt(t.func("void", t.param("channel", "string"), t.param("uid", "number"), t.param("oldState", "StreamSubscribeState"), t.param("newState", "StreamSubscribeState"), t.param("elapseSinceLastState", "number"))),
|
|
116
118
|
"onVideoSubscribeStateChanged": t.opt(t.func("void", t.param("channel", "string"), t.param("uid", "number"), t.param("oldState", "StreamSubscribeState"), t.param("newState", "StreamSubscribeState"), t.param("elapseSinceLastState", "number"))),
|
|
117
119
|
"onAudioPublishStateChanged": t.opt(t.func("void", t.param("channel", "string"), t.param("oldState", "StreamPublishState"), t.param("newState", "StreamPublishState"), t.param("elapseSinceLastState", "number"))),
|
|
118
120
|
"onVideoPublishStateChanged": t.opt(t.func("void", t.param("source", "VideoSourceType"), t.param("channel", "string"), t.param("oldState", "StreamPublishState"), t.param("newState", "StreamPublishState"), t.param("elapseSinceLastState", "number"))),
|
|
121
|
+
"onTranscodedStreamLayoutInfo": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("uid", "number"), t.param("width", "number"), t.param("height", "number"), t.param("layoutCount", "number"), t.param("layoutlist", t.array("VideoLayout")))),
|
|
119
122
|
"onExtensionEvent": t.opt(t.func("void", t.param("provider", "string"), t.param("extension", "string"), t.param("key", "string"), t.param("value", "string"))),
|
|
120
123
|
"onExtensionStarted": t.opt(t.func("void", t.param("provider", "string"), t.param("extension", "string"))),
|
|
121
124
|
"onExtensionStopped": t.opt(t.func("void", t.param("provider", "string"), t.param("extension", "string"))),
|
|
122
125
|
"onExtensionError": t.opt(t.func("void", t.param("provider", "string"), t.param("extension", "string"), t.param("error", "number"), t.param("message", "string"))),
|
|
123
|
-
"
|
|
124
|
-
"onLocalVideoTranscoderError": t.opt(t.func("void", t.param("stream", "TranscodingVideoStream"), t.param("error", "VideoTranscoderError"))),
|
|
125
|
-
"onVideoRenderingTracingResult": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("uid", "number"), t.param("currentEvent", "MediaTraceEvent"), t.param("tracingInfo", "VideoRenderingTracingInfo"))),
|
|
126
|
+
"onSetRtmFlagResult": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("code", "number"))),
|
|
126
127
|
});
|
|
127
128
|
exports.IMetadataObserver = t.iface([], {
|
|
128
129
|
"onMetadataReceived": t.opt(t.func("void", t.param("metadata", "Metadata"))),
|
|
129
130
|
});
|
|
130
131
|
exports.IDirectCdnStreamingEventHandler = t.iface([], {
|
|
131
|
-
"onDirectCdnStreamingStateChanged": t.opt(t.func("void", t.param("state", "DirectCdnStreamingState"), t.param("
|
|
132
|
+
"onDirectCdnStreamingStateChanged": t.opt(t.func("void", t.param("state", "DirectCdnStreamingState"), t.param("reason", "DirectCdnStreamingReason"), t.param("message", "string"))),
|
|
132
133
|
"onDirectCdnStreamingStats": t.opt(t.func("void", t.param("stats", "DirectCdnStreamingStats"))),
|
|
133
134
|
});
|
|
134
135
|
var exportedTypeSuite = {
|