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
|
@@ -104,10 +104,6 @@ export class MusicContentCenterInternal extends IMusicContentCenterImpl {
|
|
|
104
104
|
const mediaPlayerId = super.createMusicPlayer() as number;
|
|
105
105
|
return new MusicPlayerInternal(mediaPlayerId);
|
|
106
106
|
}
|
|
107
|
-
|
|
108
|
-
protected getApiTypeFromPreload(songCode: number): string {
|
|
109
|
-
return 'MusicContentCenter_preload2';
|
|
110
|
-
}
|
|
111
107
|
}
|
|
112
108
|
|
|
113
109
|
class _MusicPlayerInternal extends IMusicPlayerImpl {
|
|
@@ -126,7 +122,7 @@ class _MusicPlayerInternal extends IMusicPlayerImpl {
|
|
|
126
122
|
songCode: number,
|
|
127
123
|
startPos = 0
|
|
128
124
|
): string {
|
|
129
|
-
return '
|
|
125
|
+
return 'MusicPlayer_open_303b92e';
|
|
130
126
|
}
|
|
131
127
|
}
|
|
132
128
|
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { createCheckers } from 'ts-interface-checker';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { AgoraEnv } from '../../Utils';
|
|
3
|
+
import { AgoraEnv, logError } from '../../Utils';
|
|
5
4
|
import {
|
|
6
5
|
AudioEncodedFrameObserverConfig,
|
|
7
|
-
AudioRecordingConfiguration,
|
|
8
6
|
ClientRoleOptions,
|
|
9
7
|
ClientRoleType,
|
|
10
|
-
DataStreamConfig,
|
|
11
|
-
EchoTestConfiguration,
|
|
12
8
|
ErrorCodeType,
|
|
13
9
|
IAudioEncodedFrameObserver,
|
|
14
10
|
RecorderStreamInfo,
|
|
@@ -16,13 +12,13 @@ import {
|
|
|
16
12
|
SimulcastStreamMode,
|
|
17
13
|
VideoCanvas,
|
|
18
14
|
VideoMirrorModeType,
|
|
19
|
-
WatermarkOptions,
|
|
20
15
|
} from '../AgoraBase';
|
|
21
16
|
import {
|
|
22
17
|
IAudioSpectrumObserver,
|
|
23
18
|
RenderModeType,
|
|
24
19
|
VideoSourceType,
|
|
25
20
|
} from '../AgoraMediaBase';
|
|
21
|
+
import { IH265Transcoder } from '../IAgoraH265Transcoder';
|
|
26
22
|
import { IMediaEngine } from '../IAgoraMediaEngine';
|
|
27
23
|
import { IMediaPlayer } from '../IAgoraMediaPlayer';
|
|
28
24
|
import { IMediaRecorder } from '../IAgoraMediaRecorder';
|
|
@@ -52,6 +48,7 @@ import AgoraBaseTI from '../ti/AgoraBase-ti';
|
|
|
52
48
|
import AgoraMediaBaseTI from '../ti/AgoraMediaBase-ti';
|
|
53
49
|
import IAgoraRtcEngineTI from '../ti/IAgoraRtcEngine-ti';
|
|
54
50
|
|
|
51
|
+
import { H265TranscoderInternal } from './AgoraH265TranscoderInternal';
|
|
55
52
|
import { AudioDeviceManagerInternal } from './AudioDeviceManagerInternal';
|
|
56
53
|
import {
|
|
57
54
|
DeviceEventEmitter,
|
|
@@ -87,6 +84,7 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
|
|
|
87
84
|
new MusicContentCenterInternal();
|
|
88
85
|
private _local_spatial_audio_engine: ILocalSpatialAudioEngine =
|
|
89
86
|
new LocalSpatialAudioEngineInternal();
|
|
87
|
+
private _h265_transcoder: IH265Transcoder = new H265TranscoderInternal();
|
|
90
88
|
|
|
91
89
|
override initialize(context: RtcEngineContext): number {
|
|
92
90
|
if (AgoraEnv.webEnvReady) {
|
|
@@ -97,7 +95,6 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
|
|
|
97
95
|
AgoraEnv.AgoraRendererManager = new RendererManager();
|
|
98
96
|
}
|
|
99
97
|
}
|
|
100
|
-
AgoraEnv.AgoraRendererManager?.enableRender();
|
|
101
98
|
const ret = super.initialize(context);
|
|
102
99
|
callIrisApi.call(this, 'RtcEngine_setAppType', {
|
|
103
100
|
appType: 3,
|
|
@@ -107,7 +104,7 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
|
|
|
107
104
|
|
|
108
105
|
override release(sync: boolean = false) {
|
|
109
106
|
AgoraEnv.AgoraElectronBridge.ReleaseRenderer();
|
|
110
|
-
AgoraEnv.AgoraRendererManager?.
|
|
107
|
+
AgoraEnv.AgoraRendererManager?.release();
|
|
111
108
|
AgoraEnv.AgoraRendererManager = undefined;
|
|
112
109
|
this._audio_device_manager.release();
|
|
113
110
|
this._video_device_manager.release();
|
|
@@ -123,6 +120,7 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
|
|
|
123
120
|
MediaPlayerInternal._video_frame_observers.clear();
|
|
124
121
|
MediaPlayerInternal._audio_spectrum_observers.clear();
|
|
125
122
|
MediaRecorderInternal._observers.clear();
|
|
123
|
+
this._h265_transcoder.release();
|
|
126
124
|
this.removeAllListeners();
|
|
127
125
|
super.release(sync);
|
|
128
126
|
}
|
|
@@ -145,7 +143,7 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
|
|
|
145
143
|
if (
|
|
146
144
|
RtcEngineExInternal._direct_cdn_streaming_event_handler.length === 0
|
|
147
145
|
) {
|
|
148
|
-
|
|
146
|
+
logError(
|
|
149
147
|
'Please call `startDirectCdnStreaming` before you want to receive event by `addListener`'
|
|
150
148
|
);
|
|
151
149
|
return false;
|
|
@@ -157,7 +155,7 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
|
|
|
157
155
|
})
|
|
158
156
|
) {
|
|
159
157
|
if (RtcEngineExInternal._metadata_observer.length === 0) {
|
|
160
|
-
|
|
158
|
+
logError(
|
|
161
159
|
'Please call `registerMediaMetadataObserver` before you want to receive event by `addListener`'
|
|
162
160
|
);
|
|
163
161
|
return false;
|
|
@@ -169,7 +167,7 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
|
|
|
169
167
|
})
|
|
170
168
|
) {
|
|
171
169
|
if (RtcEngineExInternal._audio_encoded_frame_observers.length === 0) {
|
|
172
|
-
|
|
170
|
+
logError(
|
|
173
171
|
'Please call `registerAudioEncodedFrameObserver` before you want to receive event by `addListener`'
|
|
174
172
|
);
|
|
175
173
|
return false;
|
|
@@ -190,7 +188,7 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
|
|
|
190
188
|
addListener<EventType extends keyof IRtcEngineEvent>(
|
|
191
189
|
eventType: EventType,
|
|
192
190
|
listener: IRtcEngineEvent[EventType]
|
|
193
|
-
)
|
|
191
|
+
) {
|
|
194
192
|
this._addListenerPreCheck(eventType);
|
|
195
193
|
const callback = (eventProcessor: EventProcessor<any>, data: any) => {
|
|
196
194
|
if (eventProcessor.type(data) !== EVENT_TYPE.IRtcEngine) {
|
|
@@ -223,7 +221,7 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
|
|
|
223
221
|
}
|
|
224
222
|
|
|
225
223
|
override getVersion(): SDKBuildInfo {
|
|
226
|
-
const apiType = '
|
|
224
|
+
const apiType = 'RtcEngine_getVersion_915cb25';
|
|
227
225
|
const jsonParams = {};
|
|
228
226
|
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
229
227
|
return {
|
|
@@ -326,9 +324,11 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
|
|
|
326
324
|
options: ChannelMediaOptions
|
|
327
325
|
): string {
|
|
328
326
|
if (AgoraEnv.AgoraRendererManager) {
|
|
329
|
-
AgoraEnv.AgoraRendererManager.
|
|
327
|
+
AgoraEnv.AgoraRendererManager.defaultChannelId = channelId;
|
|
330
328
|
}
|
|
331
|
-
return
|
|
329
|
+
return options === undefined
|
|
330
|
+
? 'RtcEngine_joinChannel_f097389'
|
|
331
|
+
: 'RtcEngine_joinChannel_cdbb747';
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
protected override getApiTypeFromLeaveChannel(
|
|
@@ -336,7 +336,7 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
|
|
|
336
336
|
): string {
|
|
337
337
|
return options === undefined
|
|
338
338
|
? 'RtcEngine_leaveChannel'
|
|
339
|
-
: '
|
|
339
|
+
: 'RtcEngine_leaveChannel_2c0e3aa';
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
protected override getApiTypeFromSetClientRole(
|
|
@@ -344,41 +344,12 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
|
|
|
344
344
|
options?: ClientRoleOptions
|
|
345
345
|
): string {
|
|
346
346
|
return options === undefined
|
|
347
|
-
? '
|
|
348
|
-
: '
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
protected override getApiTypeFromStartEchoTest(
|
|
352
|
-
config: EchoTestConfiguration
|
|
353
|
-
): string {
|
|
354
|
-
return 'RtcEngine_startEchoTest3';
|
|
347
|
+
? 'RtcEngine_setClientRole_3426fa6'
|
|
348
|
+
: 'RtcEngine_setClientRole_b46cc48';
|
|
355
349
|
}
|
|
356
350
|
|
|
357
|
-
protected override
|
|
358
|
-
|
|
359
|
-
): string {
|
|
360
|
-
return 'RtcEngine_startPreview2';
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
protected override getApiTypeFromStopPreview(
|
|
364
|
-
sourceType: VideoSourceType = VideoSourceType.VideoSourceCameraPrimary
|
|
365
|
-
): string {
|
|
366
|
-
return 'RtcEngine_stopPreview2';
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
protected override getApiTypeFromStartAudioRecording(
|
|
370
|
-
config: AudioRecordingConfiguration
|
|
371
|
-
): string {
|
|
372
|
-
return 'RtcEngine_startAudioRecording3';
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
protected override getApiTypeFromStartAudioMixing(
|
|
376
|
-
filePath: string,
|
|
377
|
-
loopback: boolean,
|
|
378
|
-
cycle: number,
|
|
379
|
-
startPos: number = 0
|
|
380
|
-
): string {
|
|
381
|
-
return 'RtcEngine_startAudioMixing2';
|
|
351
|
+
protected override getApiTypeFromStartPreviewWithoutSourceType(): string {
|
|
352
|
+
return 'RtcEngine_startPreview';
|
|
382
353
|
}
|
|
383
354
|
|
|
384
355
|
protected override getApiTypeFromEnableDualStreamMode(
|
|
@@ -386,8 +357,8 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
|
|
|
386
357
|
streamConfig?: SimulcastStreamConfig
|
|
387
358
|
): string {
|
|
388
359
|
return streamConfig === undefined
|
|
389
|
-
? '
|
|
390
|
-
: '
|
|
360
|
+
? 'RtcEngine_enableDualStreamMode_5039d15'
|
|
361
|
+
: 'RtcEngine_enableDualStreamMode_9822d8a';
|
|
391
362
|
}
|
|
392
363
|
|
|
393
364
|
protected override getApiTypeFromSetDualStreamMode(
|
|
@@ -395,28 +366,8 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
|
|
|
395
366
|
streamConfig?: SimulcastStreamConfig
|
|
396
367
|
): string {
|
|
397
368
|
return streamConfig === undefined
|
|
398
|
-
? '
|
|
399
|
-
: '
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
protected override getApiTypeFromLeaveChannelEx(
|
|
403
|
-
connection: RtcConnection,
|
|
404
|
-
options?: LeaveChannelOptions
|
|
405
|
-
): string {
|
|
406
|
-
return 'RtcEngineEx_leaveChannelEx2';
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
protected override getApiTypeFromCreateDataStream(
|
|
410
|
-
config: DataStreamConfig
|
|
411
|
-
): string {
|
|
412
|
-
return 'RtcEngine_createDataStream2';
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
protected override getApiTypeFromAddVideoWatermark(
|
|
416
|
-
watermarkUrl: string,
|
|
417
|
-
options: WatermarkOptions
|
|
418
|
-
): string {
|
|
419
|
-
return 'RtcEngine_addVideoWatermark2';
|
|
369
|
+
? 'RtcEngine_setDualStreamMode_3a7f662'
|
|
370
|
+
: 'RtcEngine_setDualStreamMode_b3a4f6c';
|
|
420
371
|
}
|
|
421
372
|
|
|
422
373
|
protected override getApiTypeFromJoinChannelWithUserAccount(
|
|
@@ -426,31 +377,24 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
|
|
|
426
377
|
options?: ChannelMediaOptions
|
|
427
378
|
): string {
|
|
428
379
|
if (AgoraEnv.AgoraRendererManager) {
|
|
429
|
-
AgoraEnv.AgoraRendererManager.
|
|
380
|
+
AgoraEnv.AgoraRendererManager.defaultChannelId = channelId;
|
|
430
381
|
}
|
|
431
382
|
return options === undefined
|
|
432
|
-
? '
|
|
433
|
-
: '
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
protected override getApiTypeFromCreateDataStreamEx(
|
|
437
|
-
config: DataStreamConfig,
|
|
438
|
-
connection: RtcConnection
|
|
439
|
-
): string {
|
|
440
|
-
return 'RtcEngineEx_createDataStreamEx2';
|
|
383
|
+
? 'RtcEngine_joinChannelWithUserAccount_0e4f59e'
|
|
384
|
+
: 'RtcEngine_joinChannelWithUserAccount_4685af9';
|
|
441
385
|
}
|
|
442
386
|
|
|
443
387
|
protected override getApiTypeFromStartScreenCaptureBySourceType(
|
|
444
388
|
sourceType: VideoSourceType,
|
|
445
389
|
config: ScreenCaptureConfiguration
|
|
446
390
|
): string {
|
|
447
|
-
return '
|
|
391
|
+
return 'RtcEngine_startScreenCapture_9ebb320';
|
|
448
392
|
}
|
|
449
393
|
|
|
450
394
|
protected override getApiTypeFromStopScreenCaptureBySourceType(
|
|
451
395
|
sourceType: VideoSourceType
|
|
452
396
|
): string {
|
|
453
|
-
return '
|
|
397
|
+
return 'RtcEngine_stopScreenCapture_4fd718e';
|
|
454
398
|
}
|
|
455
399
|
|
|
456
400
|
protected override getApiTypeFromPreloadChannelWithUserAccount(
|
|
@@ -458,7 +402,7 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
|
|
|
458
402
|
channelId: string,
|
|
459
403
|
userAccount: string
|
|
460
404
|
): string {
|
|
461
|
-
return '
|
|
405
|
+
return 'RtcEngine_preloadChannel_a0779eb';
|
|
462
406
|
}
|
|
463
407
|
|
|
464
408
|
override getAudioDeviceManager(): IAudioDeviceManager {
|
|
@@ -481,6 +425,10 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
|
|
|
481
425
|
return this._local_spatial_audio_engine;
|
|
482
426
|
}
|
|
483
427
|
|
|
428
|
+
override getH265Transcoder(): IH265Transcoder {
|
|
429
|
+
return this._h265_transcoder;
|
|
430
|
+
}
|
|
431
|
+
|
|
484
432
|
override registerAudioEncodedFrameObserver(
|
|
485
433
|
config: AudioEncodedFrameObserverConfig,
|
|
486
434
|
observer: IAudioEncodedFrameObserver
|
|
@@ -579,98 +527,44 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
|
|
|
579
527
|
}
|
|
580
528
|
|
|
581
529
|
override setupLocalVideo(canvas: VideoCanvas): number {
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
view,
|
|
587
|
-
renderMode,
|
|
588
|
-
mirrorMode,
|
|
589
|
-
} = canvas;
|
|
590
|
-
if (
|
|
591
|
-
sourceType === VideoSourceType.VideoSourceMediaPlayer &&
|
|
592
|
-
mediaPlayerId !== undefined
|
|
593
|
-
) {
|
|
594
|
-
uid = mediaPlayerId;
|
|
595
|
-
}
|
|
596
|
-
return (
|
|
597
|
-
AgoraEnv.AgoraRendererManager?.setupLocalVideo({
|
|
598
|
-
videoSourceType: sourceType,
|
|
599
|
-
channelId: '',
|
|
600
|
-
uid,
|
|
601
|
-
view,
|
|
602
|
-
rendererOptions: {
|
|
603
|
-
contentMode: renderMode,
|
|
604
|
-
mirror: mirrorMode === VideoMirrorModeType.VideoMirrorModeEnabled,
|
|
605
|
-
},
|
|
606
|
-
}) ?? -ErrorCodeType.ErrNotInitialized
|
|
607
|
-
);
|
|
530
|
+
if (!AgoraEnv.AgoraRendererManager) return -ErrorCodeType.ErrNotInitialized;
|
|
531
|
+
const renderer = AgoraEnv.AgoraRendererManager.addOrRemoveRenderer(canvas);
|
|
532
|
+
if (!renderer) return -ErrorCodeType.ErrFailed;
|
|
533
|
+
return ErrorCodeType.ErrOk;
|
|
608
534
|
}
|
|
609
535
|
|
|
610
536
|
override setupRemoteVideo(canvas: VideoCanvas): number {
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
renderMode,
|
|
616
|
-
mirrorMode,
|
|
617
|
-
} = canvas;
|
|
618
|
-
return (
|
|
619
|
-
AgoraEnv.AgoraRendererManager?.setupRemoteVideo({
|
|
620
|
-
videoSourceType: sourceType,
|
|
621
|
-
channelId:
|
|
622
|
-
AgoraEnv.AgoraRendererManager?.defaultRenderConfig?.channelId,
|
|
623
|
-
uid,
|
|
624
|
-
view,
|
|
625
|
-
rendererOptions: {
|
|
626
|
-
contentMode: renderMode,
|
|
627
|
-
mirror: mirrorMode === VideoMirrorModeType.VideoMirrorModeEnabled,
|
|
628
|
-
},
|
|
629
|
-
}) ?? -ErrorCodeType.ErrNotInitialized
|
|
630
|
-
);
|
|
537
|
+
if (!AgoraEnv.AgoraRendererManager) return -ErrorCodeType.ErrNotInitialized;
|
|
538
|
+
const renderer = AgoraEnv.AgoraRendererManager.addOrRemoveRenderer(canvas);
|
|
539
|
+
if (!renderer) return -ErrorCodeType.ErrFailed;
|
|
540
|
+
return ErrorCodeType.ErrOk;
|
|
631
541
|
}
|
|
632
542
|
|
|
633
543
|
override setupRemoteVideoEx(
|
|
634
544
|
canvas: VideoCanvas,
|
|
635
545
|
connection: RtcConnection
|
|
636
546
|
): number {
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
const { channelId } = connection;
|
|
645
|
-
return (
|
|
646
|
-
AgoraEnv.AgoraRendererManager?.setupRemoteVideo({
|
|
647
|
-
videoSourceType: sourceType,
|
|
648
|
-
channelId,
|
|
649
|
-
uid,
|
|
650
|
-
view,
|
|
651
|
-
rendererOptions: {
|
|
652
|
-
contentMode: renderMode,
|
|
653
|
-
mirror: mirrorMode === VideoMirrorModeType.VideoMirrorModeEnabled,
|
|
654
|
-
},
|
|
655
|
-
}) ?? -ErrorCodeType.ErrNotInitialized
|
|
656
|
-
);
|
|
547
|
+
if (!AgoraEnv.AgoraRendererManager) return -ErrorCodeType.ErrNotInitialized;
|
|
548
|
+
const renderer = AgoraEnv.AgoraRendererManager.addOrRemoveRenderer({
|
|
549
|
+
...canvas,
|
|
550
|
+
...connection,
|
|
551
|
+
});
|
|
552
|
+
if (!renderer) return -ErrorCodeType.ErrFailed;
|
|
553
|
+
return ErrorCodeType.ErrOk;
|
|
657
554
|
}
|
|
658
555
|
|
|
659
556
|
override setLocalRenderMode(
|
|
660
557
|
renderMode: RenderModeType,
|
|
661
558
|
mirrorMode: VideoMirrorModeType = VideoMirrorModeType.VideoMirrorModeAuto
|
|
662
559
|
): number {
|
|
663
|
-
return
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
},
|
|
672
|
-
}) ?? -ErrorCodeType.ErrNotInitialized
|
|
673
|
-
);
|
|
560
|
+
if (!AgoraEnv.AgoraRendererManager) return -ErrorCodeType.ErrNotInitialized;
|
|
561
|
+
const result = AgoraEnv.AgoraRendererManager.setRendererContext({
|
|
562
|
+
sourceType: VideoSourceType.VideoSourceCamera,
|
|
563
|
+
renderMode,
|
|
564
|
+
mirrorMode,
|
|
565
|
+
});
|
|
566
|
+
if (!result) return -ErrorCodeType.ErrFailed;
|
|
567
|
+
return ErrorCodeType.ErrOk;
|
|
674
568
|
}
|
|
675
569
|
|
|
676
570
|
override setRemoteRenderMode(
|
|
@@ -678,17 +572,15 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
|
|
|
678
572
|
renderMode: RenderModeType,
|
|
679
573
|
mirrorMode: VideoMirrorModeType
|
|
680
574
|
): number {
|
|
681
|
-
return
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
}) ?? -ErrorCodeType.ErrNotInitialized
|
|
691
|
-
);
|
|
575
|
+
if (!AgoraEnv.AgoraRendererManager) return -ErrorCodeType.ErrNotInitialized;
|
|
576
|
+
const result = AgoraEnv.AgoraRendererManager.setRendererContext({
|
|
577
|
+
sourceType: VideoSourceType.VideoSourceRemote,
|
|
578
|
+
uid,
|
|
579
|
+
renderMode,
|
|
580
|
+
mirrorMode,
|
|
581
|
+
});
|
|
582
|
+
if (!result) return -ErrorCodeType.ErrFailed;
|
|
583
|
+
return ErrorCodeType.ErrOk;
|
|
692
584
|
}
|
|
693
585
|
|
|
694
586
|
override setRemoteRenderModeEx(
|
|
@@ -697,46 +589,41 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
|
|
|
697
589
|
mirrorMode: VideoMirrorModeType,
|
|
698
590
|
connection: RtcConnection
|
|
699
591
|
): number {
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
}) ?? -ErrorCodeType.ErrNotInitialized
|
|
711
|
-
);
|
|
592
|
+
if (!AgoraEnv.AgoraRendererManager) return -ErrorCodeType.ErrNotInitialized;
|
|
593
|
+
const result = AgoraEnv.AgoraRendererManager.setRendererContext({
|
|
594
|
+
sourceType: VideoSourceType.VideoSourceRemote,
|
|
595
|
+
...connection,
|
|
596
|
+
uid,
|
|
597
|
+
renderMode,
|
|
598
|
+
mirrorMode,
|
|
599
|
+
});
|
|
600
|
+
if (!result) return -ErrorCodeType.ErrFailed;
|
|
601
|
+
return ErrorCodeType.ErrOk;
|
|
712
602
|
}
|
|
713
603
|
|
|
714
604
|
override setLocalVideoMirrorMode(mirrorMode: VideoMirrorModeType): number {
|
|
715
|
-
return
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
},
|
|
723
|
-
}) ?? -ErrorCodeType.ErrNotInitialized
|
|
724
|
-
);
|
|
605
|
+
if (!AgoraEnv.AgoraRendererManager) return -ErrorCodeType.ErrNotInitialized;
|
|
606
|
+
const result = AgoraEnv.AgoraRendererManager.setRendererContext({
|
|
607
|
+
sourceType: VideoSourceType.VideoSourceCamera,
|
|
608
|
+
mirrorMode,
|
|
609
|
+
});
|
|
610
|
+
if (!result) return -ErrorCodeType.ErrFailed;
|
|
611
|
+
return ErrorCodeType.ErrOk;
|
|
725
612
|
}
|
|
726
613
|
|
|
727
|
-
override destroyRendererByView(view:
|
|
728
|
-
AgoraEnv.AgoraRendererManager?.
|
|
614
|
+
override destroyRendererByView(view: Element) {
|
|
615
|
+
AgoraEnv.AgoraRendererManager?.removeRendererFromCache({ view });
|
|
729
616
|
}
|
|
730
617
|
|
|
731
618
|
override destroyRendererByConfig(
|
|
732
|
-
|
|
733
|
-
channelId?:
|
|
619
|
+
sourceType: VideoSourceType,
|
|
620
|
+
channelId?: string,
|
|
734
621
|
uid?: number
|
|
735
622
|
) {
|
|
736
|
-
AgoraEnv.AgoraRendererManager?.
|
|
737
|
-
|
|
623
|
+
AgoraEnv.AgoraRendererManager?.removeRendererFromCache({
|
|
624
|
+
sourceType,
|
|
738
625
|
channelId,
|
|
739
|
-
uid
|
|
740
|
-
);
|
|
626
|
+
uid,
|
|
627
|
+
});
|
|
741
628
|
}
|
|
742
629
|
}
|
|
@@ -37,7 +37,7 @@ export const IVideoFrameObserver = t.iface([], {
|
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
export const IMediaRecorderObserver = t.iface([], {
|
|
40
|
-
"onRecorderStateChanged": t.opt(t.func("void", t.param("channelId", "string"), t.param("uid", "number"), t.param("state", "RecorderState"), t.param("
|
|
40
|
+
"onRecorderStateChanged": t.opt(t.func("void", t.param("channelId", "string"), t.param("uid", "number"), t.param("state", "RecorderState"), t.param("reason", "RecorderReasonCode"))),
|
|
41
41
|
"onRecorderInfoUpdated": t.opt(t.func("void", t.param("channelId", "string"), t.param("uid", "number"), t.param("info", "RecorderInfo"))),
|
|
42
42
|
});
|
|
43
43
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
3
|
+
*/
|
|
4
|
+
import * as t from "ts-interface-checker";
|
|
5
|
+
// tslint:disable:object-literal-key-quotes
|
|
6
|
+
|
|
7
|
+
export const IH265TranscoderObserver = t.iface([], {
|
|
8
|
+
"onEnableTranscode": t.opt(t.func("void", t.param("result", "H265TranscodeResult"))),
|
|
9
|
+
"onQueryChannel": t.opt(t.func("void", t.param("result", "H265TranscodeResult"), t.param("originChannel", "string"), t.param("transcodeChannel", "string"))),
|
|
10
|
+
"onTriggerTranscode": t.opt(t.func("void", t.param("result", "H265TranscodeResult"))),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const exportedTypeSuite: t.ITypeSuite = {
|
|
14
|
+
IH265TranscoderObserver,
|
|
15
|
+
};
|
|
16
|
+
export default exportedTypeSuite;
|
|
@@ -5,8 +5,8 @@ import * as t from "ts-interface-checker";
|
|
|
5
5
|
// tslint:disable:object-literal-key-quotes
|
|
6
6
|
|
|
7
7
|
export const IMediaPlayerSourceObserver = t.iface([], {
|
|
8
|
-
"onPlayerSourceStateChanged": t.opt(t.func("void", t.param("state", "MediaPlayerState"), t.param("
|
|
9
|
-
"onPositionChanged": t.opt(t.func("void", t.param("positionMs", "number"))),
|
|
8
|
+
"onPlayerSourceStateChanged": t.opt(t.func("void", t.param("state", "MediaPlayerState"), t.param("reason", "MediaPlayerReason"))),
|
|
9
|
+
"onPositionChanged": t.opt(t.func("void", t.param("positionMs", "number"), t.param("timestampMs", "number"))),
|
|
10
10
|
"onPlayerEvent": t.opt(t.func("void", t.param("eventCode", "MediaPlayerEvent"), t.param("elapsedTime", "number"), t.param("message", "string"))),
|
|
11
11
|
"onMetaData": t.opt(t.func("void", t.param("data", "Uint8Array"), t.param("length", "number"))),
|
|
12
12
|
"onPlayBufferUpdated": t.opt(t.func("void", t.param("playCachedBuffer", "number"))),
|
|
@@ -15,6 +15,8 @@ export const IMediaPlayerSourceObserver = t.iface([], {
|
|
|
15
15
|
"onAgoraCDNTokenWillExpire": t.opt(t.func("void")),
|
|
16
16
|
"onPlayerSrcInfoChanged": t.opt(t.func("void", t.param("from", "SrcInfo"), t.param("to", "SrcInfo"))),
|
|
17
17
|
"onPlayerInfoUpdated": t.opt(t.func("void", t.param("info", "PlayerUpdatedInfo"))),
|
|
18
|
+
"onPlayerCacheStats": t.opt(t.func("void", t.param("stats", "CacheStatistics"))),
|
|
19
|
+
"onPlayerPlaybackStats": t.opt(t.func("void", t.param("stats", "PlayerPlaybackStats"))),
|
|
18
20
|
"onAudioVolumeIndication": t.opt(t.func("void", t.param("volume", "number"))),
|
|
19
21
|
});
|
|
20
22
|
|
|
@@ -5,11 +5,11 @@ import * as t from "ts-interface-checker";
|
|
|
5
5
|
// tslint:disable:object-literal-key-quotes
|
|
6
6
|
|
|
7
7
|
export const IMusicContentCenterEventHandler = t.iface([], {
|
|
8
|
-
"onMusicChartsResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("result", t.array("MusicChartInfo")), t.param("
|
|
9
|
-
"onMusicCollectionResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("result", "MusicCollection"), t.param("
|
|
10
|
-
"onLyricResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("songCode", "number"), t.param("lyricUrl", "string"), t.param("
|
|
11
|
-
"onSongSimpleInfoResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("songCode", "number"), t.param("simpleInfo", "string"), t.param("
|
|
12
|
-
"onPreLoadEvent": t.opt(t.func("void", t.param("requestId", "string"), t.param("songCode", "number"), t.param("percent", "number"), t.param("lyricUrl", "string"), t.param("
|
|
8
|
+
"onMusicChartsResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("result", t.array("MusicChartInfo")), t.param("reason", "MusicContentCenterStateReason"))),
|
|
9
|
+
"onMusicCollectionResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("result", "MusicCollection"), t.param("reason", "MusicContentCenterStateReason"))),
|
|
10
|
+
"onLyricResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("songCode", "number"), t.param("lyricUrl", "string"), t.param("reason", "MusicContentCenterStateReason"))),
|
|
11
|
+
"onSongSimpleInfoResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("songCode", "number"), t.param("simpleInfo", "string"), t.param("reason", "MusicContentCenterStateReason"))),
|
|
12
|
+
"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"))),
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
const exportedTypeSuite: t.ITypeSuite = {
|