agora-electron-sdk 4.2.0-dev.5 → 4.2.0-dev.8
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/js/AgoraSdk.js +4 -2
- package/js/Private/AgoraBase.js +1154 -6
- package/js/Private/AgoraMediaBase.js +308 -0
- package/js/Private/AgoraMediaPlayerTypes.js +112 -0
- package/js/Private/IAgoraLog.js +12 -0
- package/js/Private/IAgoraMediaStreamingSource.js +10 -0
- package/js/Private/IAgoraMusicContentCenter.js +104 -0
- package/js/Private/IAgoraRhythmPlayer.js +8 -0
- package/js/Private/IAgoraRtcEngine.js +843 -0
- package/js/Private/IAgoraRtcEngineEx.js +8 -0
- package/js/Private/IAgoraSpatialAudio.js +44 -0
- package/js/Private/impl/IAgoraMediaPlayerImpl.js +59 -59
- package/js/Private/impl/IAgoraRtcEngineImpl.js +55 -46
- package/js/Private/internal/IrisApiEngine.js +7 -12
- package/js/Private/internal/MediaEngineInternal.js +7 -11
- package/js/Private/internal/MediaPlayerInternal.js +22 -20
- package/js/Private/internal/MediaRecorderInternal.js +4 -4
- package/js/Private/internal/MusicContentCenterInternal.js +7 -9
- package/js/Private/internal/RtcEngineExInternal.js +52 -62
- package/js/Renderer/AgoraView.js +21 -24
- package/js/Renderer/IRenderer.js +6 -13
- package/js/Renderer/IRendererManager.js +9 -0
- package/js/Renderer/RendererManager.js +49 -33
- package/js/Renderer/{GlRenderer → WebGLRenderer}/index.js +39 -45
- package/js/Renderer/YUVCanvasRenderer/index.js +8 -7
- package/js/Renderer/index.js +18 -0
- package/js/Utils.js +6 -8
- package/package.json +4 -3
- package/scripts/buildJS.js +1 -2
- package/scripts/getConfig.js +0 -1
- package/ts/AgoraSdk.ts +5 -2
- package/ts/Private/IAgoraMediaPlayer.ts +45 -45
- package/ts/Private/IAgoraRtcEngine.ts +33 -25
- package/ts/Private/impl/IAgoraMediaPlayerImpl.ts +84 -84
- package/ts/Private/impl/IAgoraRtcEngineImpl.ts +75 -65
- package/ts/Private/internal/IrisApiEngine.ts +0 -2
- package/ts/Private/internal/RtcEngineExInternal.ts +23 -12
- package/ts/Renderer/AgoraView.ts +1 -0
- package/ts/Renderer/IRenderer.ts +8 -14
- package/ts/Renderer/IRendererManager.ts +35 -0
- package/ts/Renderer/RendererManager.ts +9 -9
- package/ts/Renderer/{GlRenderer → WebGLRenderer}/index.ts +26 -45
- package/ts/Renderer/YUVCanvasRenderer/index.ts +8 -10
- package/ts/Renderer/index.ts +2 -0
- package/ts/Types.ts +15 -9
- package/ts/Utils.ts +4 -6
- package/types/AgoraSdk.d.ts +4 -2
- package/types/AgoraSdk.d.ts.map +1 -0
- package/types/Private/AgoraBase.d.ts +1 -0
- package/types/Private/AgoraBase.d.ts.map +1 -0
- package/types/Private/AgoraMediaBase.d.ts +1 -0
- package/types/Private/AgoraMediaBase.d.ts.map +1 -0
- package/types/Private/AgoraMediaPlayerTypes.d.ts +1 -0
- package/types/Private/AgoraMediaPlayerTypes.d.ts.map +1 -0
- package/types/Private/IAgoraLog.d.ts +1 -0
- package/types/Private/IAgoraLog.d.ts.map +1 -0
- package/types/Private/IAgoraMediaEngine.d.ts +1 -0
- package/types/Private/IAgoraMediaEngine.d.ts.map +1 -0
- package/types/Private/IAgoraMediaPlayer.d.ts +35 -34
- package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -0
- package/types/Private/IAgoraMediaPlayerSource.d.ts +1 -0
- package/types/Private/IAgoraMediaPlayerSource.d.ts.map +1 -0
- package/types/Private/IAgoraMediaRecorder.d.ts +1 -0
- package/types/Private/IAgoraMediaRecorder.d.ts.map +1 -0
- package/types/Private/IAgoraMediaStreamingSource.d.ts +1 -0
- package/types/Private/IAgoraMediaStreamingSource.d.ts.map +1 -0
- package/types/Private/IAgoraMusicContentCenter.d.ts +1 -0
- package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -0
- package/types/Private/IAgoraRhythmPlayer.d.ts +1 -0
- package/types/Private/IAgoraRhythmPlayer.d.ts.map +1 -0
- package/types/Private/IAgoraRtcEngine.d.ts +27 -19
- package/types/Private/IAgoraRtcEngine.d.ts.map +1 -0
- package/types/Private/IAgoraRtcEngineEx.d.ts +1 -0
- package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -0
- package/types/Private/IAgoraSpatialAudio.d.ts +1 -0
- package/types/Private/IAgoraSpatialAudio.d.ts.map +1 -0
- package/types/Private/IAudioDeviceManager.d.ts +1 -0
- package/types/Private/IAudioDeviceManager.d.ts.map +1 -0
- package/types/Private/extension/AgoraBaseExtension.d.ts +1 -0
- package/types/Private/extension/AgoraBaseExtension.d.ts.map +1 -0
- package/types/Private/extension/AgoraMediaBaseExtension.d.ts +1 -0
- package/types/Private/extension/AgoraMediaBaseExtension.d.ts.map +1 -0
- package/types/Private/extension/AgoraMediaPlayerTypesExtension.d.ts +1 -0
- package/types/Private/extension/AgoraMediaPlayerTypesExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraLogExtension.d.ts +1 -0
- package/types/Private/extension/IAgoraLogExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraMediaEngineExtension.d.ts +1 -0
- package/types/Private/extension/IAgoraMediaEngineExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraMediaPlayerExtension.d.ts +1 -0
- package/types/Private/extension/IAgoraMediaPlayerExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts +1 -0
- package/types/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraMediaRecorderExtension.d.ts +1 -0
- package/types/Private/extension/IAgoraMediaRecorderExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraMusicContentCenterExtension.d.ts +1 -0
- package/types/Private/extension/IAgoraMusicContentCenterExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraRhythmPlayerExtension.d.ts +1 -0
- package/types/Private/extension/IAgoraRhythmPlayerExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraRtcEngineExExtension.d.ts +1 -0
- package/types/Private/extension/IAgoraRtcEngineExExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraRtcEngineExtension.d.ts +1 -0
- package/types/Private/extension/IAgoraRtcEngineExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraSpatialAudioExtension.d.ts +1 -0
- package/types/Private/extension/IAgoraSpatialAudioExtension.d.ts.map +1 -0
- package/types/Private/extension/IAudioDeviceManagerExtension.d.ts +1 -0
- package/types/Private/extension/IAudioDeviceManagerExtension.d.ts.map +1 -0
- package/types/Private/impl/AgoraBaseImpl.d.ts +1 -0
- package/types/Private/impl/AgoraBaseImpl.d.ts.map +1 -0
- package/types/Private/impl/AgoraMediaBaseImpl.d.ts +1 -0
- package/types/Private/impl/AgoraMediaBaseImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraMediaEngineImpl.d.ts +1 -0
- package/types/Private/impl/IAgoraMediaEngineImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts +9 -8
- package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts +1 -0
- package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraMediaRecorderImpl.d.ts +1 -0
- package/types/Private/impl/IAgoraMediaRecorderImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts +1 -0
- package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts +1 -0
- package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +13 -10
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts +1 -0
- package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts.map +1 -0
- package/types/Private/impl/IAudioDeviceManagerImpl.d.ts +1 -0
- package/types/Private/impl/IAudioDeviceManagerImpl.d.ts.map +1 -0
- package/types/Private/internal/AudioDeviceManagerInternal.d.ts +1 -0
- package/types/Private/internal/AudioDeviceManagerInternal.d.ts.map +1 -0
- package/types/Private/internal/IrisApiEngine.d.ts +8 -7
- package/types/Private/internal/IrisApiEngine.d.ts.map +1 -0
- package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts +1 -0
- package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts.map +1 -0
- package/types/Private/internal/MediaEngineInternal.d.ts +1 -0
- package/types/Private/internal/MediaEngineInternal.d.ts.map +1 -0
- package/types/Private/internal/MediaPlayerInternal.d.ts +1 -0
- package/types/Private/internal/MediaPlayerInternal.d.ts.map +1 -0
- package/types/Private/internal/MediaRecorderInternal.d.ts +1 -0
- package/types/Private/internal/MediaRecorderInternal.d.ts.map +1 -0
- package/types/Private/internal/MusicContentCenterInternal.d.ts +1 -0
- package/types/Private/internal/MusicContentCenterInternal.d.ts.map +1 -0
- package/types/Private/internal/RtcEngineExInternal.d.ts +3 -2
- package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -0
- package/{js → types}/Private/internal/emitter/EventEmitter.d.ts +1 -0
- package/types/Private/internal/emitter/EventEmitter.d.ts.map +1 -0
- package/types/Private/ti/AgoraBase-ti.d.ts +1 -0
- package/types/Private/ti/AgoraBase-ti.d.ts.map +1 -0
- package/types/Private/ti/AgoraMediaBase-ti.d.ts +1 -0
- package/types/Private/ti/AgoraMediaBase-ti.d.ts.map +1 -0
- package/types/Private/ti/AgoraMediaPlayerTypes-ti.d.ts +1 -0
- package/types/Private/ti/AgoraMediaPlayerTypes-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraLog-ti.d.ts +1 -0
- package/types/Private/ti/IAgoraLog-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraMediaEngine-ti.d.ts +1 -0
- package/types/Private/ti/IAgoraMediaEngine-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraMediaPlayer-ti.d.ts +1 -0
- package/types/Private/ti/IAgoraMediaPlayer-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts +1 -0
- package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraMediaRecorder-ti.d.ts +1 -0
- package/types/Private/ti/IAgoraMediaRecorder-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraMediaStreamingSource-ti.d.ts +1 -0
- package/types/Private/ti/IAgoraMediaStreamingSource-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraMusicContentCenter-ti.d.ts +1 -0
- package/types/Private/ti/IAgoraMusicContentCenter-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraRhythmPlayer-ti.d.ts +1 -0
- package/types/Private/ti/IAgoraRhythmPlayer-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraRtcEngine-ti.d.ts +1 -0
- package/types/Private/ti/IAgoraRtcEngine-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraRtcEngineEx-ti.d.ts +1 -0
- package/types/Private/ti/IAgoraRtcEngineEx-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraSpatialAudio-ti.d.ts +1 -0
- package/types/Private/ti/IAgoraSpatialAudio-ti.d.ts.map +1 -0
- package/types/Private/ti/IAudioDeviceManager-ti.d.ts +1 -0
- package/types/Private/ti/IAudioDeviceManager-ti.d.ts.map +1 -0
- package/types/Renderer/AgoraView.d.ts +1 -0
- package/types/Renderer/AgoraView.d.ts.map +1 -0
- package/types/Renderer/IRenderer.d.ts +6 -5
- package/types/Renderer/IRenderer.d.ts.map +1 -0
- package/types/Renderer/IRendererManager.d.ts +18 -0
- package/types/Renderer/IRendererManager.d.ts.map +1 -0
- package/types/Renderer/RendererManager.d.ts +5 -3
- package/types/Renderer/RendererManager.d.ts.map +1 -0
- package/types/Renderer/{GlRenderer → WebGLRenderer}/index.d.ts +9 -19
- package/types/Renderer/WebGLRenderer/index.d.ts.map +1 -0
- package/types/Renderer/WebGLRenderer/webgl-utils.d.ts +1 -0
- package/types/Renderer/WebGLRenderer/webgl-utils.d.ts.map +1 -0
- package/types/Renderer/YUVCanvasRenderer/index.d.ts +4 -4
- package/types/Renderer/YUVCanvasRenderer/index.d.ts.map +1 -0
- package/types/Renderer/index.d.ts +3 -0
- package/types/Renderer/index.d.ts.map +1 -0
- package/types/Types.d.ts +15 -9
- package/types/Types.d.ts.map +1 -0
- package/types/Utils.d.ts +1 -0
- package/types/Utils.d.ts.map +1 -0
- package/js/AgoraSdk.d.ts +0 -36
- package/js/Private/AgoraBase.d.ts +0 -4441
- package/js/Private/AgoraMediaBase.d.ts +0 -1124
- package/js/Private/AgoraMediaPlayerTypes.d.ts +0 -408
- package/js/Private/IAgoraLog.d.ts +0 -80
- package/js/Private/IAgoraMediaEngine.d.ts +0 -183
- package/js/Private/IAgoraMediaPlayer.d.ts +0 -532
- package/js/Private/IAgoraMediaPlayerSource.d.ts +0 -82
- package/js/Private/IAgoraMediaRecorder.d.ts +0 -28
- package/js/Private/IAgoraMediaStreamingSource.d.ts +0 -41
- package/js/Private/IAgoraMusicContentCenter.d.ts +0 -335
- package/js/Private/IAgoraRhythmPlayer.d.ts +0 -64
- package/js/Private/IAgoraRtcEngine.d.ts +0 -4947
- package/js/Private/IAgoraRtcEngineEx.d.ts +0 -553
- package/js/Private/IAgoraSpatialAudio.d.ts +0 -265
- package/js/Private/IAudioDeviceManager.d.ts +0 -254
- package/js/Private/extension/AgoraBaseExtension.d.ts +0 -1
- package/js/Private/extension/AgoraMediaBaseExtension.d.ts +0 -1
- package/js/Private/extension/AgoraMediaPlayerTypesExtension.d.ts +0 -1
- package/js/Private/extension/IAgoraLogExtension.d.ts +0 -1
- package/js/Private/extension/IAgoraMediaEngineExtension.d.ts +0 -40
- package/js/Private/extension/IAgoraMediaPlayerExtension.d.ts +0 -46
- package/js/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts +0 -1
- package/js/Private/extension/IAgoraMediaRecorderExtension.d.ts +0 -44
- package/js/Private/extension/IAgoraMusicContentCenterExtension.d.ts +0 -20
- package/js/Private/extension/IAgoraRhythmPlayerExtension.d.ts +0 -1
- package/js/Private/extension/IAgoraRtcEngineExExtension.d.ts +0 -1
- package/js/Private/extension/IAgoraRtcEngineExtension.d.ts +0 -42
- package/js/Private/extension/IAgoraSpatialAudioExtension.d.ts +0 -1
- package/js/Private/extension/IAudioDeviceManagerExtension.d.ts +0 -1
- package/js/Private/impl/AgoraBaseImpl.d.ts +0 -2
- package/js/Private/impl/AgoraMediaBaseImpl.d.ts +0 -8
- package/js/Private/impl/IAgoraMediaEngineImpl.d.ts +0 -39
- package/js/Private/impl/IAgoraMediaPlayerImpl.d.ts +0 -140
- package/js/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts +0 -2
- package/js/Private/impl/IAgoraMediaRecorderImpl.d.ts +0 -10
- package/js/Private/impl/IAgoraMusicContentCenterImpl.d.ts +0 -58
- package/js/Private/impl/IAgoraRtcEngineExImpl.d.ts +0 -105
- package/js/Private/impl/IAgoraRtcEngineImpl.d.ts +0 -570
- package/js/Private/impl/IAgoraSpatialAudioImpl.d.ts +0 -48
- package/js/Private/impl/IAudioDeviceManagerImpl.d.ts +0 -64
- package/js/Private/internal/AudioDeviceManagerInternal.d.ts +0 -8
- package/js/Private/internal/IrisApiEngine.d.ts +0 -147
- package/js/Private/internal/LocalSpatialAudioEngineInternal.d.ts +0 -18
- package/js/Private/internal/MediaEngineInternal.d.ts +0 -21
- package/js/Private/internal/MediaPlayerInternal.d.ts +0 -33
- package/js/Private/internal/MediaRecorderInternal.d.ts +0 -17
- package/js/Private/internal/MusicContentCenterInternal.d.ts +0 -39
- package/js/Private/internal/RtcEngineExInternal.d.ts +0 -80
- package/js/Private/ti/AgoraBase-ti.d.ts +0 -7
- package/js/Private/ti/AgoraMediaBase-ti.d.ts +0 -13
- package/js/Private/ti/AgoraMediaPlayerTypes-ti.d.ts +0 -6
- package/js/Private/ti/IAgoraLog-ti.d.ts +0 -6
- package/js/Private/ti/IAgoraMediaEngine-ti.d.ts +0 -6
- package/js/Private/ti/IAgoraMediaPlayer-ti.d.ts +0 -7
- package/js/Private/ti/IAgoraMediaPlayerSource-ti.d.ts +0 -7
- package/js/Private/ti/IAgoraMediaRecorder-ti.d.ts +0 -6
- package/js/Private/ti/IAgoraMediaStreamingSource-ti.d.ts +0 -6
- package/js/Private/ti/IAgoraMusicContentCenter-ti.d.ts +0 -7
- package/js/Private/ti/IAgoraRhythmPlayer-ti.d.ts +0 -6
- package/js/Private/ti/IAgoraRtcEngine-ti.d.ts +0 -9
- package/js/Private/ti/IAgoraRtcEngineEx-ti.d.ts +0 -6
- package/js/Private/ti/IAgoraSpatialAudio-ti.d.ts +0 -6
- package/js/Private/ti/IAudioDeviceManager-ti.d.ts +0 -6
- package/js/Renderer/AgoraView.d.ts +0 -69
- package/js/Renderer/GlRenderer/index.d.ts +0 -59
- package/js/Renderer/GlRenderer/webgl-utils.d.ts +0 -0
- package/js/Renderer/IRenderer.d.ts +0 -21
- package/js/Renderer/RendererManager.d.ts +0 -152
- package/js/Renderer/YUVCanvasRenderer/index.d.ts +0 -16
- package/js/Types.d.ts +0 -271
- package/js/Utils.d.ts +0 -58
- /package/js/Renderer/{GlRenderer → WebGLRenderer}/webgl-utils.js +0 -0
- /package/ts/Renderer/{GlRenderer → WebGLRenderer}/webgl-utils.js +0 -0
|
@@ -1,1124 +0,0 @@
|
|
|
1
|
-
import './extension/AgoraMediaBaseExtension';
|
|
2
|
-
import { EncodedVideoFrameInfo } from './AgoraBase';
|
|
3
|
-
/**
|
|
4
|
-
* The capture type of the custom video source.
|
|
5
|
-
*/
|
|
6
|
-
export declare enum VideoSourceType {
|
|
7
|
-
/**
|
|
8
|
-
* @ignore
|
|
9
|
-
*/
|
|
10
|
-
VideoSourceCameraPrimary = 0,
|
|
11
|
-
/**
|
|
12
|
-
* The camera.
|
|
13
|
-
*/
|
|
14
|
-
VideoSourceCamera = 0,
|
|
15
|
-
/**
|
|
16
|
-
* The secondary camera.
|
|
17
|
-
*/
|
|
18
|
-
VideoSourceCameraSecondary = 1,
|
|
19
|
-
/**
|
|
20
|
-
* The primary screen.
|
|
21
|
-
*/
|
|
22
|
-
VideoSourceScreenPrimary = 2,
|
|
23
|
-
/**
|
|
24
|
-
* The screen.
|
|
25
|
-
*/
|
|
26
|
-
VideoSourceScreen = 2,
|
|
27
|
-
/**
|
|
28
|
-
* The secondary screen.
|
|
29
|
-
*/
|
|
30
|
-
VideoSourceScreenSecondary = 3,
|
|
31
|
-
/**
|
|
32
|
-
* The custom video source.
|
|
33
|
-
*/
|
|
34
|
-
VideoSourceCustom = 4,
|
|
35
|
-
/**
|
|
36
|
-
* The video source from the media player.
|
|
37
|
-
*/
|
|
38
|
-
VideoSourceMediaPlayer = 5,
|
|
39
|
-
/**
|
|
40
|
-
* The video source is a PNG image.
|
|
41
|
-
*/
|
|
42
|
-
VideoSourceRtcImagePng = 6,
|
|
43
|
-
/**
|
|
44
|
-
* The video source is a JPEG image.
|
|
45
|
-
*/
|
|
46
|
-
VideoSourceRtcImageJpeg = 7,
|
|
47
|
-
/**
|
|
48
|
-
* The video source is a GIF image.
|
|
49
|
-
*/
|
|
50
|
-
VideoSourceRtcImageGif = 8,
|
|
51
|
-
/**
|
|
52
|
-
* The video source is remote video acquired by the network.
|
|
53
|
-
*/
|
|
54
|
-
VideoSourceRemote = 9,
|
|
55
|
-
/**
|
|
56
|
-
* A transcoded video source.
|
|
57
|
-
*/
|
|
58
|
-
VideoSourceTranscoded = 10,
|
|
59
|
-
/**
|
|
60
|
-
* @ignore
|
|
61
|
-
*/
|
|
62
|
-
VideoSourceCameraThird = 11,
|
|
63
|
-
/**
|
|
64
|
-
* @ignore
|
|
65
|
-
*/
|
|
66
|
-
VideoSourceCameraFourth = 12,
|
|
67
|
-
/**
|
|
68
|
-
* @ignore
|
|
69
|
-
*/
|
|
70
|
-
VideoSourceScreenThird = 13,
|
|
71
|
-
/**
|
|
72
|
-
* @ignore
|
|
73
|
-
*/
|
|
74
|
-
VideoSourceScreenFourth = 14,
|
|
75
|
-
/**
|
|
76
|
-
* An unknown video source.
|
|
77
|
-
*/
|
|
78
|
-
VideoSourceUnknown = 100
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* The type of the audio route.
|
|
82
|
-
*/
|
|
83
|
-
export declare enum AudioRoute {
|
|
84
|
-
/**
|
|
85
|
-
* -1: The default audio route.
|
|
86
|
-
*/
|
|
87
|
-
RouteDefault = -1,
|
|
88
|
-
/**
|
|
89
|
-
* 0: Audio output routing is a headset with microphone.
|
|
90
|
-
*/
|
|
91
|
-
RouteHeadset = 0,
|
|
92
|
-
/**
|
|
93
|
-
* 1: The audio route is an earpiece.
|
|
94
|
-
*/
|
|
95
|
-
RouteEarpiece = 1,
|
|
96
|
-
/**
|
|
97
|
-
* 2: The audio route is a headset without a microphone.
|
|
98
|
-
*/
|
|
99
|
-
RouteHeadsetnomic = 2,
|
|
100
|
-
/**
|
|
101
|
-
* 3: The audio route is the speaker that comes with the device.
|
|
102
|
-
*/
|
|
103
|
-
RouteSpeakerphone = 3,
|
|
104
|
-
/**
|
|
105
|
-
* 4: The audio route is an external speaker. (macOS only)
|
|
106
|
-
*/
|
|
107
|
-
RouteLoudspeaker = 4,
|
|
108
|
-
/**
|
|
109
|
-
* @ignore
|
|
110
|
-
*/
|
|
111
|
-
RouteHeadsetbluetooth = 5,
|
|
112
|
-
/**
|
|
113
|
-
* 7: The audio route is a USB peripheral device. (For macOS only)
|
|
114
|
-
*/
|
|
115
|
-
RouteUsb = 6,
|
|
116
|
-
/**
|
|
117
|
-
* 6: The audio route is an HDMI peripheral device. (For macOS only)
|
|
118
|
-
*/
|
|
119
|
-
RouteHdmi = 7,
|
|
120
|
-
/**
|
|
121
|
-
* 8: The audio route is a DisplayPort peripheral device. (For macOS only)
|
|
122
|
-
*/
|
|
123
|
-
RouteDisplayport = 8,
|
|
124
|
-
/**
|
|
125
|
-
* 9: The audio route is Apple AirPlay. (For macOS only)
|
|
126
|
-
*/
|
|
127
|
-
RouteAirplay = 9
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* @ignore
|
|
131
|
-
*/
|
|
132
|
-
export declare enum BytesPerSample {
|
|
133
|
-
/**
|
|
134
|
-
* @ignore
|
|
135
|
-
*/
|
|
136
|
-
TwoBytesPerSample = 2
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* @ignore
|
|
140
|
-
*/
|
|
141
|
-
export declare class AudioParameters {
|
|
142
|
-
/**
|
|
143
|
-
* @ignore
|
|
144
|
-
*/
|
|
145
|
-
sample_rate?: number;
|
|
146
|
-
/**
|
|
147
|
-
* @ignore
|
|
148
|
-
*/
|
|
149
|
-
channels?: number;
|
|
150
|
-
/**
|
|
151
|
-
* @ignore
|
|
152
|
-
*/
|
|
153
|
-
frames_per_buffer?: number;
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* The use mode of the audio data.
|
|
157
|
-
*/
|
|
158
|
-
export declare enum RawAudioFrameOpModeType {
|
|
159
|
-
/**
|
|
160
|
-
* 0: Read-only mode, Users only read the data returned by the SDK without modifying anything. For example, when users acquire the data with the Agora SDK, then start the media push.
|
|
161
|
-
*/
|
|
162
|
-
RawAudioFrameOpModeReadOnly = 0,
|
|
163
|
-
/**
|
|
164
|
-
* 2: Read and write mode, Users read the data returned by the SDK, modify it, and then play it. For example, when users have their own audio-effect processing module and perform some voice preprocessing, such as a voice change.
|
|
165
|
-
*/
|
|
166
|
-
RawAudioFrameOpModeReadWrite = 2
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Media source type.
|
|
170
|
-
*/
|
|
171
|
-
export declare enum MediaSourceType {
|
|
172
|
-
/**
|
|
173
|
-
* 0: Audio playback device.
|
|
174
|
-
*/
|
|
175
|
-
AudioPlayoutSource = 0,
|
|
176
|
-
/**
|
|
177
|
-
* 1: Audio capturing device.
|
|
178
|
-
*/
|
|
179
|
-
AudioRecordingSource = 1,
|
|
180
|
-
/**
|
|
181
|
-
* 2: The primary camera.
|
|
182
|
-
*/
|
|
183
|
-
PrimaryCameraSource = 2,
|
|
184
|
-
/**
|
|
185
|
-
* 3: The secondary camera.
|
|
186
|
-
*/
|
|
187
|
-
SecondaryCameraSource = 3,
|
|
188
|
-
/**
|
|
189
|
-
* @ignore
|
|
190
|
-
*/
|
|
191
|
-
PrimaryScreenSource = 4,
|
|
192
|
-
/**
|
|
193
|
-
* @ignore
|
|
194
|
-
*/
|
|
195
|
-
SecondaryScreenSource = 5,
|
|
196
|
-
/**
|
|
197
|
-
* @ignore
|
|
198
|
-
*/
|
|
199
|
-
CustomVideoSource = 6,
|
|
200
|
-
/**
|
|
201
|
-
* @ignore
|
|
202
|
-
*/
|
|
203
|
-
MediaPlayerSource = 7,
|
|
204
|
-
/**
|
|
205
|
-
* @ignore
|
|
206
|
-
*/
|
|
207
|
-
RtcImagePngSource = 8,
|
|
208
|
-
/**
|
|
209
|
-
* @ignore
|
|
210
|
-
*/
|
|
211
|
-
RtcImageJpegSource = 9,
|
|
212
|
-
/**
|
|
213
|
-
* @ignore
|
|
214
|
-
*/
|
|
215
|
-
RtcImageGifSource = 10,
|
|
216
|
-
/**
|
|
217
|
-
* @ignore
|
|
218
|
-
*/
|
|
219
|
-
RemoteVideoSource = 11,
|
|
220
|
-
/**
|
|
221
|
-
* @ignore
|
|
222
|
-
*/
|
|
223
|
-
TranscodedVideoSource = 12,
|
|
224
|
-
/**
|
|
225
|
-
* 100: Unknown media source.
|
|
226
|
-
*/
|
|
227
|
-
UnknownMediaSource = 100
|
|
228
|
-
}
|
|
229
|
-
/**
|
|
230
|
-
* @ignore
|
|
231
|
-
*/
|
|
232
|
-
export declare enum ContentInspectResult {
|
|
233
|
-
/**
|
|
234
|
-
* @ignore
|
|
235
|
-
*/
|
|
236
|
-
ContentInspectNeutral = 1,
|
|
237
|
-
/**
|
|
238
|
-
* @ignore
|
|
239
|
-
*/
|
|
240
|
-
ContentInspectSexy = 2,
|
|
241
|
-
/**
|
|
242
|
-
* @ignore
|
|
243
|
-
*/
|
|
244
|
-
ContentInspectPorn = 3
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* The type of video content moderation module.
|
|
248
|
-
*/
|
|
249
|
-
export declare enum ContentInspectType {
|
|
250
|
-
/**
|
|
251
|
-
* 0: (Default) This module has no actual function. Do not set type to this value.
|
|
252
|
-
*/
|
|
253
|
-
ContentInspectInvalid = 0,
|
|
254
|
-
/**
|
|
255
|
-
* 1: Video content moderation. SDK takes screenshots, inspects video content of the video stream in the channel, and uploads the screenshots and moderation results.
|
|
256
|
-
*/
|
|
257
|
-
ContentInspectModeration = 1,
|
|
258
|
-
/**
|
|
259
|
-
* @ignore
|
|
260
|
-
*/
|
|
261
|
-
ContentInspectSupervision = 2
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* A structure used to configure the frequency of video screenshot and upload.ContentInspectModule
|
|
265
|
-
*/
|
|
266
|
-
export declare class ContentInspectModule {
|
|
267
|
-
/**
|
|
268
|
-
* Types of functional module. See ContentInspectType .
|
|
269
|
-
*/
|
|
270
|
-
type?: ContentInspectType;
|
|
271
|
-
/**
|
|
272
|
-
* The frequency (s) of video screenshot and upload. The value should be set as larger than 0. The default value is 0, the SDK does not take screenshots. Agora recommends that you set the value as 10; you can also adjust it according to your business needs.
|
|
273
|
-
*/
|
|
274
|
-
interval?: number;
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* Configuration of video screenshot and upload.
|
|
278
|
-
*/
|
|
279
|
-
export declare class ContentInspectConfig {
|
|
280
|
-
/**
|
|
281
|
-
* Additional information on the video content (maximum length: 1024 Bytes).The SDK sends the screenshots and additional information on the video content to the Agora server. Once the video screenshot and upload process is completed, the Agora server sends the additional information and the callback notification to your server.
|
|
282
|
-
*/
|
|
283
|
-
extraInfo?: string;
|
|
284
|
-
/**
|
|
285
|
-
* Functional module. See ContentInspectModule .A maximum of 32 ContentInspectModule instances can be configured, and the value range of MAX_CONTENT_INSPECT_MODULE_COUNT is an integer in [1,32].A function module can only be configured with one instance at most. Currently only the video screenshot and upload function is supported.
|
|
286
|
-
*/
|
|
287
|
-
modules?: ContentInspectModule[];
|
|
288
|
-
/**
|
|
289
|
-
* The number of functional modules, that is,the number of configured ContentInspectModule instances, must be the same as the number of instances configured in modules. The maximum number is 32.
|
|
290
|
-
*/
|
|
291
|
-
moduleCount?: number;
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* @ignore
|
|
295
|
-
*/
|
|
296
|
-
export declare class PacketOptions {
|
|
297
|
-
/**
|
|
298
|
-
* @ignore
|
|
299
|
-
*/
|
|
300
|
-
timestamp?: number;
|
|
301
|
-
/**
|
|
302
|
-
* @ignore
|
|
303
|
-
*/
|
|
304
|
-
audioLevelIndication?: number;
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
* @ignore
|
|
308
|
-
*/
|
|
309
|
-
export declare class AudioEncodedFrameInfo {
|
|
310
|
-
/**
|
|
311
|
-
* @ignore
|
|
312
|
-
*/
|
|
313
|
-
sendTs?: number;
|
|
314
|
-
/**
|
|
315
|
-
* @ignore
|
|
316
|
-
*/
|
|
317
|
-
codec?: number;
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* The parameters of the audio frame in PCM format.
|
|
321
|
-
*/
|
|
322
|
-
export declare class AudioPcmFrame {
|
|
323
|
-
/**
|
|
324
|
-
* The timestamp (ms) of the audio frame.
|
|
325
|
-
*/
|
|
326
|
-
capture_timestamp?: number;
|
|
327
|
-
/**
|
|
328
|
-
* The number of samples per channel in the audio frame.
|
|
329
|
-
*/
|
|
330
|
-
samples_per_channel_?: number;
|
|
331
|
-
/**
|
|
332
|
-
* Audio sample rate (Hz).
|
|
333
|
-
*/
|
|
334
|
-
sample_rate_hz_?: number;
|
|
335
|
-
/**
|
|
336
|
-
* The number of audio channels.
|
|
337
|
-
*/
|
|
338
|
-
num_channels_?: number;
|
|
339
|
-
/**
|
|
340
|
-
* The number of bytes per sample.
|
|
341
|
-
*/
|
|
342
|
-
bytes_per_sample?: BytesPerSample;
|
|
343
|
-
/**
|
|
344
|
-
* The video frame.
|
|
345
|
-
*/
|
|
346
|
-
data_?: number[];
|
|
347
|
-
}
|
|
348
|
-
/**
|
|
349
|
-
* The channel mode.
|
|
350
|
-
*/
|
|
351
|
-
export declare enum AudioDualMonoMode {
|
|
352
|
-
/**
|
|
353
|
-
* 0: Original mode.
|
|
354
|
-
*/
|
|
355
|
-
AudioDualMonoStereo = 0,
|
|
356
|
-
/**
|
|
357
|
-
* 1: Left channel mode. This mode replaces the audio of the right channel with the audio of the left channel, which means the user can only hear the audio of the left channel.
|
|
358
|
-
*/
|
|
359
|
-
AudioDualMonoL = 1,
|
|
360
|
-
/**
|
|
361
|
-
* 2: Right channel mode. This mode replaces the audio of the left channel with the audio of the right channel, which means the user can only hear the audio of the right channel.
|
|
362
|
-
*/
|
|
363
|
-
AudioDualMonoR = 2,
|
|
364
|
-
/**
|
|
365
|
-
* 3: Mixed channel mode. This mode mixes the audio of the left channel and the right channel, which means the user can hear the audio of the left channel and the right channel at the same time.
|
|
366
|
-
*/
|
|
367
|
-
AudioDualMonoMix = 3
|
|
368
|
-
}
|
|
369
|
-
/**
|
|
370
|
-
* The video pixel format.
|
|
371
|
-
*/
|
|
372
|
-
export declare enum VideoPixelFormat {
|
|
373
|
-
/**
|
|
374
|
-
* 0: Raw video pixel format.
|
|
375
|
-
*/
|
|
376
|
-
VideoPixelDefault = 0,
|
|
377
|
-
/**
|
|
378
|
-
* 1: The format is I420.
|
|
379
|
-
*/
|
|
380
|
-
VideoPixelI420 = 1,
|
|
381
|
-
/**
|
|
382
|
-
* @ignore
|
|
383
|
-
*/
|
|
384
|
-
VideoPixelBgra = 2,
|
|
385
|
-
/**
|
|
386
|
-
* @ignore
|
|
387
|
-
*/
|
|
388
|
-
VideoPixelNv21 = 3,
|
|
389
|
-
/**
|
|
390
|
-
* 4: The format is RGBA.
|
|
391
|
-
*/
|
|
392
|
-
VideoPixelRgba = 4,
|
|
393
|
-
/**
|
|
394
|
-
* 8: The format is NV12.
|
|
395
|
-
*/
|
|
396
|
-
VideoPixelNv12 = 8,
|
|
397
|
-
/**
|
|
398
|
-
* @ignore
|
|
399
|
-
*/
|
|
400
|
-
VideoTexture2d = 10,
|
|
401
|
-
/**
|
|
402
|
-
* @ignore
|
|
403
|
-
*/
|
|
404
|
-
VideoTextureOes = 11,
|
|
405
|
-
/**
|
|
406
|
-
* @ignore
|
|
407
|
-
*/
|
|
408
|
-
VideoCvpixelNv12 = 12,
|
|
409
|
-
/**
|
|
410
|
-
* @ignore
|
|
411
|
-
*/
|
|
412
|
-
VideoCvpixelI420 = 13,
|
|
413
|
-
/**
|
|
414
|
-
* @ignore
|
|
415
|
-
*/
|
|
416
|
-
VideoCvpixelBgra = 14,
|
|
417
|
-
/**
|
|
418
|
-
* 16: The format is I422.
|
|
419
|
-
*/
|
|
420
|
-
VideoPixelI422 = 16
|
|
421
|
-
}
|
|
422
|
-
/**
|
|
423
|
-
* Video display modes.
|
|
424
|
-
*/
|
|
425
|
-
export declare enum RenderModeType {
|
|
426
|
-
/**
|
|
427
|
-
* 1: Hidden mode. Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). One dimension of the video may have clipped contents.
|
|
428
|
-
*/
|
|
429
|
-
RenderModeHidden = 1,
|
|
430
|
-
/**
|
|
431
|
-
* 2: Fit mode. Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). Areas that are not filled due to disparity in the aspect ratio are filled with black.
|
|
432
|
-
*/
|
|
433
|
-
RenderModeFit = 2,
|
|
434
|
-
/**
|
|
435
|
-
* @ignore
|
|
436
|
-
*/
|
|
437
|
-
RenderModeAdaptive = 3
|
|
438
|
-
}
|
|
439
|
-
/**
|
|
440
|
-
* @ignore
|
|
441
|
-
*/
|
|
442
|
-
export declare enum CameraVideoSourceType {
|
|
443
|
-
/**
|
|
444
|
-
* @ignore
|
|
445
|
-
*/
|
|
446
|
-
CameraSourceFront = 0,
|
|
447
|
-
/**
|
|
448
|
-
* @ignore
|
|
449
|
-
*/
|
|
450
|
-
CameraSourceBack = 1,
|
|
451
|
-
/**
|
|
452
|
-
* @ignore
|
|
453
|
-
*/
|
|
454
|
-
VideoSourceUnspecified = 2
|
|
455
|
-
}
|
|
456
|
-
/**
|
|
457
|
-
* @ignore
|
|
458
|
-
*/
|
|
459
|
-
export declare enum EglContextType {
|
|
460
|
-
/**
|
|
461
|
-
* @ignore
|
|
462
|
-
*/
|
|
463
|
-
EglContext10 = 0,
|
|
464
|
-
/**
|
|
465
|
-
* @ignore
|
|
466
|
-
*/
|
|
467
|
-
EglContext14 = 1
|
|
468
|
-
}
|
|
469
|
-
/**
|
|
470
|
-
* The video buffer type.
|
|
471
|
-
*/
|
|
472
|
-
export declare enum VideoBufferType {
|
|
473
|
-
/**
|
|
474
|
-
* 1: The video buffer in the format of raw data.
|
|
475
|
-
*/
|
|
476
|
-
VideoBufferRawData = 1,
|
|
477
|
-
/**
|
|
478
|
-
* 2: The video buffer in the format of raw data.
|
|
479
|
-
*/
|
|
480
|
-
VideoBufferArray = 2,
|
|
481
|
-
/**
|
|
482
|
-
* 3: The video buffer in the format of Texture.
|
|
483
|
-
*/
|
|
484
|
-
VideoBufferTexture = 3
|
|
485
|
-
}
|
|
486
|
-
/**
|
|
487
|
-
* The external video frame.
|
|
488
|
-
*/
|
|
489
|
-
export declare class ExternalVideoFrame {
|
|
490
|
-
/**
|
|
491
|
-
* The video type. See VideoBufferType .
|
|
492
|
-
*/
|
|
493
|
-
type?: VideoBufferType;
|
|
494
|
-
/**
|
|
495
|
-
* The pixel format. See VideoPixelFormat .
|
|
496
|
-
*/
|
|
497
|
-
format?: VideoPixelFormat;
|
|
498
|
-
/**
|
|
499
|
-
* Video frame buffer.
|
|
500
|
-
*/
|
|
501
|
-
buffer?: Uint8Array;
|
|
502
|
-
/**
|
|
503
|
-
* Line spacing of the incoming video frame, which must be in pixels instead of bytes. For textures, it is the width of the texture.
|
|
504
|
-
*/
|
|
505
|
-
stride?: number;
|
|
506
|
-
/**
|
|
507
|
-
* Height of the incoming video frame.
|
|
508
|
-
*/
|
|
509
|
-
height?: number;
|
|
510
|
-
/**
|
|
511
|
-
* Raw data related parameter. The number of pixels trimmed from the left. The default value is 0.
|
|
512
|
-
*/
|
|
513
|
-
cropLeft?: number;
|
|
514
|
-
/**
|
|
515
|
-
* Raw data related parameter. The number of pixels trimmed from the top. The default value is 0.
|
|
516
|
-
*/
|
|
517
|
-
cropTop?: number;
|
|
518
|
-
/**
|
|
519
|
-
* Raw data related parameter. The number of pixels trimmed from the right. The default value is 0.
|
|
520
|
-
*/
|
|
521
|
-
cropRight?: number;
|
|
522
|
-
/**
|
|
523
|
-
* Raw data related parameter. The number of pixels trimmed from the bottom. The default value is 0.
|
|
524
|
-
*/
|
|
525
|
-
cropBottom?: number;
|
|
526
|
-
/**
|
|
527
|
-
* Raw data related parameter. The clockwise rotation of the video frame. You can set the rotation angle as 0, 90, 180, or 270. The default value is 0.
|
|
528
|
-
*/
|
|
529
|
-
rotation?: number;
|
|
530
|
-
/**
|
|
531
|
-
* Timestamp (ms) of the incoming video frame. An incorrect timestamp results in frame loss or unsynchronized audio and video.
|
|
532
|
-
*/
|
|
533
|
-
timestamp?: number;
|
|
534
|
-
/**
|
|
535
|
-
* This parameter only applies to video data in Texture format. Texture ID of the frame.
|
|
536
|
-
*/
|
|
537
|
-
eglType?: EglContextType;
|
|
538
|
-
/**
|
|
539
|
-
* This parameter only applies to video data in Texture format. Incoming 4 x 4 transformational matrix. The typical value is a unit matrix.
|
|
540
|
-
*/
|
|
541
|
-
textureId?: number;
|
|
542
|
-
/**
|
|
543
|
-
* This parameter only applies to video data in Texture format. Incoming 4 x 4 transformational matrix. The typical value is a unit matrix.
|
|
544
|
-
*/
|
|
545
|
-
matrix?: number[];
|
|
546
|
-
/**
|
|
547
|
-
* This parameter only applies to video data in Texture format. The MetaData buffer. The default value is NULL.
|
|
548
|
-
*/
|
|
549
|
-
metadata_buffer?: Uint8Array;
|
|
550
|
-
/**
|
|
551
|
-
* This parameter only applies to video data in Texture format. The MetaData size. The default value is 0.
|
|
552
|
-
*/
|
|
553
|
-
metadata_size?: number;
|
|
554
|
-
/**
|
|
555
|
-
* @ignore
|
|
556
|
-
*/
|
|
557
|
-
alphaBuffer?: Uint8Array;
|
|
558
|
-
}
|
|
559
|
-
/**
|
|
560
|
-
* Configurations of the video frame.
|
|
561
|
-
* Note that the buffer provides a pointer to a pointer. This interface cannot modify the pointer of the buffer, but it can modify the content of the buffer.
|
|
562
|
-
*/
|
|
563
|
-
export declare class VideoFrame {
|
|
564
|
-
/**
|
|
565
|
-
* The pixel format. See VideoPixelFormat .
|
|
566
|
-
*/
|
|
567
|
-
type?: VideoPixelFormat;
|
|
568
|
-
/**
|
|
569
|
-
* The width of the video, in pixels.
|
|
570
|
-
*/
|
|
571
|
-
width?: number;
|
|
572
|
-
/**
|
|
573
|
-
* The height of the video, in pixels.
|
|
574
|
-
*/
|
|
575
|
-
height?: number;
|
|
576
|
-
/**
|
|
577
|
-
* For YUV data, the line span of the Y buffer; for RGBA data, the total data length.
|
|
578
|
-
*/
|
|
579
|
-
yStride?: number;
|
|
580
|
-
/**
|
|
581
|
-
* For YUV data, the line span of the U buffer; for RGBA data, the value is 0.
|
|
582
|
-
*/
|
|
583
|
-
uStride?: number;
|
|
584
|
-
/**
|
|
585
|
-
* For YUV data, the line span of the V buffer; for RGBA data, the value is 0.
|
|
586
|
-
*/
|
|
587
|
-
vStride?: number;
|
|
588
|
-
/**
|
|
589
|
-
* For YUV data, the pointer to the Y buffer; for RGBA data, the data buffer.
|
|
590
|
-
*/
|
|
591
|
-
yBuffer?: Uint8Array;
|
|
592
|
-
/**
|
|
593
|
-
* For YUV data, the pointer to the U buffer; for RGBA data, the value is 0.
|
|
594
|
-
*/
|
|
595
|
-
uBuffer?: Uint8Array;
|
|
596
|
-
/**
|
|
597
|
-
* For YUV data, the pointer to the V buffer; for RGBA data, the value is 0.
|
|
598
|
-
*/
|
|
599
|
-
vBuffer?: Uint8Array;
|
|
600
|
-
/**
|
|
601
|
-
* The clockwise rotation of the video frame before rendering. Supported values include 0, 90, 180, and 270 degrees.
|
|
602
|
-
*/
|
|
603
|
-
rotation?: number;
|
|
604
|
-
/**
|
|
605
|
-
* The Unix timestamp (ms) when the video frame is rendered. This timestamp can be used to guide the rendering of the video frame. It is required.
|
|
606
|
-
*/
|
|
607
|
-
renderTimeMs?: number;
|
|
608
|
-
/**
|
|
609
|
-
* Reserved for future use.
|
|
610
|
-
*/
|
|
611
|
-
avsync_type?: number;
|
|
612
|
-
/**
|
|
613
|
-
* This parameter only applies to video data in Texture format. The MetaData buffer. The default value is NULL.
|
|
614
|
-
*/
|
|
615
|
-
metadata_buffer?: Uint8Array;
|
|
616
|
-
/**
|
|
617
|
-
* This parameter only applies to video data in Texture format. The MetaData size. The default value is 0.
|
|
618
|
-
*/
|
|
619
|
-
metadata_size?: number;
|
|
620
|
-
/**
|
|
621
|
-
* This parameter only applies to video data in Texture format. Texture ID.
|
|
622
|
-
*/
|
|
623
|
-
textureId?: number;
|
|
624
|
-
/**
|
|
625
|
-
* This parameter only applies to video data in Texture format. Incoming 4 × 4 transformational matrix. The typical value is a unit matrix.
|
|
626
|
-
*/
|
|
627
|
-
matrix?: number[];
|
|
628
|
-
/**
|
|
629
|
-
* @ignore
|
|
630
|
-
*/
|
|
631
|
-
alphaBuffer?: Uint8Array;
|
|
632
|
-
/**
|
|
633
|
-
* @ignore
|
|
634
|
-
*/
|
|
635
|
-
pixelBuffer?: Uint8Array;
|
|
636
|
-
}
|
|
637
|
-
/**
|
|
638
|
-
* @ignore
|
|
639
|
-
*/
|
|
640
|
-
export declare enum MediaPlayerSourceType {
|
|
641
|
-
/**
|
|
642
|
-
* @ignore
|
|
643
|
-
*/
|
|
644
|
-
MediaPlayerSourceDefault = 0,
|
|
645
|
-
/**
|
|
646
|
-
* @ignore
|
|
647
|
-
*/
|
|
648
|
-
MediaPlayerSourceFullFeatured = 1,
|
|
649
|
-
/**
|
|
650
|
-
* @ignore
|
|
651
|
-
*/
|
|
652
|
-
MediaPlayerSourceSimple = 2
|
|
653
|
-
}
|
|
654
|
-
/**
|
|
655
|
-
* The frame position of the video observer.
|
|
656
|
-
*/
|
|
657
|
-
export declare enum VideoModulePosition {
|
|
658
|
-
/**
|
|
659
|
-
* 1: The post-capturer position, which corresponds to the video data in the onCaptureVideoFrame callback.
|
|
660
|
-
*/
|
|
661
|
-
PositionPostCapturer = 1,
|
|
662
|
-
/**
|
|
663
|
-
* 2: The pre-renderer position, which corresponds to the video data in the onRenderVideoFrame callback.
|
|
664
|
-
*/
|
|
665
|
-
PositionPreRenderer = 2,
|
|
666
|
-
/**
|
|
667
|
-
* 4: The pre-encoder position, which corresponds to the video data in the onPreEncodeVideoFrame callback.
|
|
668
|
-
*/
|
|
669
|
-
PositionPreEncoder = 4
|
|
670
|
-
}
|
|
671
|
-
/**
|
|
672
|
-
* @ignore
|
|
673
|
-
*/
|
|
674
|
-
export interface IAudioPcmFrameSink {
|
|
675
|
-
/**
|
|
676
|
-
* Occurs each time the player receives a video frame.
|
|
677
|
-
* After registering the video frame observer, the callback occurs every time the player receives a video frame, reporting the detailed information of the video frame.
|
|
678
|
-
*
|
|
679
|
-
* @param frame Video frame information. See VideoFrame .
|
|
680
|
-
*/
|
|
681
|
-
onFrame?(frame: AudioPcmFrame): void;
|
|
682
|
-
}
|
|
683
|
-
/**
|
|
684
|
-
* Audio frame type.
|
|
685
|
-
*/
|
|
686
|
-
export declare enum AudioFrameType {
|
|
687
|
-
/**
|
|
688
|
-
* 0: PCM 16
|
|
689
|
-
*/
|
|
690
|
-
FrameTypePcm16 = 0
|
|
691
|
-
}
|
|
692
|
-
/**
|
|
693
|
-
* Raw audio data.
|
|
694
|
-
*/
|
|
695
|
-
export declare class AudioFrame {
|
|
696
|
-
/**
|
|
697
|
-
* The type of the audio frame. See AudioFrameType .
|
|
698
|
-
*/
|
|
699
|
-
type?: AudioFrameType;
|
|
700
|
-
/**
|
|
701
|
-
* The number of samples per channel in the audio frame.
|
|
702
|
-
*/
|
|
703
|
-
samplesPerChannel?: number;
|
|
704
|
-
/**
|
|
705
|
-
* The number of bytes per audio sample, which is usually 16-bit (2 bytes).
|
|
706
|
-
*/
|
|
707
|
-
bytesPerSample?: BytesPerSample;
|
|
708
|
-
/**
|
|
709
|
-
* The number of audio channels (the data are interleaved if it is stereo).1: Mono.2: Stereo.
|
|
710
|
-
*/
|
|
711
|
-
channels?: number;
|
|
712
|
-
/**
|
|
713
|
-
* The number of samples per channel in the audio frame.
|
|
714
|
-
*/
|
|
715
|
-
samplesPerSec?: number;
|
|
716
|
-
/**
|
|
717
|
-
* The data buffer of the audio frame. When the audio frame uses a stereo channel, the data buffer is interleaved.The size of the data buffer is as follows: buffer = samples ×channels × bytesPerSample.
|
|
718
|
-
*/
|
|
719
|
-
buffer?: Uint8Array;
|
|
720
|
-
/**
|
|
721
|
-
* The timestamp (ms) of the external audio frame.You can use this timestamp to restore the order of the captured audio frame, and synchronize audio and video frames in video scenarios, including scenarios where external video sources are used.
|
|
722
|
-
*/
|
|
723
|
-
renderTimeMs?: number;
|
|
724
|
-
/**
|
|
725
|
-
* Reserved for future use.
|
|
726
|
-
*/
|
|
727
|
-
avsync_type?: number;
|
|
728
|
-
}
|
|
729
|
-
/**
|
|
730
|
-
* @ignore
|
|
731
|
-
*/
|
|
732
|
-
export declare enum AudioFramePosition {
|
|
733
|
-
/**
|
|
734
|
-
* @ignore
|
|
735
|
-
*/
|
|
736
|
-
AudioFramePositionNone = 0,
|
|
737
|
-
/**
|
|
738
|
-
* @ignore
|
|
739
|
-
*/
|
|
740
|
-
AudioFramePositionPlayback = 1,
|
|
741
|
-
/**
|
|
742
|
-
* @ignore
|
|
743
|
-
*/
|
|
744
|
-
AudioFramePositionRecord = 2,
|
|
745
|
-
/**
|
|
746
|
-
* @ignore
|
|
747
|
-
*/
|
|
748
|
-
AudioFramePositionMixed = 4,
|
|
749
|
-
/**
|
|
750
|
-
* @ignore
|
|
751
|
-
*/
|
|
752
|
-
AudioFramePositionBeforeMixing = 8,
|
|
753
|
-
/**
|
|
754
|
-
* @ignore
|
|
755
|
-
*/
|
|
756
|
-
AudioFramePositionEarMonitoring = 16
|
|
757
|
-
}
|
|
758
|
-
/**
|
|
759
|
-
* Audio data format.
|
|
760
|
-
* The SDK sets the audio data format in the following callbacks according to AudioParams. onRecordAudioFrame onPlaybackAudioFrame onMixedAudioFrame The SDK calculates the sampling interval through the samplesPerCall, sampleRate, and channel parameters in AudioParams, and triggers the onRecordAudioFrame, onPlaybackAudioFrame, onMixedAudioFrame, and onEarMonitoringAudioFrame callbacks according to the sampling interval.Sample interval (sec) = samplePerCall/(sampleRate × channel).Ensure that the sample interval ≥ 0.01 (s).
|
|
761
|
-
*/
|
|
762
|
-
export declare class AudioParams {
|
|
763
|
-
/**
|
|
764
|
-
* The audio sample rate (Hz), which can be set as one of the following values:8000.(Default) 16000.32000.4410048000
|
|
765
|
-
*/
|
|
766
|
-
sample_rate?: number;
|
|
767
|
-
/**
|
|
768
|
-
* The number of audio channels, which can be set as either of the following values:1: (Default) Mono.2: Stereo.
|
|
769
|
-
*/
|
|
770
|
-
channels?: number;
|
|
771
|
-
/**
|
|
772
|
-
* The use mode of the audio data. See RawAudioFrameOpModeType .
|
|
773
|
-
*/
|
|
774
|
-
mode?: RawAudioFrameOpModeType;
|
|
775
|
-
/**
|
|
776
|
-
* The number of samples, such as 1024 for the media push.
|
|
777
|
-
*/
|
|
778
|
-
samples_per_call?: number;
|
|
779
|
-
}
|
|
780
|
-
/**
|
|
781
|
-
* The audio frame observer.
|
|
782
|
-
*/
|
|
783
|
-
export interface IAudioFrameObserverBase {
|
|
784
|
-
/**
|
|
785
|
-
* Gets the raw audio frame for playback.
|
|
786
|
-
* To ensure that the data format of audio frame for playback is as expected, Agora recommends that you set the audio data format as follows: After calling setPlaybackAudioFrameParameters to set the audio data format and registerAudioFrameObserver to register the audio frame observer object, the SDK calculates the sampling interval according to the parameters set in the methods, and triggers the onPlaybackAudioFrame callback according to the sampling interval.
|
|
787
|
-
*
|
|
788
|
-
* @param channelId The channel ID.
|
|
789
|
-
* @param audioFrame The raw audio data. See AudioFrame .
|
|
790
|
-
*
|
|
791
|
-
* @returns
|
|
792
|
-
* Reserved for future use.
|
|
793
|
-
*/
|
|
794
|
-
onRecordAudioFrame?(channelId: string, audioFrame: AudioFrame): boolean;
|
|
795
|
-
/**
|
|
796
|
-
* Gets the raw audio frame for playback.
|
|
797
|
-
* To ensure that the data format of audio frame for playback is as expected, Agora recommends that you set the audio data format as follows: After calling setPlaybackAudioFrameParameters to set the audio data format and registerAudioFrameObserver to register the audio frame observer object, the SDK calculates the sampling interval according to the parameters set in the methods, and triggers the onPlaybackAudioFrame callback according to the sampling interval.
|
|
798
|
-
*
|
|
799
|
-
* @param channelId The channel ID.
|
|
800
|
-
* @param audioFrame The raw audio data. See AudioFrame .
|
|
801
|
-
*
|
|
802
|
-
* @returns
|
|
803
|
-
* Reserved for future use.
|
|
804
|
-
*/
|
|
805
|
-
onPlaybackAudioFrame?(channelId: string, audioFrame: AudioFrame): boolean;
|
|
806
|
-
/**
|
|
807
|
-
* Gets the raw audio frame for playback.
|
|
808
|
-
* To ensure that the data format of audio frame for playback is as expected, Agora recommends that you set the audio data format as follows: After calling setPlaybackAudioFrameParameters to set the audio data format and registerAudioFrameObserver to register the audio frame observer object, the SDK calculates the sampling interval according to the parameters set in the methods, and triggers the onPlaybackAudioFrame callback according to the sampling interval.
|
|
809
|
-
*
|
|
810
|
-
* @param channelId The channel ID.
|
|
811
|
-
* @param audioFrame The raw audio data. See AudioFrame .
|
|
812
|
-
*
|
|
813
|
-
* @returns
|
|
814
|
-
* Reserved for future use.
|
|
815
|
-
*/
|
|
816
|
-
onMixedAudioFrame?(channelId: string, audioFrame: AudioFrame): boolean;
|
|
817
|
-
/**
|
|
818
|
-
* Gets the in-ear monitoring audio frame.
|
|
819
|
-
* In order to ensure that the obtained in-ear audio data meets the expectations, Agora recommends that you set the in-ear monitoring-ear audio data format as follows: After calling setEarMonitoringAudioFrameParameters to set the audio data format and registerAudioFrameObserver to register the audio frame observer object, the SDK calculates the sampling interval according to the parameters set in the methods, and triggers the onEarMonitoringAudioFrame callback according to the sampling interval.
|
|
820
|
-
*
|
|
821
|
-
* @returns
|
|
822
|
-
* Reserved for future use.
|
|
823
|
-
*/
|
|
824
|
-
onEarMonitoringAudioFrame?(audioFrame: AudioFrame): boolean;
|
|
825
|
-
}
|
|
826
|
-
/**
|
|
827
|
-
* The audio frame observer.
|
|
828
|
-
*/
|
|
829
|
-
export interface IAudioFrameObserver extends IAudioFrameObserverBase {
|
|
830
|
-
/**
|
|
831
|
-
* Retrieves the audio frame of a specified user before mixing.
|
|
832
|
-
*
|
|
833
|
-
* @param channelId The channel ID.
|
|
834
|
-
* @param uid The user ID of the specified user.
|
|
835
|
-
* @param audioFrame The raw audio data. See AudioFrame .
|
|
836
|
-
*
|
|
837
|
-
* @returns
|
|
838
|
-
* Reserved for future use.
|
|
839
|
-
*/
|
|
840
|
-
onPlaybackAudioFrameBeforeMixing?(channelId: string, uid: number, audioFrame: AudioFrame): boolean;
|
|
841
|
-
}
|
|
842
|
-
/**
|
|
843
|
-
* The audio spectrum data.
|
|
844
|
-
*/
|
|
845
|
-
export declare class AudioSpectrumData {
|
|
846
|
-
/**
|
|
847
|
-
* The audio spectrum data. Agora divides the audio frequency into 256 frequency domains, and reports the energy value of each frequency domain through this parameter. The value range of each energy type is [-300, 1] and the unit is dBFS.
|
|
848
|
-
*/
|
|
849
|
-
audioSpectrumData?: number[];
|
|
850
|
-
/**
|
|
851
|
-
* The audio spectrum data length is 256.
|
|
852
|
-
*/
|
|
853
|
-
dataLength?: number;
|
|
854
|
-
}
|
|
855
|
-
/**
|
|
856
|
-
* Audio spectrum information of the remote user.
|
|
857
|
-
*/
|
|
858
|
-
export declare class UserAudioSpectrumInfo {
|
|
859
|
-
/**
|
|
860
|
-
* The user ID of the remote user.
|
|
861
|
-
*/
|
|
862
|
-
uid?: number;
|
|
863
|
-
/**
|
|
864
|
-
* Audio spectrum information of the remote user.See AudioSpectrumData .
|
|
865
|
-
*/
|
|
866
|
-
spectrumData?: AudioSpectrumData;
|
|
867
|
-
}
|
|
868
|
-
/**
|
|
869
|
-
* The audio spectrum observer.
|
|
870
|
-
*/
|
|
871
|
-
export interface IAudioSpectrumObserver {
|
|
872
|
-
/**
|
|
873
|
-
* Gets the statistics of a local audio spectrum.
|
|
874
|
-
* After successfully calling registerAudioSpectrumObserver to implement the onLocalAudioSpectrumcallback in IAudioSpectrumObserver and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK will trigger the callback as the time interval you set to report the received remote audio data spectrum.
|
|
875
|
-
*
|
|
876
|
-
* @param data The audio spectrum data of the local user. See AudioSpectrumData .
|
|
877
|
-
*
|
|
878
|
-
* @returns
|
|
879
|
-
* Whether the spectrum data is received:true: Spectrum data is received.false: No spectrum data is received.
|
|
880
|
-
*/
|
|
881
|
-
onLocalAudioSpectrum?(data: AudioSpectrumData): boolean;
|
|
882
|
-
/**
|
|
883
|
-
* Gets the remote audio spectrum.
|
|
884
|
-
* After successfully calling registerAudioSpectrumObserver to implement the onRemoteAudioSpectrum callback in the IAudioSpectrumObserver and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK will trigger the callback as the time interval you set to report the received remote audio data spectrum.
|
|
885
|
-
*
|
|
886
|
-
* @param spectrums The audio spectrum information of the remote user, see UserAudioSpectrumInfo . The number of arrays is the number of remote users monitored by the SDK. If the array is null, it means that no audio spectrum of remote users is detected.
|
|
887
|
-
* @param spectrumNumber The number of remote users.
|
|
888
|
-
*
|
|
889
|
-
* @returns
|
|
890
|
-
* Whether the spectrum data is received:true: Spectrum data is received.false: No spectrum data is received.
|
|
891
|
-
*/
|
|
892
|
-
onRemoteAudioSpectrum?(spectrums: UserAudioSpectrumInfo[], spectrumNumber: number): boolean;
|
|
893
|
-
}
|
|
894
|
-
/**
|
|
895
|
-
* Receives encoded video images.
|
|
896
|
-
*/
|
|
897
|
-
export interface IVideoEncodedFrameObserver {
|
|
898
|
-
/**
|
|
899
|
-
* Reports that the receiver has received the to-be-decoded video frame sent by the remote end.
|
|
900
|
-
* If you call the setRemoteVideoSubscriptionOptions method and set encodedFrameOnly to true, the SDK triggers this callback locally to report the received encoded video frame information.
|
|
901
|
-
*
|
|
902
|
-
* @param uid The user ID of the remote user.
|
|
903
|
-
* @param imageBuffer The encoded video image buffer.
|
|
904
|
-
* @param length The data length of the video image.
|
|
905
|
-
* @param videoEncodedFrameInfo For the information of the encoded video frame, see EncodedVideoFrameInfo .
|
|
906
|
-
*
|
|
907
|
-
* @returns
|
|
908
|
-
* Reserved for future use.
|
|
909
|
-
*/
|
|
910
|
-
onEncodedVideoFrameReceived?(uid: number, imageBuffer: Uint8Array, length: number, videoEncodedFrameInfo: EncodedVideoFrameInfo): boolean;
|
|
911
|
-
}
|
|
912
|
-
/**
|
|
913
|
-
* The process mode of the video frame:
|
|
914
|
-
*/
|
|
915
|
-
export declare enum VideoFrameProcessMode {
|
|
916
|
-
/**
|
|
917
|
-
* Read-only mode.In this mode, you do not modify the video frame. The video frame observer is a renderer.
|
|
918
|
-
*/
|
|
919
|
-
ProcessModeReadOnly = 0,
|
|
920
|
-
/**
|
|
921
|
-
* Read and write mode.In this mode, you modify the video frame. The video frame observer is a video filter.
|
|
922
|
-
*/
|
|
923
|
-
ProcessModeReadWrite = 1
|
|
924
|
-
}
|
|
925
|
-
/**
|
|
926
|
-
* The IVideoFrameObserver class.
|
|
927
|
-
*/
|
|
928
|
-
export interface IVideoFrameObserver {
|
|
929
|
-
/**
|
|
930
|
-
* Occurs each time the SDK receives a video frame captured by the local camera.
|
|
931
|
-
* After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data captured by the local camera. You can then pre-process the data according to your scenarios.After pre-processing, you can send the processed video data back to the SDK through this callback.The video data that this callback gets has not been pre-processed, and is not watermarked, cropped, rotated or beautified.If the video data type you get is RGBA, the SDK does not support processing the data of the alpha channel.
|
|
932
|
-
*
|
|
933
|
-
* @param videoFrame The video frame. See VideoFrame .The default value of the video frame data format obtained through this callback is as follows:macOS: YUV 420Windows: YUV 420
|
|
934
|
-
*
|
|
935
|
-
* @returns
|
|
936
|
-
* When the video processing mode is ProcessModeReadOnly:true: Reserved for future use.false: Reserved for future use.When the video processing mode is ProcessModeReadWrite:true: Sets the SDK to receive the video frame.false: Sets the SDK to discard the video frame.
|
|
937
|
-
*/
|
|
938
|
-
onCaptureVideoFrame?(sourceType: VideoSourceType, videoFrame: VideoFrame): boolean;
|
|
939
|
-
/**
|
|
940
|
-
* Occurs each time the SDK receives a video frame before encoding.
|
|
941
|
-
* After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data before encoding and then process the data according to your particular scenarios.After processing, you can send the processed video data back to the SDK in this callback.The video data that this callback gets has been preprocessed, with its content cropped and rotated, and the image enhanced.
|
|
942
|
-
*
|
|
943
|
-
* @param videoFrame The video frame. See VideoFrame .The default value of the video frame data format obtained through this callback is as follows:macOS: YUV 420Windows: YUV 420
|
|
944
|
-
*
|
|
945
|
-
* @returns
|
|
946
|
-
* When the video processing mode is ProcessModeReadOnly:true: Reserved for future use.false: Reserved for future use.When the video processing mode is ProcessModeReadWrite:true: Sets the SDK to receive the video frame.false: Sets the SDK to discard the video frame.
|
|
947
|
-
*/
|
|
948
|
-
onPreEncodeVideoFrame?(sourceType: VideoSourceType, videoFrame: VideoFrame): boolean;
|
|
949
|
-
/**
|
|
950
|
-
* @ignore
|
|
951
|
-
*/
|
|
952
|
-
onMediaPlayerVideoFrame?(videoFrame: VideoFrame, mediaPlayerId: number): boolean;
|
|
953
|
-
/**
|
|
954
|
-
* Occurs each time the SDK receives a video frame sent by the remote user.
|
|
955
|
-
* After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data sent from the remote end before rendering, and then process it according to the particular scenarios.If the video data type you get is RGBA, the SDK does not support processing the data of the alpha channel.
|
|
956
|
-
*
|
|
957
|
-
* @param channelId The channel ID.
|
|
958
|
-
* @param remoteUid The user ID of the remote user who sends the current video frame.
|
|
959
|
-
* @param videoFrame The video frame. See VideoFrame .The default value of the video frame data format obtained through this callback is as follows:
|
|
960
|
-
* macOS: YUV 420
|
|
961
|
-
* Windows: YUV 420
|
|
962
|
-
*
|
|
963
|
-
* @returns
|
|
964
|
-
* When the video processing mode is ProcessModeReadOnly:
|
|
965
|
-
* true: Reserved for future use.
|
|
966
|
-
* false: Reserved for future use. When the video processing mode is ProcessModeReadWrite:
|
|
967
|
-
* true: Sets the SDK to receive the video frame.
|
|
968
|
-
* false: Sets the SDK to discard the video frame.
|
|
969
|
-
*/
|
|
970
|
-
onRenderVideoFrame?(channelId: string, remoteUid: number, videoFrame: VideoFrame): boolean;
|
|
971
|
-
/**
|
|
972
|
-
* Occurs each time the SDK receives a video frame before encoding.
|
|
973
|
-
* After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data before encoding and then process the data according to your particular scenarios.After processing, you can send the processed video data back to the SDK in this callback.The video data that this callback gets has been preprocessed, with its content cropped and rotated, and the image enhanced.
|
|
974
|
-
*
|
|
975
|
-
* @param videoFrame The video frame. See VideoFrame .The default value of the video frame data format obtained through this callback is as follows:macOS: YUV 420Windows: YUV 420
|
|
976
|
-
*
|
|
977
|
-
* @returns
|
|
978
|
-
* When the video processing mode is ProcessModeReadOnly:true: Reserved for future use.false: Reserved for future use.When the video processing mode is ProcessModeReadWrite:true: Sets the SDK to receive the video frame.false: Sets the SDK to discard the video frame.
|
|
979
|
-
*/
|
|
980
|
-
onTranscodedVideoFrame?(videoFrame: VideoFrame): boolean;
|
|
981
|
-
}
|
|
982
|
-
/**
|
|
983
|
-
* The external video frame encoding type.
|
|
984
|
-
*/
|
|
985
|
-
export declare enum ExternalVideoSourceType {
|
|
986
|
-
/**
|
|
987
|
-
* 0: The video frame is not encoded.
|
|
988
|
-
*/
|
|
989
|
-
VideoFrame = 0,
|
|
990
|
-
/**
|
|
991
|
-
* 1: The video frame is encoded.
|
|
992
|
-
*/
|
|
993
|
-
EncodedVideoFrame = 1
|
|
994
|
-
}
|
|
995
|
-
/**
|
|
996
|
-
* The format of the recording file.
|
|
997
|
-
*/
|
|
998
|
-
export declare enum MediaRecorderContainerFormat {
|
|
999
|
-
/**
|
|
1000
|
-
* 1: (Default) MP4.
|
|
1001
|
-
*/
|
|
1002
|
-
FormatMp4 = 1
|
|
1003
|
-
}
|
|
1004
|
-
/**
|
|
1005
|
-
* The recording content.
|
|
1006
|
-
*/
|
|
1007
|
-
export declare enum MediaRecorderStreamType {
|
|
1008
|
-
/**
|
|
1009
|
-
* Only audio.
|
|
1010
|
-
*/
|
|
1011
|
-
StreamTypeAudio = 1,
|
|
1012
|
-
/**
|
|
1013
|
-
* Only video.
|
|
1014
|
-
*/
|
|
1015
|
-
StreamTypeVideo = 2,
|
|
1016
|
-
/**
|
|
1017
|
-
* (Default) Audio and video.
|
|
1018
|
-
*/
|
|
1019
|
-
StreamTypeBoth = 3
|
|
1020
|
-
}
|
|
1021
|
-
/**
|
|
1022
|
-
* The current recording state.
|
|
1023
|
-
*/
|
|
1024
|
-
export declare enum RecorderState {
|
|
1025
|
-
/**
|
|
1026
|
-
* -1: An error occurs during the recording. See RecorderErrorCode for the reason.
|
|
1027
|
-
*/
|
|
1028
|
-
RecorderStateError = -1,
|
|
1029
|
-
/**
|
|
1030
|
-
* 2: The audio and video recording starts.
|
|
1031
|
-
*/
|
|
1032
|
-
RecorderStateStart = 2,
|
|
1033
|
-
/**
|
|
1034
|
-
* 3: The audio and video recording stops.
|
|
1035
|
-
*/
|
|
1036
|
-
RecorderStateStop = 3
|
|
1037
|
-
}
|
|
1038
|
-
/**
|
|
1039
|
-
* The reason for the state change.
|
|
1040
|
-
*/
|
|
1041
|
-
export declare enum RecorderErrorCode {
|
|
1042
|
-
/**
|
|
1043
|
-
* 0: No error.
|
|
1044
|
-
*/
|
|
1045
|
-
RecorderErrorNone = 0,
|
|
1046
|
-
/**
|
|
1047
|
-
* 1: The SDK fails to write the recorded data to a file.
|
|
1048
|
-
*/
|
|
1049
|
-
RecorderErrorWriteFailed = 1,
|
|
1050
|
-
/**
|
|
1051
|
-
* 2: The SDK does not detect any audio and video streams, or audio and video streams are interrupted for more than five seconds during recording.
|
|
1052
|
-
*/
|
|
1053
|
-
RecorderErrorNoStream = 2,
|
|
1054
|
-
/**
|
|
1055
|
-
* 3: The recording duration exceeds the upper limit.
|
|
1056
|
-
*/
|
|
1057
|
-
RecorderErrorOverMaxDuration = 3,
|
|
1058
|
-
/**
|
|
1059
|
-
* 4: The recording configuration changes.
|
|
1060
|
-
*/
|
|
1061
|
-
RecorderErrorConfigChanged = 4
|
|
1062
|
-
}
|
|
1063
|
-
/**
|
|
1064
|
-
* Configurations for the local audio and video recording.
|
|
1065
|
-
*/
|
|
1066
|
-
export declare class MediaRecorderConfiguration {
|
|
1067
|
-
/**
|
|
1068
|
-
* The absolute path (including the filename extensions) of the recording file. For example:Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\example.mp4iOS: /App Sandbox/Library/Caches/example.mp4macOS: /Library/Logs/example.mp4Android: /storage/emulated/0/Android/data/<package name>/files/example.mp4Ensure that the directory for the log files exists and is writable.
|
|
1069
|
-
*/
|
|
1070
|
-
storagePath?: string;
|
|
1071
|
-
/**
|
|
1072
|
-
* The format of the recording file. See MediaRecorderContainerFormat .
|
|
1073
|
-
*/
|
|
1074
|
-
containerFormat?: MediaRecorderContainerFormat;
|
|
1075
|
-
/**
|
|
1076
|
-
* The recording content. See MediaRecorderStreamType .
|
|
1077
|
-
*/
|
|
1078
|
-
streamType?: MediaRecorderStreamType;
|
|
1079
|
-
/**
|
|
1080
|
-
* The maximum recording duration, in milliseconds. The default value is 120000.
|
|
1081
|
-
*/
|
|
1082
|
-
maxDurationMs?: number;
|
|
1083
|
-
/**
|
|
1084
|
-
* The interval (ms) of updating the recording information. The value range is [1000,10000]. Based on the value you set in this parameter, the SDK triggers the onRecorderInfoUpdated callback to report the updated recording information.
|
|
1085
|
-
*/
|
|
1086
|
-
recorderInfoUpdateInterval?: number;
|
|
1087
|
-
}
|
|
1088
|
-
/**
|
|
1089
|
-
* The information about the file that is recorded.
|
|
1090
|
-
*/
|
|
1091
|
-
export declare class RecorderInfo {
|
|
1092
|
-
/**
|
|
1093
|
-
* The absolute path of the recording file.
|
|
1094
|
-
*/
|
|
1095
|
-
fileName?: string;
|
|
1096
|
-
/**
|
|
1097
|
-
* The recording duration (ms).
|
|
1098
|
-
*/
|
|
1099
|
-
durationMs?: number;
|
|
1100
|
-
/**
|
|
1101
|
-
* The size (bytes) of the recording file.
|
|
1102
|
-
*/
|
|
1103
|
-
fileSize?: number;
|
|
1104
|
-
}
|
|
1105
|
-
/**
|
|
1106
|
-
* The IMediaRecorderObserver class.
|
|
1107
|
-
*/
|
|
1108
|
-
export interface IMediaRecorderObserver {
|
|
1109
|
-
/**
|
|
1110
|
-
* Occurs when the recording state changes.
|
|
1111
|
-
* When the local audio or video recording state changes, the SDK triggers this callback to report the current recording state and the reason for the change.
|
|
1112
|
-
*
|
|
1113
|
-
* @param state The current recording state. See RecorderState .
|
|
1114
|
-
* @param error The reason for the state change. See RecorderErrorCode .
|
|
1115
|
-
*/
|
|
1116
|
-
onRecorderStateChanged?(channelId: string, uid: number, state: RecorderState, error: RecorderErrorCode): void;
|
|
1117
|
-
/**
|
|
1118
|
-
* Occurs when the recording information is updated.
|
|
1119
|
-
* After you successfully enable the local audio and video recording, the SDK periodically triggers this callback based on the value of recorderInfoUpdateInterval set in MediaRecorderConfiguration . This callback reports the file name, duration, and size of the current recording file.
|
|
1120
|
-
*
|
|
1121
|
-
* @param info The information about the file that is recorded. See RecorderInfo .
|
|
1122
|
-
*/
|
|
1123
|
-
onRecorderInfoUpdated?(channelId: string, uid: number, info: RecorderInfo): void;
|
|
1124
|
-
}
|