agora-electron-sdk 4.1.1-rc.1 → 4.2.0-dev.13
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/LICENSE +21 -21
- package/README.md +143 -143
- package/gulpfile.js +5 -4
- package/js/AgoraSdk.js +62 -60
- package/js/Private/AgoraBase.js +4575 -3269
- package/js/Private/AgoraMediaBase.js +968 -564
- package/js/Private/AgoraMediaPlayerTypes.js +422 -310
- package/js/Private/IAgoraLog.js +86 -74
- package/js/Private/IAgoraMediaEngine.js +32 -32
- package/js/Private/IAgoraMediaPlayer.js +16 -16
- package/js/Private/IAgoraMediaPlayerSource.js +3 -3
- package/js/Private/IAgoraMediaRecorder.js +12 -12
- package/js/Private/IAgoraMediaStreamingSource.js +84 -0
- package/js/Private/IAgoraMusicContentCenter.js +239 -81
- package/js/Private/IAgoraRhythmPlayer.js +70 -62
- package/js/Private/IAgoraRtcEngine.js +1807 -948
- package/js/Private/IAgoraRtcEngineEx.js +26 -18
- package/js/Private/IAgoraSpatialAudio.js +74 -30
- package/js/Private/IAudioDeviceManager.js +20 -20
- package/js/Private/extension/AgoraBaseExtension.js +2 -2
- package/js/Private/extension/AgoraMediaBaseExtension.js +2 -2
- package/js/Private/extension/AgoraMediaPlayerTypesExtension.js +2 -2
- package/js/Private/extension/IAgoraLogExtension.js +2 -2
- package/js/Private/extension/IAgoraMediaEngineExtension.js +2 -2
- package/js/Private/extension/IAgoraMediaPlayerExtension.js +2 -2
- package/js/Private/extension/IAgoraMediaPlayerSourceExtension.js +2 -2
- package/js/Private/extension/IAgoraMediaRecorderExtension.js +2 -2
- package/js/Private/extension/IAgoraMusicContentCenterExtension.js +2 -2
- package/js/Private/extension/IAgoraRhythmPlayerExtension.js +2 -2
- package/js/Private/extension/IAgoraRtcEngineExExtension.js +2 -2
- package/js/Private/extension/IAgoraRtcEngineExtension.js +2 -2
- package/js/Private/extension/IAgoraSpatialAudioExtension.js +2 -2
- package/js/Private/extension/IAudioDeviceManagerExtension.js +2 -2
- package/js/Private/impl/AgoraBaseImpl.js +23 -23
- package/js/Private/impl/AgoraMediaBaseImpl.js +118 -138
- package/js/Private/impl/IAgoraMediaEngineImpl.js +287 -325
- package/js/Private/impl/IAgoraMediaPlayerImpl.js +932 -938
- package/js/Private/impl/IAgoraMediaPlayerSourceImpl.js +63 -63
- package/js/Private/impl/IAgoraMediaRecorderImpl.js +47 -67
- package/js/Private/impl/IAgoraMusicContentCenterImpl.js +353 -323
- package/js/Private/impl/IAgoraRtcEngineExImpl.js +945 -907
- package/js/Private/impl/IAgoraRtcEngineImpl.js +4742 -4702
- package/js/Private/impl/IAgoraSpatialAudioImpl.js +362 -362
- package/js/Private/impl/IAudioDeviceManagerImpl.js +375 -375
- package/js/Private/internal/AudioDeviceManagerInternal.js +44 -44
- package/js/Private/internal/IrisApiEngine.js +391 -382
- package/js/Private/internal/LocalSpatialAudioEngineInternal.js +46 -46
- package/js/Private/internal/MediaEngineInternal.js +119 -123
- package/js/Private/internal/MediaPlayerInternal.js +215 -213
- package/js/Private/internal/MediaRecorderInternal.js +82 -81
- package/js/Private/internal/MusicContentCenterInternal.js +128 -130
- package/js/Private/internal/RtcEngineExInternal.js +422 -363
- package/js/Private/internal/emitter/EventEmitter.js +111 -111
- package/js/Private/ti/AgoraBase-ti.js +40 -40
- package/js/Private/ti/AgoraMediaBase-ti.js +71 -73
- package/js/Private/ti/AgoraMediaPlayerTypes-ti.js +5 -5
- package/js/Private/ti/IAgoraLog-ti.js +5 -5
- package/js/Private/ti/IAgoraMediaEngine-ti.js +5 -5
- package/js/Private/ti/IAgoraMediaPlayer-ti.js +38 -42
- package/js/Private/ti/IAgoraMediaPlayerSource-ti.js +48 -48
- package/js/Private/ti/IAgoraMediaRecorder-ti.js +5 -5
- package/js/Private/ti/IAgoraMediaStreamingSource-ti.js +5 -0
- package/js/Private/ti/IAgoraMusicContentCenter-ti.js +41 -41
- package/js/Private/ti/IAgoraRhythmPlayer-ti.js +5 -5
- package/js/Private/ti/IAgoraRtcEngine-ti.js +139 -139
- package/js/Private/ti/IAgoraRtcEngineEx-ti.js +5 -5
- package/js/Private/ti/IAgoraSpatialAudio-ti.js +5 -5
- package/js/Private/ti/IAudioDeviceManager-ti.js +5 -5
- package/js/Renderer/AgoraView.js +128 -131
- package/js/Renderer/IRenderer.js +40 -48
- package/js/Renderer/IRendererManager.js +9 -0
- package/js/Renderer/RendererManager.js +479 -392
- package/js/Renderer/{GlRenderer → WebGLRenderer}/index.js +469 -473
- package/js/Renderer/{GlRenderer → WebGLRenderer}/webgl-utils.js +1337 -1337
- package/js/Renderer/YUVCanvasRenderer/index.js +195 -185
- package/js/Renderer/index.js +18 -0
- package/js/Types.js +17 -29
- package/js/Utils.js +168 -173
- package/package.json +61 -103
- package/scripts/bootstrap.js +1 -1
- package/scripts/build.js +1 -0
- package/scripts/buildJS.js +3 -3
- package/scripts/clean.js +2 -1
- package/scripts/downloadPrebuild.js +5 -5
- package/scripts/getConfig.js +3 -2
- package/scripts/synclib.js +8 -5
- package/scripts/util.js +3 -2
- package/scripts/zipBuild.js +2 -1
- package/ts/AgoraSdk.ts +9 -6
- package/ts/Private/AgoraBase.ts +278 -173
- package/ts/Private/AgoraMediaBase.ts +167 -100
- package/ts/Private/AgoraMediaPlayerTypes.ts +1 -1
- package/ts/Private/IAgoraMediaEngine.ts +43 -56
- package/ts/Private/IAgoraMediaPlayer.ts +90 -104
- package/ts/Private/IAgoraMediaPlayerSource.ts +3 -8
- package/ts/Private/IAgoraMediaRecorder.ts +8 -35
- package/ts/Private/IAgoraMediaStreamingSource.ts +80 -0
- package/ts/Private/IAgoraMusicContentCenter.ts +93 -12
- package/ts/Private/IAgoraRtcEngine.ts +807 -910
- package/ts/Private/IAgoraRtcEngineEx.ts +187 -191
- package/ts/Private/IAgoraSpatialAudio.ts +40 -22
- package/ts/Private/IAudioDeviceManager.ts +35 -13
- package/ts/Private/extension/IAgoraMediaEngineExtension.ts +1 -1
- package/ts/Private/extension/IAgoraMediaPlayerExtension.ts +4 -7
- package/ts/Private/extension/IAgoraMediaRecorderExtension.ts +6 -1
- package/ts/Private/extension/IAgoraMusicContentCenterExtension.ts +1 -1
- package/ts/Private/extension/IAgoraRtcEngineExtension.ts +4 -4
- package/ts/Private/impl/AgoraBaseImpl.ts +3 -3
- package/ts/Private/impl/AgoraMediaBaseImpl.ts +36 -42
- package/ts/Private/impl/IAgoraMediaEngineImpl.ts +79 -127
- package/ts/Private/impl/IAgoraMediaPlayerImpl.ts +106 -106
- package/ts/Private/impl/IAgoraMediaRecorderImpl.ts +13 -45
- package/ts/Private/impl/IAgoraMusicContentCenterImpl.ts +61 -16
- package/ts/Private/impl/IAgoraRtcEngineExImpl.ts +129 -59
- package/ts/Private/impl/IAgoraRtcEngineImpl.ts +490 -416
- package/ts/Private/impl/IAgoraSpatialAudioImpl.ts +5 -3
- package/ts/Private/impl/IAudioDeviceManagerImpl.ts +4 -2
- package/ts/Private/internal/AudioDeviceManagerInternal.ts +6 -5
- package/ts/Private/internal/IrisApiEngine.ts +41 -32
- package/ts/Private/internal/LocalSpatialAudioEngineInternal.ts +17 -13
- package/ts/Private/internal/MediaEngineInternal.ts +9 -11
- package/ts/Private/internal/MediaPlayerInternal.ts +42 -31
- package/ts/Private/internal/MediaRecorderInternal.ts +24 -22
- package/ts/Private/internal/MusicContentCenterInternal.ts +16 -18
- package/ts/Private/internal/RtcEngineExInternal.ts +189 -66
- package/ts/Private/ti/AgoraMediaBase-ti.ts +9 -10
- package/ts/Private/ti/IAgoraMediaPlayer-ti.ts +0 -5
- package/{js/Private/ti/AgoraMediaPlayerTypes-ti.d.ts → ts/Private/ti/IAgoraMediaStreamingSource-ti.ts} +11 -6
- package/ts/Private/ti/IAgoraMusicContentCenter-ti.ts +4 -4
- package/ts/Private/ti/IAgoraRtcEngine-ti.ts +4 -4
- package/ts/Renderer/AgoraView.ts +12 -7
- package/ts/Renderer/IRenderer.ts +11 -16
- package/ts/Renderer/IRendererManager.ts +35 -0
- package/ts/Renderer/RendererManager.ts +146 -82
- package/ts/Renderer/{GlRenderer → WebGLRenderer}/index.ts +36 -51
- package/ts/Renderer/YUVCanvasRenderer/index.ts +41 -25
- package/ts/Renderer/index.ts +2 -0
- package/ts/Types.ts +43 -23
- package/ts/Utils.ts +7 -12
- package/types/AgoraSdk.d.ts +38 -36
- package/types/AgoraSdk.d.ts.map +1 -0
- package/types/Private/AgoraBase.d.ts +4455 -4358
- package/types/Private/AgoraBase.d.ts.map +1 -0
- package/types/Private/AgoraMediaBase.d.ts +1125 -1070
- package/types/Private/AgoraMediaBase.d.ts.map +1 -0
- package/types/Private/AgoraMediaPlayerTypes.d.ts +409 -408
- package/types/Private/AgoraMediaPlayerTypes.d.ts.map +1 -0
- package/types/Private/IAgoraLog.d.ts +81 -80
- package/types/Private/IAgoraLog.d.ts.map +1 -0
- package/types/Private/IAgoraMediaEngine.d.ts +184 -193
- package/types/Private/IAgoraMediaEngine.d.ts.map +1 -0
- package/types/Private/IAgoraMediaPlayer.d.ts +533 -546
- package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -0
- package/types/Private/IAgoraMediaPlayerSource.d.ts +83 -88
- package/types/Private/IAgoraMediaPlayerSource.d.ts.map +1 -0
- package/types/Private/IAgoraMediaRecorder.d.ts +29 -49
- package/types/Private/IAgoraMediaRecorder.d.ts.map +1 -0
- package/types/Private/IAgoraMediaStreamingSource.d.ts +42 -0
- package/types/Private/IAgoraMediaStreamingSource.d.ts.map +1 -0
- package/types/Private/IAgoraMusicContentCenter.d.ts +336 -255
- package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -0
- package/types/Private/IAgoraRhythmPlayer.d.ts +65 -64
- package/types/Private/IAgoraRhythmPlayer.d.ts.map +1 -0
- package/types/Private/IAgoraRtcEngine.d.ts +4948 -5058
- package/types/Private/IAgoraRtcEngine.d.ts.map +1 -0
- package/types/Private/IAgoraRtcEngineEx.d.ts +554 -570
- package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -0
- package/types/Private/IAgoraSpatialAudio.d.ts +266 -248
- package/types/Private/IAgoraSpatialAudio.d.ts.map +1 -0
- package/types/Private/IAudioDeviceManager.d.ts +255 -233
- package/types/Private/IAudioDeviceManager.d.ts.map +1 -0
- package/types/Private/extension/AgoraBaseExtension.d.ts +2 -1
- package/types/Private/extension/AgoraBaseExtension.d.ts.map +1 -0
- package/types/Private/extension/AgoraMediaBaseExtension.d.ts +2 -1
- package/types/Private/extension/AgoraMediaBaseExtension.d.ts.map +1 -0
- package/types/Private/extension/AgoraMediaPlayerTypesExtension.d.ts +2 -1
- package/types/Private/extension/AgoraMediaPlayerTypesExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraLogExtension.d.ts +2 -1
- package/types/Private/extension/IAgoraLogExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraMediaEngineExtension.d.ts +41 -40
- package/types/Private/extension/IAgoraMediaEngineExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraMediaPlayerExtension.d.ts +47 -46
- package/types/Private/extension/IAgoraMediaPlayerExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts +2 -1
- package/types/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraMediaRecorderExtension.d.ts +45 -40
- package/types/Private/extension/IAgoraMediaRecorderExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraMusicContentCenterExtension.d.ts +21 -20
- package/types/Private/extension/IAgoraMusicContentCenterExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraRhythmPlayerExtension.d.ts +2 -1
- package/types/Private/extension/IAgoraRhythmPlayerExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraRtcEngineExExtension.d.ts +2 -1
- package/types/Private/extension/IAgoraRtcEngineExExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraRtcEngineExtension.d.ts +43 -42
- package/types/Private/extension/IAgoraRtcEngineExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraSpatialAudioExtension.d.ts +2 -1
- package/types/Private/extension/IAgoraSpatialAudioExtension.d.ts.map +1 -0
- package/types/Private/extension/IAudioDeviceManagerExtension.d.ts +2 -1
- package/types/Private/extension/IAudioDeviceManagerExtension.d.ts.map +1 -0
- package/types/Private/impl/AgoraBaseImpl.d.ts +3 -2
- package/types/Private/impl/AgoraBaseImpl.d.ts.map +1 -0
- package/types/Private/impl/AgoraMediaBaseImpl.d.ts +9 -7
- package/types/Private/impl/AgoraMediaBaseImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraMediaEngineImpl.d.ts +40 -43
- package/types/Private/impl/IAgoraMediaEngineImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts +141 -141
- package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts +3 -2
- package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraMediaRecorderImpl.d.ts +11 -13
- package/types/Private/impl/IAgoraMediaRecorderImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts +59 -51
- package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts +106 -101
- package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +570 -566
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts +49 -48
- package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts.map +1 -0
- package/types/Private/impl/IAudioDeviceManagerImpl.d.ts +65 -64
- package/types/Private/impl/IAudioDeviceManagerImpl.d.ts.map +1 -0
- package/types/Private/internal/AudioDeviceManagerInternal.d.ts +9 -8
- package/types/Private/internal/AudioDeviceManagerInternal.d.ts.map +1 -0
- package/types/Private/internal/IrisApiEngine.d.ts +148 -146
- package/types/Private/internal/IrisApiEngine.d.ts.map +1 -0
- package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts +19 -18
- package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts.map +1 -0
- package/types/Private/internal/MediaEngineInternal.d.ts +22 -21
- package/types/Private/internal/MediaEngineInternal.d.ts.map +1 -0
- package/types/Private/internal/MediaPlayerInternal.d.ts +34 -33
- package/types/Private/internal/MediaPlayerInternal.d.ts.map +1 -0
- package/types/Private/internal/MediaRecorderInternal.d.ts +18 -15
- package/types/Private/internal/MediaRecorderInternal.d.ts.map +1 -0
- package/types/Private/internal/MusicContentCenterInternal.d.ts +40 -39
- package/types/Private/internal/MusicContentCenterInternal.d.ts.map +1 -0
- package/types/Private/internal/RtcEngineExInternal.d.ts +80 -73
- package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -0
- package/{js → types}/Private/internal/emitter/EventEmitter.d.ts +60 -59
- package/types/Private/internal/emitter/EventEmitter.d.ts.map +1 -0
- package/types/Private/ti/AgoraBase-ti.d.ts +8 -7
- package/types/Private/ti/AgoraBase-ti.d.ts.map +1 -0
- package/types/Private/ti/AgoraMediaBase-ti.d.ts +14 -12
- package/types/Private/ti/AgoraMediaBase-ti.d.ts.map +1 -0
- package/types/Private/ti/AgoraMediaPlayerTypes-ti.d.ts +7 -6
- package/types/Private/ti/AgoraMediaPlayerTypes-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraLog-ti.d.ts +7 -6
- package/types/Private/ti/IAgoraLog-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraMediaEngine-ti.d.ts +7 -6
- package/types/Private/ti/IAgoraMediaEngine-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraMediaPlayer-ti.d.ts +8 -8
- package/types/Private/ti/IAgoraMediaPlayer-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts +8 -7
- package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraMediaRecorder-ti.d.ts +7 -6
- package/types/Private/ti/IAgoraMediaRecorder-ti.d.ts.map +1 -0
- package/{js/Private/ti/IAgoraMediaRecorder-ti.d.ts → types/Private/ti/IAgoraMediaStreamingSource-ti.d.ts} +7 -6
- package/types/Private/ti/IAgoraMediaStreamingSource-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraMusicContentCenter-ti.d.ts +8 -7
- package/types/Private/ti/IAgoraMusicContentCenter-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraRhythmPlayer-ti.d.ts +7 -6
- package/types/Private/ti/IAgoraRhythmPlayer-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraRtcEngine-ti.d.ts +10 -9
- package/types/Private/ti/IAgoraRtcEngine-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraRtcEngineEx-ti.d.ts +7 -6
- package/types/Private/ti/IAgoraRtcEngineEx-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraSpatialAudio-ti.d.ts +7 -6
- package/types/Private/ti/IAgoraSpatialAudio-ti.d.ts.map +1 -0
- package/types/Private/ti/IAudioDeviceManager-ti.d.ts +7 -6
- package/types/Private/ti/IAudioDeviceManager-ti.d.ts.map +1 -0
- package/types/Renderer/AgoraView.d.ts +70 -70
- package/types/Renderer/AgoraView.d.ts.map +1 -0
- package/types/Renderer/IRenderer.d.ts +22 -21
- 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 +154 -71
- package/types/Renderer/RendererManager.d.ts.map +1 -0
- package/types/Renderer/{GlRenderer → WebGLRenderer}/index.d.ts +49 -59
- 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 +16 -16
- 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 +280 -260
- package/types/Types.d.ts.map +1 -0
- package/types/Utils.d.ts +59 -58
- package/types/Utils.d.ts.map +1 -0
- package/js/AgoraSdk.d.ts +0 -36
- package/js/Private/AgoraBase.d.ts +0 -4358
- package/js/Private/AgoraMediaBase.d.ts +0 -1070
- package/js/Private/AgoraMediaPlayerTypes.d.ts +0 -408
- package/js/Private/IAgoraLog.d.ts +0 -80
- package/js/Private/IAgoraMediaEngine.d.ts +0 -193
- package/js/Private/IAgoraMediaPlayer.d.ts +0 -546
- package/js/Private/IAgoraMediaPlayerSource.d.ts +0 -88
- package/js/Private/IAgoraMediaRecorder.d.ts +0 -49
- package/js/Private/IAgoraMusicContentCenter.d.ts +0 -255
- package/js/Private/IAgoraRhythmPlayer.d.ts +0 -64
- package/js/Private/IAgoraRtcEngine.d.ts +0 -5058
- package/js/Private/IAgoraRtcEngineEx.d.ts +0 -570
- package/js/Private/IAgoraSpatialAudio.d.ts +0 -248
- package/js/Private/IAudioDeviceManager.d.ts +0 -233
- 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 -40
- 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 -7
- package/js/Private/impl/IAgoraMediaEngineImpl.d.ts +0 -43
- package/js/Private/impl/IAgoraMediaPlayerImpl.d.ts +0 -141
- package/js/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts +0 -2
- package/js/Private/impl/IAgoraMediaRecorderImpl.d.ts +0 -13
- package/js/Private/impl/IAgoraMusicContentCenterImpl.d.ts +0 -51
- package/js/Private/impl/IAgoraRtcEngineExImpl.d.ts +0 -101
- package/js/Private/impl/IAgoraRtcEngineImpl.d.ts +0 -566
- 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 -146
- 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 -15
- package/js/Private/internal/MusicContentCenterInternal.d.ts +0 -39
- package/js/Private/internal/RtcEngineExInternal.d.ts +0 -73
- package/js/Private/ti/AgoraBase-ti.d.ts +0 -7
- package/js/Private/ti/AgoraMediaBase-ti.d.ts +0 -12
- 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 -8
- package/js/Private/ti/IAgoraMediaPlayerSource-ti.d.ts +0 -7
- 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 -70
- 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 -71
- package/js/Renderer/YUVCanvasRenderer/index.d.ts +0 -16
- package/js/Types.d.ts +0 -260
- package/js/Utils.d.ts +0 -58
- /package/ts/Renderer/{GlRenderer → WebGLRenderer}/webgl-utils.js +0 -0
|
@@ -1,5 +1,84 @@
|
|
|
1
1
|
import './extension/AgoraMediaBaseExtension';
|
|
2
2
|
import { EncodedVideoFrameInfo } from './AgoraBase';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The capture type of the custom video source.
|
|
6
|
+
*/
|
|
7
|
+
export enum VideoSourceType {
|
|
8
|
+
/**
|
|
9
|
+
* @ignore
|
|
10
|
+
*/
|
|
11
|
+
VideoSourceCameraPrimary = 0,
|
|
12
|
+
/**
|
|
13
|
+
* The camera.
|
|
14
|
+
*/
|
|
15
|
+
VideoSourceCamera = 0,
|
|
16
|
+
/**
|
|
17
|
+
* The secondary camera.
|
|
18
|
+
*/
|
|
19
|
+
VideoSourceCameraSecondary = 1,
|
|
20
|
+
/**
|
|
21
|
+
* The primary screen.
|
|
22
|
+
*/
|
|
23
|
+
VideoSourceScreenPrimary = 2,
|
|
24
|
+
/**
|
|
25
|
+
* The screen.
|
|
26
|
+
*/
|
|
27
|
+
VideoSourceScreen = 2,
|
|
28
|
+
/**
|
|
29
|
+
* The secondary screen.
|
|
30
|
+
*/
|
|
31
|
+
VideoSourceScreenSecondary = 3,
|
|
32
|
+
/**
|
|
33
|
+
* The custom video source.
|
|
34
|
+
*/
|
|
35
|
+
VideoSourceCustom = 4,
|
|
36
|
+
/**
|
|
37
|
+
* The video source from the media player.
|
|
38
|
+
*/
|
|
39
|
+
VideoSourceMediaPlayer = 5,
|
|
40
|
+
/**
|
|
41
|
+
* The video source is a PNG image.
|
|
42
|
+
*/
|
|
43
|
+
VideoSourceRtcImagePng = 6,
|
|
44
|
+
/**
|
|
45
|
+
* The video source is a JPEG image.
|
|
46
|
+
*/
|
|
47
|
+
VideoSourceRtcImageJpeg = 7,
|
|
48
|
+
/**
|
|
49
|
+
* The video source is a GIF image.
|
|
50
|
+
*/
|
|
51
|
+
VideoSourceRtcImageGif = 8,
|
|
52
|
+
/**
|
|
53
|
+
* The video source is remote video acquired by the network.
|
|
54
|
+
*/
|
|
55
|
+
VideoSourceRemote = 9,
|
|
56
|
+
/**
|
|
57
|
+
* A transcoded video source.
|
|
58
|
+
*/
|
|
59
|
+
VideoSourceTranscoded = 10,
|
|
60
|
+
/**
|
|
61
|
+
* @ignore
|
|
62
|
+
*/
|
|
63
|
+
VideoSourceCameraThird = 11,
|
|
64
|
+
/**
|
|
65
|
+
* @ignore
|
|
66
|
+
*/
|
|
67
|
+
VideoSourceCameraFourth = 12,
|
|
68
|
+
/**
|
|
69
|
+
* @ignore
|
|
70
|
+
*/
|
|
71
|
+
VideoSourceScreenThird = 13,
|
|
72
|
+
/**
|
|
73
|
+
* @ignore
|
|
74
|
+
*/
|
|
75
|
+
VideoSourceScreenFourth = 14,
|
|
76
|
+
/**
|
|
77
|
+
* An unknown video source.
|
|
78
|
+
*/
|
|
79
|
+
VideoSourceUnknown = 100,
|
|
80
|
+
}
|
|
81
|
+
|
|
3
82
|
/**
|
|
4
83
|
* The type of the audio route.
|
|
5
84
|
*/
|
|
@@ -374,6 +453,24 @@ export enum RenderModeType {
|
|
|
374
453
|
RenderModeAdaptive = 3,
|
|
375
454
|
}
|
|
376
455
|
|
|
456
|
+
/**
|
|
457
|
+
* @ignore
|
|
458
|
+
*/
|
|
459
|
+
export enum CameraVideoSourceType {
|
|
460
|
+
/**
|
|
461
|
+
* @ignore
|
|
462
|
+
*/
|
|
463
|
+
CameraSourceFront = 0,
|
|
464
|
+
/**
|
|
465
|
+
* @ignore
|
|
466
|
+
*/
|
|
467
|
+
CameraSourceBack = 1,
|
|
468
|
+
/**
|
|
469
|
+
* @ignore
|
|
470
|
+
*/
|
|
471
|
+
VideoSourceUnspecified = 2,
|
|
472
|
+
}
|
|
473
|
+
|
|
377
474
|
/**
|
|
378
475
|
* @ignore
|
|
379
476
|
*/
|
|
@@ -474,11 +571,15 @@ export class ExternalVideoFrame {
|
|
|
474
571
|
* This parameter only applies to video data in Texture format. The MetaData size. The default value is 0.
|
|
475
572
|
*/
|
|
476
573
|
metadata_size?: number;
|
|
574
|
+
/**
|
|
575
|
+
* @ignore
|
|
576
|
+
*/
|
|
577
|
+
alphaBuffer?: Uint8Array;
|
|
477
578
|
}
|
|
478
579
|
|
|
479
580
|
/**
|
|
480
581
|
* Configurations of the video frame.
|
|
481
|
-
*
|
|
582
|
+
* 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.
|
|
482
583
|
*/
|
|
483
584
|
export class VideoFrame {
|
|
484
585
|
/**
|
|
@@ -549,6 +650,10 @@ export class VideoFrame {
|
|
|
549
650
|
* @ignore
|
|
550
651
|
*/
|
|
551
652
|
alphaBuffer?: Uint8Array;
|
|
653
|
+
/**
|
|
654
|
+
* @ignore
|
|
655
|
+
*/
|
|
656
|
+
pixelBuffer?: Uint8Array;
|
|
552
657
|
}
|
|
553
658
|
|
|
554
659
|
/**
|
|
@@ -587,6 +692,19 @@ export enum VideoModulePosition {
|
|
|
587
692
|
PositionPreEncoder = 1 << 2,
|
|
588
693
|
}
|
|
589
694
|
|
|
695
|
+
/**
|
|
696
|
+
* @ignore
|
|
697
|
+
*/
|
|
698
|
+
export interface IAudioPcmFrameSink {
|
|
699
|
+
/**
|
|
700
|
+
* Occurs each time the player receives a video frame.
|
|
701
|
+
* 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.
|
|
702
|
+
*
|
|
703
|
+
* @param frame Video frame information. See VideoFrame .
|
|
704
|
+
*/
|
|
705
|
+
onFrame?(frame: AudioPcmFrame): void;
|
|
706
|
+
}
|
|
707
|
+
|
|
590
708
|
/**
|
|
591
709
|
* Audio frame type.
|
|
592
710
|
*/
|
|
@@ -693,12 +811,11 @@ export class AudioParams {
|
|
|
693
811
|
*/
|
|
694
812
|
export interface IAudioFrameObserverBase {
|
|
695
813
|
/**
|
|
696
|
-
* Gets the
|
|
697
|
-
* To ensure that the data format of
|
|
698
|
-
*
|
|
699
|
-
* @param audioFrame The raw audio data. See AudioFrame .
|
|
814
|
+
* Gets the raw audio frame for playback.
|
|
815
|
+
* 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.
|
|
700
816
|
*
|
|
701
817
|
* @param channelId The channel ID.
|
|
818
|
+
* @param audioFrame The raw audio data. See AudioFrame .
|
|
702
819
|
*
|
|
703
820
|
* @returns
|
|
704
821
|
* Reserved for future use.
|
|
@@ -709,9 +826,8 @@ export interface IAudioFrameObserverBase {
|
|
|
709
826
|
* Gets the raw audio frame for playback.
|
|
710
827
|
* 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.
|
|
711
828
|
*
|
|
712
|
-
* @param audioFrame The raw audio data. See AudioFrame .
|
|
713
|
-
*
|
|
714
829
|
* @param channelId The channel ID.
|
|
830
|
+
* @param audioFrame The raw audio data. See AudioFrame .
|
|
715
831
|
*
|
|
716
832
|
* @returns
|
|
717
833
|
* Reserved for future use.
|
|
@@ -719,12 +835,11 @@ export interface IAudioFrameObserverBase {
|
|
|
719
835
|
onPlaybackAudioFrame?(channelId: string, audioFrame: AudioFrame): boolean;
|
|
720
836
|
|
|
721
837
|
/**
|
|
722
|
-
*
|
|
723
|
-
* To ensure that the data format of
|
|
724
|
-
*
|
|
725
|
-
* @param audioFrame The raw audio data. See AudioFrame .
|
|
838
|
+
* Gets the raw audio frame for playback.
|
|
839
|
+
* 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.
|
|
726
840
|
*
|
|
727
841
|
* @param channelId The channel ID.
|
|
842
|
+
* @param audioFrame The raw audio data. See AudioFrame .
|
|
728
843
|
*
|
|
729
844
|
* @returns
|
|
730
845
|
* Reserved for future use.
|
|
@@ -749,9 +864,7 @@ export interface IAudioFrameObserver extends IAudioFrameObserverBase {
|
|
|
749
864
|
* Retrieves the audio frame of a specified user before mixing.
|
|
750
865
|
*
|
|
751
866
|
* @param channelId The channel ID.
|
|
752
|
-
*
|
|
753
867
|
* @param uid The user ID of the specified user.
|
|
754
|
-
*
|
|
755
868
|
* @param audioFrame The raw audio data. See AudioFrame .
|
|
756
869
|
*
|
|
757
870
|
* @returns
|
|
@@ -798,12 +911,12 @@ export class UserAudioSpectrumInfo {
|
|
|
798
911
|
export interface IAudioSpectrumObserver {
|
|
799
912
|
/**
|
|
800
913
|
* Gets the statistics of a local audio spectrum.
|
|
801
|
-
* After successfully calling registerAudioSpectrumObserver to implement the
|
|
914
|
+
* 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.
|
|
802
915
|
*
|
|
803
916
|
* @param data The audio spectrum data of the local user. See AudioSpectrumData .
|
|
804
917
|
*
|
|
805
918
|
* @returns
|
|
806
|
-
* Whether
|
|
919
|
+
* Whether the spectrum data is received:true: Spectrum data is received.false: No spectrum data is received.
|
|
807
920
|
*/
|
|
808
921
|
onLocalAudioSpectrum?(data: AudioSpectrumData): boolean;
|
|
809
922
|
|
|
@@ -812,11 +925,10 @@ export interface IAudioSpectrumObserver {
|
|
|
812
925
|
* 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.
|
|
813
926
|
*
|
|
814
927
|
* @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.
|
|
815
|
-
*
|
|
816
928
|
* @param spectrumNumber The number of remote users.
|
|
817
929
|
*
|
|
818
930
|
* @returns
|
|
819
|
-
* Whether
|
|
931
|
+
* Whether the spectrum data is received:true: Spectrum data is received.false: No spectrum data is received.
|
|
820
932
|
*/
|
|
821
933
|
onRemoteAudioSpectrum?(
|
|
822
934
|
spectrums: UserAudioSpectrumInfo[],
|
|
@@ -833,11 +945,8 @@ export interface IVideoEncodedFrameObserver {
|
|
|
833
945
|
* 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.
|
|
834
946
|
*
|
|
835
947
|
* @param uid The user ID of the remote user.
|
|
836
|
-
*
|
|
837
948
|
* @param imageBuffer The encoded video image buffer.
|
|
838
|
-
*
|
|
839
949
|
* @param length The data length of the video image.
|
|
840
|
-
*
|
|
841
950
|
* @param videoEncodedFrameInfo For the information of the encoded video frame, see EncodedVideoFrameInfo .
|
|
842
951
|
*
|
|
843
952
|
* @returns
|
|
@@ -871,112 +980,56 @@ export enum VideoFrameProcessMode {
|
|
|
871
980
|
export interface IVideoFrameObserver {
|
|
872
981
|
/**
|
|
873
982
|
* Occurs each time the SDK receives a video frame captured by the local camera.
|
|
874
|
-
* 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,
|
|
983
|
+
* 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.
|
|
875
984
|
*
|
|
876
|
-
* @param videoFrame The video frame. See VideoFrame .
|
|
985
|
+
* @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
|
|
877
986
|
*
|
|
878
987
|
* @returns
|
|
879
988
|
* 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.
|
|
880
989
|
*/
|
|
881
|
-
onCaptureVideoFrame?(
|
|
990
|
+
onCaptureVideoFrame?(
|
|
991
|
+
sourceType: VideoSourceType,
|
|
992
|
+
videoFrame: VideoFrame
|
|
993
|
+
): boolean;
|
|
882
994
|
|
|
883
995
|
/**
|
|
884
996
|
* Occurs each time the SDK receives a video frame before encoding.
|
|
885
997
|
* 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.
|
|
886
998
|
*
|
|
887
|
-
* @param videoFrame The video frame. See VideoFrame .
|
|
999
|
+
* @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
|
|
888
1000
|
*
|
|
889
1001
|
* @returns
|
|
890
1002
|
* 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.
|
|
891
1003
|
*/
|
|
892
|
-
onPreEncodeVideoFrame?(
|
|
1004
|
+
onPreEncodeVideoFrame?(
|
|
1005
|
+
sourceType: VideoSourceType,
|
|
1006
|
+
videoFrame: VideoFrame
|
|
1007
|
+
): boolean;
|
|
893
1008
|
|
|
894
1009
|
/**
|
|
895
1010
|
* @ignore
|
|
896
1011
|
*/
|
|
897
|
-
onSecondaryCameraCaptureVideoFrame?(videoFrame: VideoFrame): boolean;
|
|
898
|
-
|
|
899
|
-
/**
|
|
900
|
-
* Gets the video data captured from the second camera before encoding.
|
|
901
|
-
* 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 from the second camera 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.
|
|
902
|
-
*
|
|
903
|
-
* @param videoFrame The video frame. See VideoFrame .
|
|
904
|
-
*
|
|
905
|
-
* @returns
|
|
906
|
-
* true: Sets the SDK to receive the video frame.false: Sets the SDK to discard the video frame.
|
|
907
|
-
*/
|
|
908
|
-
onSecondaryPreEncodeCameraVideoFrame?(videoFrame: VideoFrame): boolean;
|
|
909
|
-
|
|
910
|
-
/**
|
|
911
|
-
* Occurs each time the SDK receives a video frame captured by the screen.
|
|
912
|
-
* 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 for screen sharing. 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.This callback does not support sending processed RGBA video data back to the SDK.The video data that this callback gets has not been pre-processed, and is not watermarked, cropped, rotated or beautified.
|
|
913
|
-
*
|
|
914
|
-
* @param videoFrame The video frame. See VideoFrame .
|
|
915
|
-
*
|
|
916
|
-
* @returns
|
|
917
|
-
* 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.
|
|
918
|
-
*/
|
|
919
|
-
onScreenCaptureVideoFrame?(videoFrame: VideoFrame): boolean;
|
|
920
|
-
|
|
921
|
-
/**
|
|
922
|
-
* Gets the video data captured from the screen before encoding.
|
|
923
|
-
* 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 from the screen 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.This callback does not support sending processed RGBA video data back to the SDK.
|
|
924
|
-
*
|
|
925
|
-
* @param videoFrame The video frame. See VideoFrame .
|
|
926
|
-
*
|
|
927
|
-
* @returns
|
|
928
|
-
* 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.
|
|
929
|
-
*/
|
|
930
|
-
onPreEncodeScreenVideoFrame?(videoFrame: VideoFrame): boolean;
|
|
931
|
-
|
|
932
|
-
/**
|
|
933
|
-
* Gets the video data of the media player.
|
|
934
|
-
* After you successfully register the video frame observer and calling the createMediaPlayer method, the SDK triggers this callback each time when it receives a video frame. In this callback, you can get the video data of the media player. You can then process the data according to your particular scenarios.This callback only supports read-only mode.
|
|
935
|
-
*
|
|
936
|
-
* @param videoFrame The video frame. See VideoFrame .
|
|
937
|
-
*
|
|
938
|
-
* @param mediaPlayerId The ID of the media player.
|
|
939
|
-
*
|
|
940
|
-
* @returns
|
|
941
|
-
* true: Reserved for future use.false: Reserved for future use.
|
|
942
|
-
*/
|
|
943
1012
|
onMediaPlayerVideoFrame?(
|
|
944
1013
|
videoFrame: VideoFrame,
|
|
945
1014
|
mediaPlayerId: number
|
|
946
1015
|
): boolean;
|
|
947
1016
|
|
|
948
|
-
/**
|
|
949
|
-
* @ignore
|
|
950
|
-
*/
|
|
951
|
-
onSecondaryScreenCaptureVideoFrame?(videoFrame: VideoFrame): boolean;
|
|
952
|
-
|
|
953
|
-
/**
|
|
954
|
-
* Gets the video data captured from the second screen before encoding.
|
|
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 captured from the second screen 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.
|
|
956
|
-
*
|
|
957
|
-
* @param videoFrame The video frame. See VideoFrame .
|
|
958
|
-
*
|
|
959
|
-
* @returns
|
|
960
|
-
* true: Sets the SDK to receive the video frame.false: Sets the SDK to discard the video frame.
|
|
961
|
-
*/
|
|
962
|
-
onSecondaryPreEncodeScreenVideoFrame?(videoFrame: VideoFrame): boolean;
|
|
963
|
-
|
|
964
1017
|
/**
|
|
965
1018
|
* Occurs each time the SDK receives a video frame sent by the remote user.
|
|
966
|
-
* 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
|
|
967
|
-
*
|
|
968
|
-
* @param videoFrame The video frame. See VideoFrame .
|
|
969
|
-
*
|
|
970
|
-
* @param remoteUid The user ID of the remote user who sends the current video frame.
|
|
1019
|
+
* 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.
|
|
971
1020
|
*
|
|
972
1021
|
* @param channelId The channel ID.
|
|
1022
|
+
* @param remoteUid The user ID of the remote user who sends the current video frame.
|
|
1023
|
+
* @param videoFrame The video frame. See VideoFrame .The default value of the video frame data format obtained through this callback is as follows:
|
|
1024
|
+
* macOS: YUV 420
|
|
1025
|
+
* Windows: YUV 420
|
|
973
1026
|
*
|
|
974
1027
|
* @returns
|
|
975
1028
|
* When the video processing mode is ProcessModeReadOnly:
|
|
976
|
-
*
|
|
977
|
-
*
|
|
978
|
-
*
|
|
979
|
-
*
|
|
1029
|
+
* true: Reserved for future use.
|
|
1030
|
+
* false: Reserved for future use. When the video processing mode is ProcessModeReadWrite:
|
|
1031
|
+
* true: Sets the SDK to receive the video frame.
|
|
1032
|
+
* false: Sets the SDK to discard the video frame.
|
|
980
1033
|
*/
|
|
981
1034
|
onRenderVideoFrame?(
|
|
982
1035
|
channelId: string,
|
|
@@ -985,7 +1038,13 @@ export interface IVideoFrameObserver {
|
|
|
985
1038
|
): boolean;
|
|
986
1039
|
|
|
987
1040
|
/**
|
|
988
|
-
*
|
|
1041
|
+
* Occurs each time the SDK receives a video frame before encoding.
|
|
1042
|
+
* 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.
|
|
1043
|
+
*
|
|
1044
|
+
* @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
|
|
1045
|
+
*
|
|
1046
|
+
* @returns
|
|
1047
|
+
* 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.
|
|
989
1048
|
*/
|
|
990
1049
|
onTranscodedVideoFrame?(videoFrame: VideoFrame): boolean;
|
|
991
1050
|
}
|
|
@@ -1129,10 +1188,14 @@ export interface IMediaRecorderObserver {
|
|
|
1129
1188
|
* 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.
|
|
1130
1189
|
*
|
|
1131
1190
|
* @param state The current recording state. See RecorderState .
|
|
1132
|
-
*
|
|
1133
1191
|
* @param error The reason for the state change. See RecorderErrorCode .
|
|
1134
1192
|
*/
|
|
1135
|
-
onRecorderStateChanged?(
|
|
1193
|
+
onRecorderStateChanged?(
|
|
1194
|
+
channelId: string,
|
|
1195
|
+
uid: number,
|
|
1196
|
+
state: RecorderState,
|
|
1197
|
+
error: RecorderErrorCode
|
|
1198
|
+
): void;
|
|
1136
1199
|
|
|
1137
1200
|
/**
|
|
1138
1201
|
* Occurs when the recording information is updated.
|
|
@@ -1140,5 +1203,9 @@ export interface IMediaRecorderObserver {
|
|
|
1140
1203
|
*
|
|
1141
1204
|
* @param info The information about the file that is recorded. See RecorderInfo .
|
|
1142
1205
|
*/
|
|
1143
|
-
onRecorderInfoUpdated?(
|
|
1206
|
+
onRecorderInfoUpdated?(
|
|
1207
|
+
channelId: string,
|
|
1208
|
+
uid: number,
|
|
1209
|
+
info: RecorderInfo
|
|
1210
|
+
): void;
|
|
1144
1211
|
}
|
|
@@ -404,7 +404,7 @@ export class MediaSource {
|
|
|
404
404
|
*/
|
|
405
405
|
autoPlay?: boolean;
|
|
406
406
|
/**
|
|
407
|
-
* Whether to cache the media file when it is being played:true:Enables caching.false: (Default) Disables caching.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 .
|
|
407
|
+
* 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 .
|
|
408
408
|
*/
|
|
409
409
|
enableCache?: boolean;
|
|
410
410
|
/**
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import './extension/IAgoraMediaEngineExtension';
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
AudioTrackConfig,
|
|
4
|
+
AudioTrackType,
|
|
5
|
+
EncodedVideoFrameInfo,
|
|
6
|
+
SenderOptions,
|
|
7
|
+
} from './AgoraBase';
|
|
8
|
+
import {
|
|
7
9
|
AudioFrame,
|
|
8
|
-
ExternalVideoSourceType,
|
|
9
10
|
ExternalVideoFrame,
|
|
11
|
+
ExternalVideoSourceType,
|
|
12
|
+
IAudioFrameObserver,
|
|
13
|
+
IVideoEncodedFrameObserver,
|
|
14
|
+
IVideoFrameObserver,
|
|
10
15
|
} from './AgoraMediaBase';
|
|
11
|
-
|
|
16
|
+
|
|
12
17
|
/**
|
|
13
18
|
* The channel mode.
|
|
14
19
|
*/
|
|
@@ -48,9 +53,18 @@ export abstract class IMediaEngine {
|
|
|
48
53
|
|
|
49
54
|
/**
|
|
50
55
|
* Registers a raw video frame observer object.
|
|
51
|
-
* 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:
|
|
56
|
+
* 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:
|
|
57
|
+
* Call registerVideoFrameObserver to register the raw video frame observer before joining the channel.
|
|
58
|
+
* Call registerVideoEncodedFrameObserver to register the encoded video frame observer before joining the channel.
|
|
59
|
+
* 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.
|
|
60
|
+
* Call muteAllRemoteVideoStreams (false) to start receiving the video streams of all remote users. Then:
|
|
61
|
+
* The raw video data of group A users can be obtained through the callback in IVideoFrameObserver , and the SDK renders the data by default.
|
|
62
|
+
* 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.
|
|
52
63
|
*
|
|
53
64
|
* @param observer The observer object instance. See IVideoFrameObserver .
|
|
65
|
+
*
|
|
66
|
+
* @returns
|
|
67
|
+
* 0: Success.< 0: Failure.
|
|
54
68
|
*/
|
|
55
69
|
abstract registerVideoFrameObserver(observer: IVideoFrameObserver): number;
|
|
56
70
|
|
|
@@ -71,41 +85,21 @@ export abstract class IMediaEngine {
|
|
|
71
85
|
* Pushes the external audio frame.
|
|
72
86
|
*
|
|
73
87
|
* @param type The type of the audio recording device. See MediaSourceType .
|
|
74
|
-
*
|
|
75
88
|
* @param frame The external audio frame. See AudioFrame .
|
|
76
|
-
*
|
|
77
89
|
* @param wrap Whether to use the placeholder. Agora recommends using the default value.true: Use the placeholder.false: (Default) Do not use the placeholder.
|
|
78
|
-
*
|
|
79
90
|
* @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.
|
|
80
91
|
*
|
|
81
92
|
* @returns
|
|
82
93
|
* 0: Success.< 0: Failure.
|
|
83
94
|
*/
|
|
84
|
-
abstract pushAudioFrame(
|
|
85
|
-
type: MediaSourceType,
|
|
86
|
-
frame: AudioFrame,
|
|
87
|
-
wrap?: boolean,
|
|
88
|
-
sourceId?: number
|
|
89
|
-
): number;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* @ignore
|
|
93
|
-
*/
|
|
94
|
-
abstract pushCaptureAudioFrame(frame: AudioFrame): number;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* @ignore
|
|
98
|
-
*/
|
|
99
|
-
abstract pushReverseAudioFrame(frame: AudioFrame): number;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* @ignore
|
|
103
|
-
*/
|
|
104
|
-
abstract pushDirectAudioFrame(frame: AudioFrame): number;
|
|
95
|
+
abstract pushAudioFrame(frame: AudioFrame, trackId?: number): number;
|
|
105
96
|
|
|
106
97
|
/**
|
|
107
98
|
* Pulls the remote audio data.
|
|
108
99
|
* 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.
|
|
100
|
+
*
|
|
101
|
+
* @returns
|
|
102
|
+
* The AudioFrame instance, if the method call succeeds.An error code, if the call fails,.
|
|
109
103
|
*/
|
|
110
104
|
abstract pullAudioFrame(): AudioFrame;
|
|
111
105
|
|
|
@@ -114,11 +108,8 @@ export abstract class IMediaEngine {
|
|
|
114
108
|
* Call this method before joining a channel.
|
|
115
109
|
*
|
|
116
110
|
* @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.
|
|
117
|
-
*
|
|
118
111
|
* @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.
|
|
119
|
-
*
|
|
120
|
-
* @param sourceType Whether to encode the external video frame, see ExternalVideoSourceType .
|
|
121
|
-
*
|
|
112
|
+
* @param sourceType Whether the external video frame is encoded. See ExternalVideoSourceType .
|
|
122
113
|
* @param encodedVideoOption Video encoding options. This parameter needs to be set if sourceType is EncodedVideoFrame. To set this parameter, contact .
|
|
123
114
|
*
|
|
124
115
|
* @returns
|
|
@@ -132,19 +123,14 @@ export abstract class IMediaEngine {
|
|
|
132
123
|
): number;
|
|
133
124
|
|
|
134
125
|
/**
|
|
135
|
-
* Sets the external
|
|
126
|
+
* Sets the external audio source parameters.
|
|
136
127
|
* Call this method before joining a channel.
|
|
137
128
|
*
|
|
138
129
|
* @param enabled Whether to enable the external audio source:true: Enable the external audio source.false: (Default) Disable the external audio source.
|
|
139
|
-
*
|
|
140
|
-
* @param sampleRate The sample rate (Hz) of the external audio source, which can be set as 8000, 16000, 32000, 44100, or 48000.
|
|
141
|
-
*
|
|
130
|
+
* @param sampleRate The sample rate (Hz) of the external audio which can be set as 8000, 16000, 32000, 44100, or 48000.
|
|
142
131
|
* @param channels The number of channels of the external audio source, which can be set as 1 (Mono) or 2 (Stereo).
|
|
143
|
-
*
|
|
144
132
|
* @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.
|
|
145
|
-
*
|
|
146
133
|
* @param localPlayback Whether to play the external audio source:true: Play the external audio source.false: (Default) Do not play the external source.
|
|
147
|
-
*
|
|
148
134
|
* @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.
|
|
149
135
|
*
|
|
150
136
|
* @returns
|
|
@@ -154,19 +140,29 @@ export abstract class IMediaEngine {
|
|
|
154
140
|
enabled: boolean,
|
|
155
141
|
sampleRate: number,
|
|
156
142
|
channels: number,
|
|
157
|
-
sourceNumber?: number,
|
|
158
143
|
localPlayback?: boolean,
|
|
159
144
|
publish?: boolean
|
|
160
145
|
): number;
|
|
161
146
|
|
|
147
|
+
/**
|
|
148
|
+
* @ignore
|
|
149
|
+
*/
|
|
150
|
+
abstract createCustomAudioTrack(
|
|
151
|
+
trackType: AudioTrackType,
|
|
152
|
+
config: AudioTrackConfig
|
|
153
|
+
): number;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* @ignore
|
|
157
|
+
*/
|
|
158
|
+
abstract destroyCustomAudioTrack(trackId: number): number;
|
|
159
|
+
|
|
162
160
|
/**
|
|
163
161
|
* Sets the external audio sink.
|
|
164
162
|
* 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.
|
|
165
163
|
*
|
|
166
164
|
* @param enabled Whether to enable or disable the external audio sink:true: Enables the external audio sink.false: (Default) Disables the external audio sink.
|
|
167
|
-
*
|
|
168
165
|
* @param sampleRate The sample rate (Hz) of the external audio sink, which can be set as 16000, 32000, 44100, or 48000.
|
|
169
|
-
*
|
|
170
166
|
* @param channels The number of audio channels of the external audio sink:1: Mono.2: Stereo.
|
|
171
167
|
*
|
|
172
168
|
* @returns
|
|
@@ -182,24 +178,15 @@ export abstract class IMediaEngine {
|
|
|
182
178
|
* @ignore
|
|
183
179
|
*/
|
|
184
180
|
abstract enableCustomAudioLocalPlayback(
|
|
185
|
-
|
|
181
|
+
trackId: number,
|
|
186
182
|
enabled: boolean
|
|
187
183
|
): number;
|
|
188
184
|
|
|
189
|
-
/**
|
|
190
|
-
* @ignore
|
|
191
|
-
*/
|
|
192
|
-
abstract setDirectExternalAudioSource(
|
|
193
|
-
enable: boolean,
|
|
194
|
-
localPlayback?: boolean
|
|
195
|
-
): number;
|
|
196
|
-
|
|
197
185
|
/**
|
|
198
186
|
* Pushes the external raw video frame to the SDK.
|
|
199
|
-
*
|
|
187
|
+
* 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.
|
|
200
188
|
*
|
|
201
189
|
* @param frame The external raw video frame to be pushed. See ExternalVideoFrame .
|
|
202
|
-
*
|
|
203
190
|
* @param videoTrackId The video track ID returned by calling the createCustomVideoTrack method. The default value is 0.
|
|
204
191
|
*
|
|
205
192
|
* @returns
|