agora-electron-sdk 4.2.0-dev.4 → 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 +5 -4
- 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,408 +0,0 @@
|
|
|
1
|
-
import './extension/AgoraMediaPlayerTypesExtension';
|
|
2
|
-
/**
|
|
3
|
-
* The playback state.
|
|
4
|
-
*/
|
|
5
|
-
export declare enum MediaPlayerState {
|
|
6
|
-
/**
|
|
7
|
-
* 0: The default state. The media player returns this state code before you open the media resource or after you stop the playback.
|
|
8
|
-
*/
|
|
9
|
-
PlayerStateIdle = 0,
|
|
10
|
-
/**
|
|
11
|
-
* 1: Opening the media resource.
|
|
12
|
-
*/
|
|
13
|
-
PlayerStateOpening = 1,
|
|
14
|
-
/**
|
|
15
|
-
* 2: Opens the media resource successfully.
|
|
16
|
-
*/
|
|
17
|
-
PlayerStateOpenCompleted = 2,
|
|
18
|
-
/**
|
|
19
|
-
* 3: The media resource is playing.
|
|
20
|
-
*/
|
|
21
|
-
PlayerStatePlaying = 3,
|
|
22
|
-
/**
|
|
23
|
-
* 4: Pauses the playback.
|
|
24
|
-
*/
|
|
25
|
-
PlayerStatePaused = 4,
|
|
26
|
-
/**
|
|
27
|
-
* 5: The playback is complete.
|
|
28
|
-
*/
|
|
29
|
-
PlayerStatePlaybackCompleted = 5,
|
|
30
|
-
/**
|
|
31
|
-
* 6: The loop is complete.
|
|
32
|
-
*/
|
|
33
|
-
PlayerStatePlaybackAllLoopsCompleted = 6,
|
|
34
|
-
/**
|
|
35
|
-
* 7: The playback stops.
|
|
36
|
-
*/
|
|
37
|
-
PlayerStateStopped = 7,
|
|
38
|
-
/**
|
|
39
|
-
* @ignore
|
|
40
|
-
*/
|
|
41
|
-
PlayerStatePausingInternal = 50,
|
|
42
|
-
/**
|
|
43
|
-
* @ignore
|
|
44
|
-
*/
|
|
45
|
-
PlayerStateStoppingInternal = 51,
|
|
46
|
-
/**
|
|
47
|
-
* @ignore
|
|
48
|
-
*/
|
|
49
|
-
PlayerStateSeekingInternal = 52,
|
|
50
|
-
/**
|
|
51
|
-
* @ignore
|
|
52
|
-
*/
|
|
53
|
-
PlayerStateGettingInternal = 53,
|
|
54
|
-
/**
|
|
55
|
-
* @ignore
|
|
56
|
-
*/
|
|
57
|
-
PlayerStateNoneInternal = 54,
|
|
58
|
-
/**
|
|
59
|
-
* @ignore
|
|
60
|
-
*/
|
|
61
|
-
PlayerStateDoNothingInternal = 55,
|
|
62
|
-
/**
|
|
63
|
-
* @ignore
|
|
64
|
-
*/
|
|
65
|
-
PlayerStateSetTrackInternal = 56,
|
|
66
|
-
/**
|
|
67
|
-
* 100: The media player fails to play the media resource.
|
|
68
|
-
*/
|
|
69
|
-
PlayerStateFailed = 100
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Error codes of the media player.
|
|
73
|
-
*/
|
|
74
|
-
export declare enum MediaPlayerError {
|
|
75
|
-
/**
|
|
76
|
-
* 0: No error.
|
|
77
|
-
*/
|
|
78
|
-
PlayerErrorNone = 0,
|
|
79
|
-
/**
|
|
80
|
-
* -1: Invalid arguments.
|
|
81
|
-
*/
|
|
82
|
-
PlayerErrorInvalidArguments = -1,
|
|
83
|
-
/**
|
|
84
|
-
* -2: Internal error.
|
|
85
|
-
*/
|
|
86
|
-
PlayerErrorInternal = -2,
|
|
87
|
-
/**
|
|
88
|
-
* -3: No resource.
|
|
89
|
-
*/
|
|
90
|
-
PlayerErrorNoResource = -3,
|
|
91
|
-
/**
|
|
92
|
-
* -4: Invalid media resource.
|
|
93
|
-
*/
|
|
94
|
-
PlayerErrorInvalidMediaSource = -4,
|
|
95
|
-
/**
|
|
96
|
-
* -5: The media stream type is unknown.
|
|
97
|
-
*/
|
|
98
|
-
PlayerErrorUnknownStreamType = -5,
|
|
99
|
-
/**
|
|
100
|
-
* -6: The object is not initialized.
|
|
101
|
-
*/
|
|
102
|
-
PlayerErrorObjNotInitialized = -6,
|
|
103
|
-
/**
|
|
104
|
-
* -7: The codec is not supported.
|
|
105
|
-
*/
|
|
106
|
-
PlayerErrorCodecNotSupported = -7,
|
|
107
|
-
/**
|
|
108
|
-
* -8: Invalid renderer.
|
|
109
|
-
*/
|
|
110
|
-
PlayerErrorVideoRenderFailed = -8,
|
|
111
|
-
/**
|
|
112
|
-
* -9: An error with the internal state of the player occurs.
|
|
113
|
-
*/
|
|
114
|
-
PlayerErrorInvalidState = -9,
|
|
115
|
-
/**
|
|
116
|
-
* -10: The URL of the media resource cannot be found.
|
|
117
|
-
*/
|
|
118
|
-
PlayerErrorUrlNotFound = -10,
|
|
119
|
-
/**
|
|
120
|
-
* -11: Invalid connection between the player and the Agora Server.
|
|
121
|
-
*/
|
|
122
|
-
PlayerErrorInvalidConnectionState = -11,
|
|
123
|
-
/**
|
|
124
|
-
* -12: The playback buffer is insufficient.
|
|
125
|
-
*/
|
|
126
|
-
PlayerErrorSrcBufferUnderflow = -12,
|
|
127
|
-
/**
|
|
128
|
-
* -13: The playback is interrupted.
|
|
129
|
-
*/
|
|
130
|
-
PlayerErrorInterrupted = -13,
|
|
131
|
-
/**
|
|
132
|
-
* -14: The SDK does not support the method being called.
|
|
133
|
-
*/
|
|
134
|
-
PlayerErrorNotSupported = -14,
|
|
135
|
-
/**
|
|
136
|
-
* @ignore
|
|
137
|
-
*/
|
|
138
|
-
PlayerErrorTokenExpired = -15,
|
|
139
|
-
/**
|
|
140
|
-
* @ignore
|
|
141
|
-
*/
|
|
142
|
-
PlayerErrorIpExpired = -16,
|
|
143
|
-
/**
|
|
144
|
-
* -17: An unknown error.
|
|
145
|
-
*/
|
|
146
|
-
PlayerErrorUnknown = -17
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* The type of the media stream.
|
|
150
|
-
*/
|
|
151
|
-
export declare enum MediaStreamType {
|
|
152
|
-
/**
|
|
153
|
-
* 0: The type is unknown.
|
|
154
|
-
*/
|
|
155
|
-
StreamTypeUnknown = 0,
|
|
156
|
-
/**
|
|
157
|
-
* 1: The video stream.
|
|
158
|
-
*/
|
|
159
|
-
StreamTypeVideo = 1,
|
|
160
|
-
/**
|
|
161
|
-
* 2: The audio stream.
|
|
162
|
-
*/
|
|
163
|
-
StreamTypeAudio = 2,
|
|
164
|
-
/**
|
|
165
|
-
* 3: The subtitle stream.
|
|
166
|
-
*/
|
|
167
|
-
StreamTypeSubtitle = 3
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Media player events.
|
|
171
|
-
*/
|
|
172
|
-
export declare enum MediaPlayerEvent {
|
|
173
|
-
/**
|
|
174
|
-
* 0: The player begins to seek to a new playback position.
|
|
175
|
-
*/
|
|
176
|
-
PlayerEventSeekBegin = 0,
|
|
177
|
-
/**
|
|
178
|
-
* 1: The player finishes seeking to a new playback position.
|
|
179
|
-
*/
|
|
180
|
-
PlayerEventSeekComplete = 1,
|
|
181
|
-
/**
|
|
182
|
-
* 2: An error occurs when seeking to a new playback position.
|
|
183
|
-
*/
|
|
184
|
-
PlayerEventSeekError = 2,
|
|
185
|
-
/**
|
|
186
|
-
* 5: The audio track used by the player has been changed.
|
|
187
|
-
*/
|
|
188
|
-
PlayerEventAudioTrackChanged = 5,
|
|
189
|
-
/**
|
|
190
|
-
* 6: The currently buffered data is not enough to support playback.
|
|
191
|
-
*/
|
|
192
|
-
PlayerEventBufferLow = 6,
|
|
193
|
-
/**
|
|
194
|
-
* 7: The currently buffered data is just enough to support playback.
|
|
195
|
-
*/
|
|
196
|
-
PlayerEventBufferRecover = 7,
|
|
197
|
-
/**
|
|
198
|
-
* 8: The audio or video playback freezes.
|
|
199
|
-
*/
|
|
200
|
-
PlayerEventFreezeStart = 8,
|
|
201
|
-
/**
|
|
202
|
-
* 9: The audio or video playback resumes without freezing.
|
|
203
|
-
*/
|
|
204
|
-
PlayerEventFreezeStop = 9,
|
|
205
|
-
/**
|
|
206
|
-
* 10: The player starts switching the media resource.
|
|
207
|
-
*/
|
|
208
|
-
PlayerEventSwitchBegin = 10,
|
|
209
|
-
/**
|
|
210
|
-
* 11: Media resource switching is complete.
|
|
211
|
-
*/
|
|
212
|
-
PlayerEventSwitchComplete = 11,
|
|
213
|
-
/**
|
|
214
|
-
* 12: Media resource switching error.
|
|
215
|
-
*/
|
|
216
|
-
PlayerEventSwitchError = 12,
|
|
217
|
-
/**
|
|
218
|
-
* 13: The first video frame is rendered.
|
|
219
|
-
*/
|
|
220
|
-
PlayerEventFirstDisplayed = 13,
|
|
221
|
-
/**
|
|
222
|
-
* 14: The cached media files reach the limit in number.
|
|
223
|
-
*/
|
|
224
|
-
PlayerEventReachCacheFileMaxCount = 14,
|
|
225
|
-
/**
|
|
226
|
-
* 15: The cached media files reach the limit in aggregate storage space.
|
|
227
|
-
*/
|
|
228
|
-
PlayerEventReachCacheFileMaxSize = 15,
|
|
229
|
-
/**
|
|
230
|
-
* @ignore
|
|
231
|
-
*/
|
|
232
|
-
PlayerEventTryOpenStart = 16,
|
|
233
|
-
/**
|
|
234
|
-
* @ignore
|
|
235
|
-
*/
|
|
236
|
-
PlayerEventTryOpenSucceed = 17,
|
|
237
|
-
/**
|
|
238
|
-
* @ignore
|
|
239
|
-
*/
|
|
240
|
-
PlayerEventTryOpenFailed = 18
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Events that occur when media resources are preloaded.
|
|
244
|
-
*/
|
|
245
|
-
export declare enum PlayerPreloadEvent {
|
|
246
|
-
/**
|
|
247
|
-
* 0: Starts preloading media resources.
|
|
248
|
-
*/
|
|
249
|
-
PlayerPreloadEventBegin = 0,
|
|
250
|
-
/**
|
|
251
|
-
* 1: Preloading media resources is complete.
|
|
252
|
-
*/
|
|
253
|
-
PlayerPreloadEventComplete = 1,
|
|
254
|
-
/**
|
|
255
|
-
* 2: An error occurs when preloading media resources.
|
|
256
|
-
*/
|
|
257
|
-
PlayerPreloadEventError = 2
|
|
258
|
-
}
|
|
259
|
-
/**
|
|
260
|
-
* The detailed information of the media stream.
|
|
261
|
-
*/
|
|
262
|
-
export declare class PlayerStreamInfo {
|
|
263
|
-
/**
|
|
264
|
-
* The index of the media stream.
|
|
265
|
-
*/
|
|
266
|
-
streamIndex?: number;
|
|
267
|
-
/**
|
|
268
|
-
* The type of the media stream. See MediaStreamType .
|
|
269
|
-
*/
|
|
270
|
-
streamType?: MediaStreamType;
|
|
271
|
-
/**
|
|
272
|
-
* The codec of the media stream.
|
|
273
|
-
*/
|
|
274
|
-
codecName?: string;
|
|
275
|
-
/**
|
|
276
|
-
* The language of the media stream.
|
|
277
|
-
*/
|
|
278
|
-
language?: string;
|
|
279
|
-
/**
|
|
280
|
-
* This parameter only takes effect for video streams, and indicates the video frame rate (fps).
|
|
281
|
-
*/
|
|
282
|
-
videoFrameRate?: number;
|
|
283
|
-
/**
|
|
284
|
-
* This parameter only takes effect for video streams, and indicates the video bitrate (bps).
|
|
285
|
-
*/
|
|
286
|
-
videoBitRate?: number;
|
|
287
|
-
/**
|
|
288
|
-
* This parameter only takes effect for video streams, and indicates the video width (pixel).
|
|
289
|
-
*/
|
|
290
|
-
videoWidth?: number;
|
|
291
|
-
/**
|
|
292
|
-
* This parameter only takes effect for video streams, and indicates the video height (pixel).
|
|
293
|
-
*/
|
|
294
|
-
videoHeight?: number;
|
|
295
|
-
/**
|
|
296
|
-
* This parameter only takes effect for video streams, and indicates the video rotation angle.
|
|
297
|
-
*/
|
|
298
|
-
videoRotation?: number;
|
|
299
|
-
/**
|
|
300
|
-
* This parameter only takes effect for audio streams, and indicates the audio sample rate (Hz).
|
|
301
|
-
*/
|
|
302
|
-
audioSampleRate?: number;
|
|
303
|
-
/**
|
|
304
|
-
* This parameter only takes effect for audio streams, and indicates the audio channel number.
|
|
305
|
-
*/
|
|
306
|
-
audioChannels?: number;
|
|
307
|
-
/**
|
|
308
|
-
* This parameter only takes effect for audio streams, and indicates the bit number of each audio sample.
|
|
309
|
-
*/
|
|
310
|
-
audioBitsPerSample?: number;
|
|
311
|
-
/**
|
|
312
|
-
* The total duration (s) of the media stream.
|
|
313
|
-
*/
|
|
314
|
-
duration?: number;
|
|
315
|
-
}
|
|
316
|
-
/**
|
|
317
|
-
* Information about the video bitrate of the media resource being played.
|
|
318
|
-
*/
|
|
319
|
-
export declare class SrcInfo {
|
|
320
|
-
/**
|
|
321
|
-
* The video bitrate (Kbps) of the media resource being played.
|
|
322
|
-
*/
|
|
323
|
-
bitrateInKbps?: number;
|
|
324
|
-
/**
|
|
325
|
-
* The name of the media resource.
|
|
326
|
-
*/
|
|
327
|
-
name?: string;
|
|
328
|
-
}
|
|
329
|
-
/**
|
|
330
|
-
* The type of media metadata.
|
|
331
|
-
*/
|
|
332
|
-
export declare enum MediaPlayerMetadataType {
|
|
333
|
-
/**
|
|
334
|
-
* 0: The type is unknown.
|
|
335
|
-
*/
|
|
336
|
-
PlayerMetadataTypeUnknown = 0,
|
|
337
|
-
/**
|
|
338
|
-
* 1: The type is SEI.
|
|
339
|
-
*/
|
|
340
|
-
PlayerMetadataTypeSei = 1
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* Statistics about the media files being cached.
|
|
344
|
-
*/
|
|
345
|
-
export declare class CacheStatistics {
|
|
346
|
-
/**
|
|
347
|
-
* The size (bytes) of the media file being played.
|
|
348
|
-
*/
|
|
349
|
-
fileSize?: number;
|
|
350
|
-
/**
|
|
351
|
-
* The size (bytes) of the media file that you want to cache.
|
|
352
|
-
*/
|
|
353
|
-
cacheSize?: number;
|
|
354
|
-
/**
|
|
355
|
-
* The size (bytes) of the media file that has been downloaded.
|
|
356
|
-
*/
|
|
357
|
-
downloadSize?: number;
|
|
358
|
-
}
|
|
359
|
-
/**
|
|
360
|
-
* Information related to the media player.
|
|
361
|
-
*/
|
|
362
|
-
export declare class PlayerUpdatedInfo {
|
|
363
|
-
/**
|
|
364
|
-
* The ID of a media player.
|
|
365
|
-
*/
|
|
366
|
-
playerId?: string;
|
|
367
|
-
/**
|
|
368
|
-
* The ID of a deivce.
|
|
369
|
-
*/
|
|
370
|
-
deviceId?: string;
|
|
371
|
-
/**
|
|
372
|
-
* The statistics about the media file being cached.If you call the openWithMediaSource method and set enableCache as true, the statistics about the media file being cached is updated every second after the media file is played. See CacheStatistics .
|
|
373
|
-
*/
|
|
374
|
-
cacheStatistics?: CacheStatistics;
|
|
375
|
-
}
|
|
376
|
-
/**
|
|
377
|
-
* Information related to the media file to be played and the playback scenario configurations.
|
|
378
|
-
*/
|
|
379
|
-
export declare class MediaSource {
|
|
380
|
-
/**
|
|
381
|
-
* The URL of the media file to be played.
|
|
382
|
-
*/
|
|
383
|
-
url?: string;
|
|
384
|
-
/**
|
|
385
|
-
* The URI (Uniform Resource Identifier) of the media file.
|
|
386
|
-
*/
|
|
387
|
-
uri?: string;
|
|
388
|
-
/**
|
|
389
|
-
* The starting position (ms) for playback. The default value is 0.
|
|
390
|
-
*/
|
|
391
|
-
startPos?: number;
|
|
392
|
-
/**
|
|
393
|
-
* Whether to enable autoplay once the media file is opened:true: (Default) Enables autoplay.false: Disables autoplay.If autoplay is disabled, you need to call the play method to play a media file after it is opened.
|
|
394
|
-
*/
|
|
395
|
-
autoPlay?: boolean;
|
|
396
|
-
/**
|
|
397
|
-
* Whether to cache the media file when it is being played:true:Enables caching.false: (Default) Disables caching.The SDK only supports caching on-demand streams.If you need to enable caching, pass in a value to uri; otherwise, caching is based on the url of the media file.If you enable this function, the Media Player caches part of the media file being played on your local device, and you can play the cached media file without internet connection. The statistics about the media file being cached are updated every second after the media file is played. See CacheStatistics .
|
|
398
|
-
*/
|
|
399
|
-
enableCache?: boolean;
|
|
400
|
-
/**
|
|
401
|
-
* Whether the media resource to be opened is a live stream or on-demand video distributed through Media Broadcast service:true: The media resource to be played is a live or on-demand video distributed through Media Broadcast service.false: (Default) The media resource is not a live stream or on-demand video distributed through Media Broadcast service.If you need to open a live stream or on-demand video distributed through Broadcast Streaming service, pass in the URL of the media resource to url, and set isAgoraSource as true; otherwise, you don't need to set the isAgoraSource parameter.
|
|
402
|
-
*/
|
|
403
|
-
isAgoraSource?: boolean;
|
|
404
|
-
/**
|
|
405
|
-
* Whether the media resource to be opened is a live stream:true: The media resource is a live stream.false: (Default) The media resource is not a live stream.If the media resource you want to open is a live stream, Agora recommends that you set this parameter as true so that the live stream can be loaded more quickly.If the media resource you open is not a live stream, but you set isLiveSource as true, the media resource is not to be loaded more quickly.
|
|
406
|
-
*/
|
|
407
|
-
isLiveSource?: boolean;
|
|
408
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import './extension/IAgoraLogExtension';
|
|
2
|
-
/**
|
|
3
|
-
* The output log level of the SDK.
|
|
4
|
-
*/
|
|
5
|
-
export declare enum LogLevel {
|
|
6
|
-
/**
|
|
7
|
-
* 0: Do not output any log information.
|
|
8
|
-
*/
|
|
9
|
-
LogLevelNone = 0,
|
|
10
|
-
/**
|
|
11
|
-
* 0x0001: (Default) Output FATAL, ERROR, WARN, and INFO level log information. We recommend setting your log filter to this level.
|
|
12
|
-
*/
|
|
13
|
-
LogLevelInfo = 1,
|
|
14
|
-
/**
|
|
15
|
-
* 0x0002: Output FATAL, ERROR, and WARN level log information.
|
|
16
|
-
*/
|
|
17
|
-
LogLevelWarn = 2,
|
|
18
|
-
/**
|
|
19
|
-
* 0x0004: Output FATAL and ERROR level log information.
|
|
20
|
-
*/
|
|
21
|
-
LogLevelError = 4,
|
|
22
|
-
/**
|
|
23
|
-
* 0x0008: Output FATAL level log information.
|
|
24
|
-
*/
|
|
25
|
-
LogLevelFatal = 8,
|
|
26
|
-
/**
|
|
27
|
-
* @ignore
|
|
28
|
-
*/
|
|
29
|
-
LogLevelApiCall = 16
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* The output log level of the SDK.
|
|
33
|
-
*/
|
|
34
|
-
export declare enum LogFilterType {
|
|
35
|
-
/**
|
|
36
|
-
* 0: Do not output any log information.
|
|
37
|
-
*/
|
|
38
|
-
LogFilterOff = 0,
|
|
39
|
-
/**
|
|
40
|
-
* 0x080f: Output all log information. Set your log filter to this level if you want to get the most complete log file.
|
|
41
|
-
*/
|
|
42
|
-
LogFilterDebug = 2063,
|
|
43
|
-
/**
|
|
44
|
-
* 0x000f: Output LogFilterCritical, LogFilterError, LogFilterWarn, and LogFilterInfo level log information. We recommend setting your log filter to this level.
|
|
45
|
-
*/
|
|
46
|
-
LogFilterInfo = 15,
|
|
47
|
-
/**
|
|
48
|
-
* 0x000e: Output LogFilterCritical, LogFilterError, and LogFilterWarn level log information.
|
|
49
|
-
*/
|
|
50
|
-
LogFilterWarn = 14,
|
|
51
|
-
/**
|
|
52
|
-
* 0x000c: Output LogFilterCritical and LogFilterError level log information.
|
|
53
|
-
*/
|
|
54
|
-
LogFilterError = 12,
|
|
55
|
-
/**
|
|
56
|
-
* 0x0008: Output LogFilterCritical level log information.
|
|
57
|
-
*/
|
|
58
|
-
LogFilterCritical = 8,
|
|
59
|
-
/**
|
|
60
|
-
* @ignore
|
|
61
|
-
*/
|
|
62
|
-
LogFilterMask = 2063
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Configuration of Agora SDK log files.
|
|
66
|
-
*/
|
|
67
|
-
export declare class LogConfig {
|
|
68
|
-
/**
|
|
69
|
-
* The complete path of the log files. Ensure that the path for the log file exists and is writable. You can use this parameter to rename the log files.The default file path is:macOSIf Sandbox is enabled: App~/Library/Logs/agorasdk.log. For example, /Users/<username>/Library/Containers/<AppBundleIdentifier>/Data/Library/Logs/agorasdk.log.If Sandbox is disabled: ~/Library/Logs/agorasdk.log.Windows:C:\Users\<user_name>\AppData\Local\Agora\<process_name>\agorasdk.log。
|
|
70
|
-
*/
|
|
71
|
-
filePath?: string;
|
|
72
|
-
/**
|
|
73
|
-
* The size (KB) of an agorasdk.log file. The value range is [128,1024]. The default value is 1,024 KB. If you set fileSizeInKByte to a value lower than 128 KB, the SDK adjusts it to 128 KB. If you set fileSizeInKBytes to a value higher than 1,024 KB, the SDK adjusts it to 1,024 KB.
|
|
74
|
-
*/
|
|
75
|
-
fileSizeInKB?: number;
|
|
76
|
-
/**
|
|
77
|
-
* The output level of the SDK log file. See LogLevel .For example, if you set the log level to WARN, the SDK outputs the logs within levels FATAL, ERROR, and WARN.
|
|
78
|
-
*/
|
|
79
|
-
level?: LogLevel;
|
|
80
|
-
}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import './extension/IAgoraMediaEngineExtension';
|
|
2
|
-
import { AudioTrackConfig, AudioTrackType, EncodedVideoFrameInfo, SenderOptions } from './AgoraBase';
|
|
3
|
-
import { AudioFrame, ExternalVideoFrame, ExternalVideoSourceType, IAudioFrameObserver, IVideoEncodedFrameObserver, IVideoFrameObserver } from './AgoraMediaBase';
|
|
4
|
-
/**
|
|
5
|
-
* The channel mode.
|
|
6
|
-
*/
|
|
7
|
-
export declare enum AudioMixingDualMonoMode {
|
|
8
|
-
/**
|
|
9
|
-
* @ignore
|
|
10
|
-
*/
|
|
11
|
-
AudioMixingDualMonoAuto = 0,
|
|
12
|
-
/**
|
|
13
|
-
* 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.
|
|
14
|
-
*/
|
|
15
|
-
AudioMixingDualMonoL = 1,
|
|
16
|
-
/**
|
|
17
|
-
* 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.
|
|
18
|
-
*/
|
|
19
|
-
AudioMixingDualMonoR = 2,
|
|
20
|
-
/**
|
|
21
|
-
* 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.
|
|
22
|
-
*/
|
|
23
|
-
AudioMixingDualMonoMix = 3
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* The IMediaEngine class.
|
|
27
|
-
*/
|
|
28
|
-
export declare abstract class IMediaEngine {
|
|
29
|
-
/**
|
|
30
|
-
* Registers an audio frame observer object.
|
|
31
|
-
* Call this method to register an audio frame observer object (register a callback). When you need the SDK to trigger onMixedAudioFrame , onRecordAudioFrame , onPlaybackAudioFrame or onEarMonitoringAudioFrame callback, you need to use this method to register the callbacks.Ensure that you call this method before joining a channel.
|
|
32
|
-
*
|
|
33
|
-
* @param observer The observer object instance. See IAudioFrameObserver . Agora recommends calling this method after receiving onLeaveChannel to release the audio observer object.
|
|
34
|
-
*
|
|
35
|
-
* @returns
|
|
36
|
-
* 0: Success.< 0: Failure.
|
|
37
|
-
*/
|
|
38
|
-
abstract registerAudioFrameObserver(observer: IAudioFrameObserver): number;
|
|
39
|
-
/**
|
|
40
|
-
* Registers a raw video frame observer object.
|
|
41
|
-
* If you want to obtain the original video data of some remote users (referred to as group A) and the encoded video data of other remote users (referred to as group B), you can refer to the following steps:
|
|
42
|
-
* Call registerVideoFrameObserver to register the raw video frame observer before joining the channel.
|
|
43
|
-
* Call registerVideoEncodedFrameObserver to register the encoded video frame observer before joining the channel.
|
|
44
|
-
* After joining the channel, get the user IDs of group B users through onUserJoined , and then call setRemoteVideoSubscriptionOptions to set the encodedFrameOnly of this group of users to true.
|
|
45
|
-
* Call muteAllRemoteVideoStreams (false) to start receiving the video streams of all remote users. Then:
|
|
46
|
-
* The raw video data of group A users can be obtained through the callback in IVideoFrameObserver , and the SDK renders the data by default.
|
|
47
|
-
* The encoded video data of group B users can be obtained through the callback in IVideoEncodedFrameObserver . If you want to observe raw video frames (such as YUV or RGBA format), Agora recommends that you implement one IVideoFrameObserver class with this method.When calling this method to register a video observer, you can register callbacks in the IVideoFrameObserver class as needed. After you successfully register the video frame observer, the SDK triggers the registered callbacks each time a video frame is received.Ensure that you call this method before joining a channel.When handling the video data returned in the callbacks, pay attention to the changes in the width and height parameters, which may be adapted under the following circumstances:When network conditions deteriorate, the video resolution decreases incrementally.If the user adjusts the video profile, the resolution of the video returned in the callbacks also changes.
|
|
48
|
-
*
|
|
49
|
-
* @param observer The observer object instance. See IVideoFrameObserver .
|
|
50
|
-
*
|
|
51
|
-
* @returns
|
|
52
|
-
* 0: Success.< 0: Failure.
|
|
53
|
-
*/
|
|
54
|
-
abstract registerVideoFrameObserver(observer: IVideoFrameObserver): number;
|
|
55
|
-
/**
|
|
56
|
-
* Registers a receiver object for the encoded video image.
|
|
57
|
-
* If you only want to observe encoded video frames (such as h.264 format) without decoding and rendering the video, Agora recommends that you implement one IVideoEncodedFrameObserver class through this method.If you want to obtain the original video data of some remote users (referred to as group A) and the encoded video data of other remote users (referred to as group B), you can refer to the following steps:Call registerVideoFrameObserver to register the raw video frame observer before joining the channel.Call registerVideoEncodedFrameObserver to register the encoded video frame observer before joining the channel.After joining the channel, get the user IDs of group B users through onUserJoined , and then call setRemoteVideoSubscriptionOptions to set the encodedFrameOnly of this group of users to true.Call muteAllRemoteVideoStreams (false) to start receiving the video streams of all remote users. Then:The raw video data of group A users can be obtained through the callback in IVideoFrameObserver , and the SDK renders the data by default.The encoded video data of group B users can be obtained through the callback in IVideoEncodedFrameObserver .Call this method before joining a channel.
|
|
58
|
-
*
|
|
59
|
-
* @param observer The video frame observer object. See IVideoEncodedFrameObserver .
|
|
60
|
-
*
|
|
61
|
-
* @returns
|
|
62
|
-
* 0: Success.< 0: Failure.
|
|
63
|
-
*/
|
|
64
|
-
abstract registerVideoEncodedFrameObserver(observer: IVideoEncodedFrameObserver): number;
|
|
65
|
-
/**
|
|
66
|
-
* Pushes the external audio frame.
|
|
67
|
-
*
|
|
68
|
-
* @param type The type of the audio recording device. See MediaSourceType .
|
|
69
|
-
* @param frame The external audio frame. See AudioFrame .
|
|
70
|
-
* @param wrap Whether to use the placeholder. Agora recommends using the default value.true: Use the placeholder.false: (Default) Do not use the placeholder.
|
|
71
|
-
* @param sourceId The ID of external audio source. If you want to publish a custom external audio source, set this parameter to the ID of the corresponding custom audio track you want to publish.
|
|
72
|
-
*
|
|
73
|
-
* @returns
|
|
74
|
-
* 0: Success.< 0: Failure.
|
|
75
|
-
*/
|
|
76
|
-
abstract pushAudioFrame(frame: AudioFrame, trackId?: number): number;
|
|
77
|
-
/**
|
|
78
|
-
* Pulls the remote audio data.
|
|
79
|
-
* Before calling this method, you need to call setExternalAudioSink to notify the app to enable and set the external rendering.After a successful method call, the app pulls the decoded and mixed audio data for playback.This method only supports pulling data from custom audio source. If you need to pull the data captured by the SDK, do not call this method.Call this method after joining a channel.Once you enable the external audio sink, the app will not retrieve any audio data from the onPlaybackAudioFrame callback.The difference between this method and the onPlaybackAudioFrame callback is as follows:The SDK sends the audio data to the app through the onPlaybackAudioFrame callback. Any delay in processing the audio frames may result in audio jitter.After a successful method call, the app automatically pulls the audio data from the SDK. After setting the audio data parameters, the SDK adjusts the frame buffer and avoids problems caused by jitter in the external audio playback.
|
|
80
|
-
*
|
|
81
|
-
* @returns
|
|
82
|
-
* The AudioFrame instance, if the method call succeeds.An error code, if the call fails,.
|
|
83
|
-
*/
|
|
84
|
-
abstract pullAudioFrame(): AudioFrame;
|
|
85
|
-
/**
|
|
86
|
-
* Configures the external video source.
|
|
87
|
-
* Call this method before joining a channel.
|
|
88
|
-
*
|
|
89
|
-
* @param enabled Whether to use the external video source:true: Use the external video source. The SDK prepares to accept the external video frame.false: (Default) Do not use the external video source.
|
|
90
|
-
* @param useTexture Whether to use the external video frame in the Texture format.true: Use the external video frame in the Texture format.false: (Default) Do not use the external video frame in the Texture format.
|
|
91
|
-
* @param sourceType Whether the external video frame is encoded. See ExternalVideoSourceType .
|
|
92
|
-
* @param encodedVideoOption Video encoding options. This parameter needs to be set if sourceType is EncodedVideoFrame. To set this parameter, contact .
|
|
93
|
-
*
|
|
94
|
-
* @returns
|
|
95
|
-
* 0: Success.< 0: Failure.
|
|
96
|
-
*/
|
|
97
|
-
abstract setExternalVideoSource(enabled: boolean, useTexture: boolean, sourceType?: ExternalVideoSourceType, encodedVideoOption?: SenderOptions): number;
|
|
98
|
-
/**
|
|
99
|
-
* Sets the external audio source parameters.
|
|
100
|
-
* Call this method before joining a channel.
|
|
101
|
-
*
|
|
102
|
-
* @param enabled Whether to enable the external audio source:true: Enable the external audio source.false: (Default) Disable the external audio source.
|
|
103
|
-
* @param sampleRate The sample rate (Hz) of the external audio which can be set as 8000, 16000, 32000, 44100, or 48000.
|
|
104
|
-
* @param channels The number of channels of the external audio source, which can be set as 1 (Mono) or 2 (Stereo).
|
|
105
|
-
* @param sourceNumber The number of external audio sources. The value of this parameter should be larger than 0. The SDK creates a corresponding number of custom audio tracks based on this parameter value and names the audio tracks starting from 0. In ChannelMediaOptions , you can set publishCustomAudioSourceId to the audio track ID you want to publish.
|
|
106
|
-
* @param localPlayback Whether to play the external audio source:true: Play the external audio source.false: (Default) Do not play the external source.
|
|
107
|
-
* @param publish Whether to publish audio to the remote users:true: (Default) Publish audio to the remote users.false: Do not publish audio to the remote users.
|
|
108
|
-
*
|
|
109
|
-
* @returns
|
|
110
|
-
* 0: Success.< 0: Failure.
|
|
111
|
-
*/
|
|
112
|
-
abstract setExternalAudioSource(enabled: boolean, sampleRate: number, channels: number, localPlayback?: boolean, publish?: boolean): number;
|
|
113
|
-
/**
|
|
114
|
-
* @ignore
|
|
115
|
-
*/
|
|
116
|
-
abstract createCustomAudioTrack(trackType: AudioTrackType, config: AudioTrackConfig): number;
|
|
117
|
-
/**
|
|
118
|
-
* @ignore
|
|
119
|
-
*/
|
|
120
|
-
abstract destroyCustomAudioTrack(trackId: number): number;
|
|
121
|
-
/**
|
|
122
|
-
* Sets the external audio sink.
|
|
123
|
-
* This method applies to scenarios where you want to use external audio data for playback. After you set the external audio sink, you can call pullAudioFrame to pull remote audio frames. The app can process the remote audio and play it with the audio effects that you want.
|
|
124
|
-
*
|
|
125
|
-
* @param enabled Whether to enable or disable the external audio sink:true: Enables the external audio sink.false: (Default) Disables the external audio sink.
|
|
126
|
-
* @param sampleRate The sample rate (Hz) of the external audio sink, which can be set as 16000, 32000, 44100, or 48000.
|
|
127
|
-
* @param channels The number of audio channels of the external audio sink:1: Mono.2: Stereo.
|
|
128
|
-
*
|
|
129
|
-
* @returns
|
|
130
|
-
* 0: Success.< 0: Failure.
|
|
131
|
-
*/
|
|
132
|
-
abstract setExternalAudioSink(enabled: boolean, sampleRate: number, channels: number): number;
|
|
133
|
-
/**
|
|
134
|
-
* @ignore
|
|
135
|
-
*/
|
|
136
|
-
abstract enableCustomAudioLocalPlayback(trackId: number, enabled: boolean): number;
|
|
137
|
-
/**
|
|
138
|
-
* Pushes the external raw video frame to the SDK.
|
|
139
|
-
* If you call createCustomVideoTrack method to get the video track ID, set the customVideoTrackId parameter to the video track ID you want to publish in the ChannelMediaOptions of each channel, and set the publishCustomVideoTrack parameter to true, you can call this method to push the unencoded external video frame to the SDK.
|
|
140
|
-
*
|
|
141
|
-
* @param frame The external raw video frame to be pushed. See ExternalVideoFrame .
|
|
142
|
-
* @param videoTrackId The video track ID returned by calling the createCustomVideoTrack method. The default value is 0.
|
|
143
|
-
*
|
|
144
|
-
* @returns
|
|
145
|
-
* 0: Success.< 0: Failure.
|
|
146
|
-
*/
|
|
147
|
-
abstract pushVideoFrame(frame: ExternalVideoFrame, videoTrackId?: number): number;
|
|
148
|
-
/**
|
|
149
|
-
* @ignore
|
|
150
|
-
*/
|
|
151
|
-
abstract pushEncodedVideoImage(imageBuffer: Uint8Array, length: number, videoEncodedFrameInfo: EncodedVideoFrameInfo, videoTrackId?: number): number;
|
|
152
|
-
/**
|
|
153
|
-
* @ignore
|
|
154
|
-
*/
|
|
155
|
-
abstract release(): void;
|
|
156
|
-
/**
|
|
157
|
-
* Unregisters an audio frame observer.
|
|
158
|
-
*
|
|
159
|
-
* @param observer The audio frame observer, reporting the reception of each audio frame. See IAudioFrameObserver .
|
|
160
|
-
*
|
|
161
|
-
* @returns
|
|
162
|
-
* 0: Success.< 0: Failure.
|
|
163
|
-
*/
|
|
164
|
-
abstract unregisterAudioFrameObserver(observer: IAudioFrameObserver): number;
|
|
165
|
-
/**
|
|
166
|
-
* Unregisters the video frame observer.
|
|
167
|
-
*
|
|
168
|
-
* @param observer The video observer, reporting the reception of each video frame. See IVideoFrameObserver .
|
|
169
|
-
*
|
|
170
|
-
* @returns
|
|
171
|
-
* 0: Success.< 0: Failure.
|
|
172
|
-
*/
|
|
173
|
-
abstract unregisterVideoFrameObserver(observer: IVideoFrameObserver): number;
|
|
174
|
-
/**
|
|
175
|
-
* Unregisters a receiver object for the encoded video image.
|
|
176
|
-
*
|
|
177
|
-
* @param observer The video observer, reporting the reception of each video frame. See IVideoEncodedFrameObserver .
|
|
178
|
-
*
|
|
179
|
-
* @returns
|
|
180
|
-
* 0: Success.< 0: Failure.
|
|
181
|
-
*/
|
|
182
|
-
abstract unregisterVideoEncodedFrameObserver(observer: IVideoEncodedFrameObserver): number;
|
|
183
|
-
}
|