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,18 +1,20 @@
|
|
|
1
1
|
import './extension/IAgoraMediaPlayerExtension';
|
|
2
|
+
import { SpatialAudioParams } from './AgoraBase';
|
|
2
3
|
import {
|
|
3
|
-
MediaSource,
|
|
4
|
-
PlayerStreamInfo,
|
|
5
|
-
MediaPlayerState,
|
|
6
|
-
} from './AgoraMediaPlayerTypes';
|
|
7
|
-
import {
|
|
8
|
-
RenderModeType,
|
|
9
|
-
IAudioSpectrumObserver,
|
|
10
4
|
AudioDualMonoMode,
|
|
11
|
-
|
|
5
|
+
IAudioPcmFrameSink,
|
|
6
|
+
IAudioSpectrumObserver,
|
|
7
|
+
RawAudioFrameOpModeType,
|
|
8
|
+
RenderModeType,
|
|
12
9
|
VideoFrame,
|
|
13
10
|
} from './AgoraMediaBase';
|
|
11
|
+
import {
|
|
12
|
+
MediaPlayerState,
|
|
13
|
+
MediaSource,
|
|
14
|
+
PlayerStreamInfo,
|
|
15
|
+
} from './AgoraMediaPlayerTypes';
|
|
14
16
|
import { IMediaPlayerSourceObserver } from './IAgoraMediaPlayerSource';
|
|
15
|
-
|
|
17
|
+
|
|
16
18
|
/**
|
|
17
19
|
* This class provides media player functions and supports multiple instances.
|
|
18
20
|
*/
|
|
@@ -30,7 +32,6 @@ export abstract class IMediaPlayer {
|
|
|
30
32
|
* This method is called asynchronously.If you need to play a media file, make sure you receive the onPlayerSourceStateChanged callback reporting PlayerStateOpenCompleted before calling the play method to play the file.
|
|
31
33
|
*
|
|
32
34
|
* @param url The path of the media file. Both local path and online path are supported.On the Android platform, if you need to open a file in URI format, use open .
|
|
33
|
-
*
|
|
34
35
|
* @param startPos The starting position (ms) for playback. Default value is 0.
|
|
35
36
|
*
|
|
36
37
|
* @returns
|
|
@@ -84,7 +85,7 @@ export abstract class IMediaPlayer {
|
|
|
84
85
|
|
|
85
86
|
/**
|
|
86
87
|
* Seeks to a new playback position.
|
|
87
|
-
*
|
|
88
|
+
* fter successfully calling this method, you will receive the onPlayerEvent callback, reporting the result of the seek operation to the new playback position.To play the media file from a specific position, do the following:Call this method to seek to the position you want to begin playback.Call the play method to play the media file.
|
|
88
89
|
*
|
|
89
90
|
* @param newPos The new playback position (ms).
|
|
90
91
|
*
|
|
@@ -163,22 +164,15 @@ export abstract class IMediaPlayer {
|
|
|
163
164
|
abstract setPlaybackSpeed(speed: number): number;
|
|
164
165
|
|
|
165
166
|
/**
|
|
166
|
-
*
|
|
167
|
-
* After getting the track index of the audio file, you can call this method to specify any track to play. For example, if different tracks of a multi-track file store songs in different languages, you can call this method to set the playback language.You need to call this method after calling getStreamInfo to get the audio stream index value.
|
|
168
|
-
*
|
|
169
|
-
* @param index The index of the audio track.
|
|
170
|
-
*
|
|
171
|
-
* @returns
|
|
172
|
-
* 0: Success.< 0: Failure.
|
|
167
|
+
* @ignore
|
|
173
168
|
*/
|
|
174
169
|
abstract selectAudioTrack(index: number): number;
|
|
175
170
|
|
|
176
171
|
/**
|
|
177
172
|
* Sets the private options for the media player.
|
|
178
|
-
* The media player supports setting private options by key and value. Under normal circumstances, you do not need to know the private option settings, and just use the default option settings.Ensure that you call this method before open .If you need to push streams with SEI into the CDN,
|
|
173
|
+
* The media player supports setting private options by key and value. Under normal circumstances, you do not need to know the private option settings, and just use the default option settings.Ensure that you call this method before open .If you need to push streams with SEI into the CDN, call setPlayerOptionInInt("sei_data_with_uuid", 1); otherwise, the loss of SEI might occurs.
|
|
179
174
|
*
|
|
180
175
|
* @param key The key of the option.
|
|
181
|
-
*
|
|
182
176
|
* @param value The value of the key.
|
|
183
177
|
*
|
|
184
178
|
* @returns
|
|
@@ -187,7 +181,14 @@ export abstract class IMediaPlayer {
|
|
|
187
181
|
abstract setPlayerOptionInInt(key: string, value: number): number;
|
|
188
182
|
|
|
189
183
|
/**
|
|
190
|
-
*
|
|
184
|
+
* Sets the private options for the media player.
|
|
185
|
+
* The media player supports setting private options by key and value. Under normal circumstances, you do not need to know the private option settings, and just use the default option settings.Ensure that you call this method before open .If you need to push streams with SEI into the CDN, call setPlayerOptionInInt("sei_data_with_uuid", 1); otherwise, the loss of SEI might occurs.
|
|
186
|
+
*
|
|
187
|
+
* @param key The key of the option.
|
|
188
|
+
* @param value The value of the key.
|
|
189
|
+
*
|
|
190
|
+
* @returns
|
|
191
|
+
* 0: Success.< 0: Failure.
|
|
191
192
|
*/
|
|
192
193
|
abstract setPlayerOptionInString(key: string, value: string): number;
|
|
193
194
|
|
|
@@ -202,7 +203,13 @@ export abstract class IMediaPlayer {
|
|
|
202
203
|
abstract selectInternalSubtitle(index: number): number;
|
|
203
204
|
|
|
204
205
|
/**
|
|
205
|
-
*
|
|
206
|
+
* Stops pushing media streams to a CDN.
|
|
207
|
+
* Agora recommends that you use the server-side Media Push function. You can call this method to stop the live stream on the specified CDN address. This method can stop pushing media streams to only one CDN address at a time, so if you need to stop pushing streams to multiple addresses, call this method multiple times.After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming.
|
|
208
|
+
*
|
|
209
|
+
* @param url The address of Media Push. The format is RTMP or RTMPS. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported.
|
|
210
|
+
*
|
|
211
|
+
* @returns
|
|
212
|
+
* 0: Success.< 0: Failure.
|
|
206
213
|
*/
|
|
207
214
|
abstract setExternalSubtitle(url: string): number;
|
|
208
215
|
|
|
@@ -270,20 +277,14 @@ export abstract class IMediaPlayer {
|
|
|
270
277
|
abstract getPublishSignalVolume(): number;
|
|
271
278
|
|
|
272
279
|
/**
|
|
273
|
-
*
|
|
280
|
+
* Destroys a video renderer object.
|
|
274
281
|
*
|
|
275
|
-
* @
|
|
276
|
-
* 0: Success.< 0: Failure.
|
|
282
|
+
* @param view The HTMLElement object to be destroyed.
|
|
277
283
|
*/
|
|
278
284
|
abstract setView(view: any): number;
|
|
279
285
|
|
|
280
286
|
/**
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
* @param renderMode Sets the render mode of the view. See RenderModeType .
|
|
284
|
-
*
|
|
285
|
-
* @returns
|
|
286
|
-
* 0: Success.< 0: Failure.
|
|
287
|
+
* @ignore
|
|
287
288
|
*/
|
|
288
289
|
abstract setRenderMode(renderMode: RenderModeType): number;
|
|
289
290
|
|
|
@@ -311,6 +312,51 @@ export abstract class IMediaPlayer {
|
|
|
311
312
|
observer: IMediaPlayerSourceObserver
|
|
312
313
|
): number;
|
|
313
314
|
|
|
315
|
+
/**
|
|
316
|
+
* Registers an audio frame observer object.
|
|
317
|
+
*
|
|
318
|
+
* @param mode The use mode of the audio frame. See RawAudioFrameOpModeType .
|
|
319
|
+
*/
|
|
320
|
+
abstract registerAudioFrameObserver(
|
|
321
|
+
observer: IAudioPcmFrameSink,
|
|
322
|
+
mode?: RawAudioFrameOpModeType
|
|
323
|
+
): number;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Unregisters an audio observer.
|
|
327
|
+
*
|
|
328
|
+
* @param observer The audio observer. See IMediaPlayerAudioFrameObserver .
|
|
329
|
+
*
|
|
330
|
+
* @returns
|
|
331
|
+
* 0: Success.< 0: Failure.
|
|
332
|
+
*/
|
|
333
|
+
abstract unregisterAudioFrameObserver(observer: IAudioPcmFrameSink): number;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Registers a video frame observer object.
|
|
337
|
+
* You need to implement the IMediaPlayerVideoFrameObserver class in this method and register callbacks according to your scenarios. After you successfully register the video frame observer, the SDK triggers the registered callbacks each time a video frame is received.
|
|
338
|
+
*
|
|
339
|
+
* @param observer The video observer, reporting the reception of each video frame. See IMediaPlayerVideoFrameObserver .
|
|
340
|
+
*
|
|
341
|
+
* @returns
|
|
342
|
+
* 0: Success.< 0: Failure.
|
|
343
|
+
*/
|
|
344
|
+
abstract registerVideoFrameObserver(
|
|
345
|
+
observer: IMediaPlayerVideoFrameObserver
|
|
346
|
+
): number;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Unregisters the video frame observer.
|
|
350
|
+
*
|
|
351
|
+
* @param observer The video observer, reporting the reception of each video frame. See IMediaPlayerVideoFrameObserver .
|
|
352
|
+
*
|
|
353
|
+
* @returns
|
|
354
|
+
* 0: Success.< 0: Failure.
|
|
355
|
+
*/
|
|
356
|
+
abstract unregisterVideoFrameObserver(
|
|
357
|
+
observer: IMediaPlayerVideoFrameObserver
|
|
358
|
+
): number;
|
|
359
|
+
|
|
314
360
|
/**
|
|
315
361
|
* @ignore
|
|
316
362
|
*/
|
|
@@ -320,7 +366,12 @@ export abstract class IMediaPlayer {
|
|
|
320
366
|
): number;
|
|
321
367
|
|
|
322
368
|
/**
|
|
323
|
-
*
|
|
369
|
+
* Unregisters the encoded audio frame observer.
|
|
370
|
+
*
|
|
371
|
+
* @param observer The encoded audio observer. See IAudioEncodedFrameObserver .
|
|
372
|
+
*
|
|
373
|
+
* @returns
|
|
374
|
+
* 0: Success.< 0: Failure.
|
|
324
375
|
*/
|
|
325
376
|
abstract unregisterMediaPlayerAudioSpectrumObserver(
|
|
326
377
|
observer: IAudioSpectrumObserver
|
|
@@ -384,10 +435,9 @@ export abstract class IMediaPlayer {
|
|
|
384
435
|
|
|
385
436
|
/**
|
|
386
437
|
* Switches the media resource being played.
|
|
387
|
-
* You can call this method to switch the media resource to be played according to the current network status. For example:When the network is poor, the media resource to be played is switched to a media resource address with a lower bitrate.When the network is good, the media resource to be played is switched to a media resource address with a higher bitrate.After calling this method, if you receive the
|
|
438
|
+
* You can call this method to switch the media resource to be played according to the current network status. For example:When the network is poor, the media resource to be played is switched to a media resource address with a lower bitrate.When the network is good, the media resource to be played is switched to a media resource address with a higher bitrate.After calling this method, if you receive the PlayerEventSwitchComplete event in the onPlayerEvent callback, the switch is successful; If you receive the PlayerEventSwitchError event in the onPlayerEvent callback, the switch fails.Ensure that you call this method after open .To ensure normal playback, pay attention to the following when calling this method:Do not call this method when playback is paused.Do not call the seek method during switching.Before switching the media resource, make sure that the playback position does not exceed the total duration of the media resource to be switched.
|
|
388
439
|
*
|
|
389
440
|
* @param src The URL of the media resource.
|
|
390
|
-
*
|
|
391
441
|
* @param syncPts Whether to synchronize the playback position (ms) before and after the switch:true: Synchronize the playback position before and after the switch.false: (Default) Do not synchronize the playback position before and after the switch.Make sure to set this parameter as false if you need to play live streams, or the switch fails. If you need to play on-demand streams, you can set the value of this parameter according to your scenarios.
|
|
392
442
|
*
|
|
393
443
|
* @returns
|
|
@@ -400,7 +450,6 @@ export abstract class IMediaPlayer {
|
|
|
400
450
|
* You can call this method to preload a media resource into the playlist. If you need to preload multiple media resources, you can call this method multiple times.After calling this method, if you receive the PlayerPreloadEventComplete event in the onPreloadEvent callback, the preload is successful; If you receive the PlayerPreloadEventError event in the onPreloadEvent callback, the preload fails.If the preload is successful and you want to play the media resource, call playPreloadedSrc ; if you want to clear the playlist, call stop .Agora does not support preloading duplicate media resources to the playlist. However, you can preload the media resources that are being played to the playlist again.
|
|
401
451
|
*
|
|
402
452
|
* @param src The URL of the media resource.
|
|
403
|
-
*
|
|
404
453
|
* @param startPos The starting position (ms) for playing after the media resource is preloaded to the playlist. When preloading a live stream, set this parameter to 0.
|
|
405
454
|
*
|
|
406
455
|
* @returns
|
|
@@ -443,56 +492,6 @@ export abstract class IMediaPlayer {
|
|
|
443
492
|
* @ignore
|
|
444
493
|
*/
|
|
445
494
|
abstract setSoundPositionParams(pan: number, gain: number): number;
|
|
446
|
-
|
|
447
|
-
/**
|
|
448
|
-
* Registers an audio frame observer object.
|
|
449
|
-
* You need to implement the IMediaPlayerAudioFrameObserver class in this method and register callbacks according to your scenarios. After you successfully register the video frame observer, the SDK triggers the registered callbacks each time a video frame is received.
|
|
450
|
-
*
|
|
451
|
-
* @param observer The audio frame observer, reporting the reception of each audio frame. See IMediaPlayerAudioFrameObserver .
|
|
452
|
-
*
|
|
453
|
-
* @returns
|
|
454
|
-
* 0: Success.< 0: Failure.
|
|
455
|
-
*/
|
|
456
|
-
abstract registerAudioFrameObserver(
|
|
457
|
-
observer: IMediaPlayerAudioFrameObserver
|
|
458
|
-
): number;
|
|
459
|
-
|
|
460
|
-
/**
|
|
461
|
-
* Unregisters an audio observer.
|
|
462
|
-
*
|
|
463
|
-
* @param observer The audio observer. See IMediaPlayerAudioFrameObserver .
|
|
464
|
-
*
|
|
465
|
-
* @returns
|
|
466
|
-
* 0: Success.< 0: Failure.
|
|
467
|
-
*/
|
|
468
|
-
abstract unregisterAudioFrameObserver(
|
|
469
|
-
observer: IMediaPlayerAudioFrameObserver
|
|
470
|
-
): number;
|
|
471
|
-
|
|
472
|
-
/**
|
|
473
|
-
* Registers a video frame observer object.
|
|
474
|
-
* You need to implement the IMediaPlayerVideoFrameObserver class in this method and register callbacks according to your scenarios. After you successfully register the video frame observer, the SDK triggers the registered callbacks each time a video frame is received.
|
|
475
|
-
*
|
|
476
|
-
* @param observer The video observer, reporting the reception of each video frame. See IMediaPlayerVideoFrameObserver .
|
|
477
|
-
*
|
|
478
|
-
* @returns
|
|
479
|
-
* 0: Success.< 0: Failure.
|
|
480
|
-
*/
|
|
481
|
-
abstract registerVideoFrameObserver(
|
|
482
|
-
observer: IMediaPlayerVideoFrameObserver
|
|
483
|
-
): number;
|
|
484
|
-
|
|
485
|
-
/**
|
|
486
|
-
* Unregisters the video frame observer.
|
|
487
|
-
*
|
|
488
|
-
* @param observer The video observer, reporting the reception of each video frame. See IMediaPlayerVideoFrameObserver .
|
|
489
|
-
*
|
|
490
|
-
* @returns
|
|
491
|
-
* 0: Success.< 0: Failure.
|
|
492
|
-
*/
|
|
493
|
-
abstract unregisterVideoFrameObserver(
|
|
494
|
-
observer: IMediaPlayerVideoFrameObserver
|
|
495
|
-
): number;
|
|
496
495
|
}
|
|
497
496
|
|
|
498
497
|
/**
|
|
@@ -514,7 +513,7 @@ export abstract class IMediaPlayerCacheManager {
|
|
|
514
513
|
*
|
|
515
514
|
* @returns
|
|
516
515
|
* 0: Success.
|
|
517
|
-
*
|
|
516
|
+
* < 0: Failure. See MediaPlayerError .
|
|
518
517
|
*/
|
|
519
518
|
abstract removeOldCache(): number;
|
|
520
519
|
|
|
@@ -525,7 +524,8 @@ export abstract class IMediaPlayerCacheManager {
|
|
|
525
524
|
* @param uri The URI (Uniform Resource Identifier) of the media file to be deleted.
|
|
526
525
|
*
|
|
527
526
|
* @returns
|
|
528
|
-
* 0: Success
|
|
527
|
+
* 0: Success.
|
|
528
|
+
* < 0: Failure. See MediaPlayerError .
|
|
529
529
|
*/
|
|
530
530
|
abstract removeCacheByUri(uri: string): number;
|
|
531
531
|
|
|
@@ -537,7 +537,7 @@ export abstract class IMediaPlayerCacheManager {
|
|
|
537
537
|
*
|
|
538
538
|
* @returns
|
|
539
539
|
* 0: Success.
|
|
540
|
-
*
|
|
540
|
+
* < 0: Failure. See MediaPlayerError .
|
|
541
541
|
*/
|
|
542
542
|
abstract setCacheDir(path: string): number;
|
|
543
543
|
|
|
@@ -547,8 +547,7 @@ export abstract class IMediaPlayerCacheManager {
|
|
|
547
547
|
* @param count The maximum number of media files that can be cached. The default value is 1,000.
|
|
548
548
|
*
|
|
549
549
|
* @returns
|
|
550
|
-
* 0: Success.
|
|
551
|
-
* < 0: Failure. See MediaPlayerError .
|
|
550
|
+
* 0: Success.< 0: Failure. See MediaPlayerError .
|
|
552
551
|
*/
|
|
553
552
|
abstract setMaxCacheFileCount(count: number): number;
|
|
554
553
|
|
|
@@ -570,7 +569,7 @@ export abstract class IMediaPlayerCacheManager {
|
|
|
570
569
|
*
|
|
571
570
|
* @returns
|
|
572
571
|
* 0: Success.
|
|
573
|
-
*
|
|
572
|
+
* < 0: Failure. See MediaPlayerError .
|
|
574
573
|
*/
|
|
575
574
|
abstract enableAutoRemoveCache(enable: boolean): number;
|
|
576
575
|
|
|
@@ -612,19 +611,6 @@ export abstract class IMediaPlayerCacheManager {
|
|
|
612
611
|
abstract getCacheFileCount(): number;
|
|
613
612
|
}
|
|
614
613
|
|
|
615
|
-
/**
|
|
616
|
-
* The audio frame observer for the media player.
|
|
617
|
-
*/
|
|
618
|
-
export interface IMediaPlayerAudioFrameObserver {
|
|
619
|
-
/**
|
|
620
|
-
* Occurs each time the player receives an audio frame.
|
|
621
|
-
* After registering the audio frame observer, the callback occurs every time the player receives an audio frame, reporting the detailed information of the audio frame.
|
|
622
|
-
*
|
|
623
|
-
* @param frame Audio frame information. See AudioPcmFrame .
|
|
624
|
-
*/
|
|
625
|
-
onFrame?(frame: AudioPcmFrame): void;
|
|
626
|
-
}
|
|
627
|
-
|
|
628
614
|
/**
|
|
629
615
|
* The video frame observer for the media player.
|
|
630
616
|
*/
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import './extension/IAgoraMediaPlayerSourceExtension';
|
|
2
2
|
import {
|
|
3
|
-
MediaPlayerState,
|
|
4
3
|
MediaPlayerError,
|
|
5
4
|
MediaPlayerEvent,
|
|
5
|
+
MediaPlayerState,
|
|
6
6
|
PlayerPreloadEvent,
|
|
7
|
-
SrcInfo,
|
|
8
7
|
PlayerUpdatedInfo,
|
|
8
|
+
SrcInfo,
|
|
9
9
|
} from './AgoraMediaPlayerTypes';
|
|
10
|
+
|
|
10
11
|
/**
|
|
11
12
|
* Provides callbacks for media players.
|
|
12
13
|
*/
|
|
@@ -16,7 +17,6 @@ export interface IMediaPlayerSourceObserver {
|
|
|
16
17
|
* When the state of the media player changes, the SDK triggers this callback to report the current playback state.
|
|
17
18
|
*
|
|
18
19
|
* @param state The playback state, see MediaPlayerState .
|
|
19
|
-
*
|
|
20
20
|
* @param ec The error code. See MediaPlayerError .
|
|
21
21
|
*/
|
|
22
22
|
onPlayerSourceStateChanged?(
|
|
@@ -37,9 +37,7 @@ export interface IMediaPlayerSourceObserver {
|
|
|
37
37
|
* After calling the seek method, the SDK triggers the callback to report the results of the seek operation.
|
|
38
38
|
*
|
|
39
39
|
* @param eventCode The playback event. See MediaPlayerEvent .
|
|
40
|
-
*
|
|
41
40
|
* @param elapsedTime The time (ms) when the event occurs.
|
|
42
|
-
*
|
|
43
41
|
* @param message Information about the event.
|
|
44
42
|
*/
|
|
45
43
|
onPlayerEvent?(
|
|
@@ -53,7 +51,6 @@ export interface IMediaPlayerSourceObserver {
|
|
|
53
51
|
* The callback occurs when the player receives the media metadata and reports the detailed information of the media metadata.
|
|
54
52
|
*
|
|
55
53
|
* @param data The detailed data of the media metadata.
|
|
56
|
-
*
|
|
57
54
|
* @param length The data length (bytes).
|
|
58
55
|
*/
|
|
59
56
|
onMetaData?(data: Uint8Array, length: number): void;
|
|
@@ -70,7 +67,6 @@ export interface IMediaPlayerSourceObserver {
|
|
|
70
67
|
* Reports the events of preloaded media resources.
|
|
71
68
|
*
|
|
72
69
|
* @param src The URL of the media resource.
|
|
73
|
-
*
|
|
74
70
|
* @param event Events that occur when media resources are preloaded. See PlayerPreloadEvent .
|
|
75
71
|
*/
|
|
76
72
|
onPreloadEvent?(src: string, event: PlayerPreloadEvent): void;
|
|
@@ -89,7 +85,6 @@ export interface IMediaPlayerSourceObserver {
|
|
|
89
85
|
* Occurs when the video bitrate of the media resource changes.
|
|
90
86
|
*
|
|
91
87
|
* @param from Information about the video bitrate of the media resource being played. See SrcInfo .
|
|
92
|
-
*
|
|
93
88
|
* @param to Information about the changed video bitrate of media resource being played. See SrcInfo .
|
|
94
89
|
*/
|
|
95
90
|
onPlayerSrcInfoChanged?(from: SrcInfo, to: SrcInfo): void;
|
|
@@ -1,61 +1,34 @@
|
|
|
1
1
|
import './extension/IAgoraMediaRecorderExtension';
|
|
2
|
-
import { RtcConnection } from './IAgoraRtcEngineEx';
|
|
3
2
|
import {
|
|
4
3
|
IMediaRecorderObserver,
|
|
5
4
|
MediaRecorderConfiguration,
|
|
6
5
|
} from './AgoraMediaBase';
|
|
6
|
+
|
|
7
7
|
/**
|
|
8
8
|
* Used for recording audio and video on the client.
|
|
9
9
|
* IMediaRecorder can record the following:
|
|
10
|
-
*
|
|
10
|
+
* The audio captured by the local microphone and encoded in AAC format.The video captured by the local camera and encoded by the SDK.
|
|
11
11
|
*/
|
|
12
12
|
export abstract class IMediaRecorder {
|
|
13
13
|
/**
|
|
14
14
|
* Registers one IMediaRecorderObserver object.
|
|
15
|
-
* Make sure
|
|
15
|
+
* Make sure that IRtcEngine is initialized before you call this method.
|
|
16
16
|
*
|
|
17
17
|
* @param connection The connection information. See RtcConnection .
|
|
18
|
-
*
|
|
19
18
|
* @param callback The callbacks for recording local audio and video streams. See IMediaRecorderObserver .
|
|
20
19
|
*
|
|
21
20
|
* @returns
|
|
22
21
|
* 0: Success.< 0: Failure.
|
|
23
22
|
*/
|
|
24
|
-
abstract setMediaRecorderObserver(
|
|
25
|
-
connection: RtcConnection,
|
|
26
|
-
callback: IMediaRecorderObserver
|
|
27
|
-
): number;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Starts recording the local audio and video.
|
|
31
|
-
* After successfully getting the IMediaRecorder object by calling getMediaRecorder , you can call this method to enable the recoridng of the local audio and video.This method can record the audio captured by the local microphone and encoded in AAC format, and the video captured by the local camera and encoded in H.264 format. The SDK can generate a recording file only when it detects audio and video streams; when there are no audio and video streams to be recorded or the audio and video streams are interrupted for more than five seconds, the SDK stops the recording and triggers the onRecorderStateChanged(RecorderStateError, RecorderErrorNoStream) callback.Once the recording is started, if the video resolution is changed, the SDK stops the recording; if the sampling rate and audio channel changes, the SDK continues recording and generates audio files respectively.Call this method after joining a channel.
|
|
32
|
-
*
|
|
33
|
-
* @param connection The connection information. See RtcConnection .
|
|
34
|
-
*
|
|
35
|
-
* @param config The recording configuration. See MediaRecorderConfiguration .
|
|
36
|
-
*
|
|
37
|
-
* @returns
|
|
38
|
-
* 0: Success.< 0: Failure.2: The parameter is invalid. Ensure the following:The specified path of the recording file exists and is writable.The specified format of the recording file is supported.The maximum recording duration is correctly set.4: IRtcEngine does not support the request. The recording is ongoing or the recording stops because an error occurs.7: A method is called before IRtcEngine is initialized.
|
|
39
|
-
*/
|
|
40
|
-
abstract startRecording(
|
|
41
|
-
connection: RtcConnection,
|
|
42
|
-
config: MediaRecorderConfiguration
|
|
43
|
-
): number;
|
|
23
|
+
abstract setMediaRecorderObserver(callback: IMediaRecorderObserver): number;
|
|
44
24
|
|
|
45
25
|
/**
|
|
46
|
-
*
|
|
47
|
-
* After calling startRecording , if you want to stop the recording, you must call this method; otherwise, the generated recording files may not be playable.
|
|
48
|
-
*
|
|
49
|
-
* @param connection The connection information. See RtcConnection .
|
|
50
|
-
*
|
|
51
|
-
* @returns
|
|
52
|
-
* 0: Success.< 0: Failure.-7: A method is called before IRtcEngine is initialized.
|
|
26
|
+
* @ignore
|
|
53
27
|
*/
|
|
54
|
-
abstract
|
|
28
|
+
abstract startRecording(config: MediaRecorderConfiguration): number;
|
|
55
29
|
|
|
56
30
|
/**
|
|
57
|
-
*
|
|
58
|
-
* This method releases the IMediaRecorder object and all resources used by the IRtcEngine object. After calling this method, if you need to start recording again, you need to call getMediaRecorder again to get the IMediaRecorder object.
|
|
31
|
+
* @ignore
|
|
59
32
|
*/
|
|
60
|
-
abstract
|
|
33
|
+
abstract stopRecording(): number;
|
|
61
34
|
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import './extension/IAgoraMediaStreamingSourceExtension';
|
|
2
|
+
/* enum_streamingsrcerr */
|
|
3
|
+
export enum StreamingSrcErr {
|
|
4
|
+
/* enum_streamingsrcerr_StreamingSrcErrNone */
|
|
5
|
+
StreamingSrcErrNone = 0,
|
|
6
|
+
/* enum_streamingsrcerr_StreamingSrcErrUnknown */
|
|
7
|
+
StreamingSrcErrUnknown = 1,
|
|
8
|
+
/* enum_streamingsrcerr_StreamingSrcErrInvalidParam */
|
|
9
|
+
StreamingSrcErrInvalidParam = 2,
|
|
10
|
+
/* enum_streamingsrcerr_StreamingSrcErrBadState */
|
|
11
|
+
StreamingSrcErrBadState = 3,
|
|
12
|
+
/* enum_streamingsrcerr_StreamingSrcErrNoMem */
|
|
13
|
+
StreamingSrcErrNoMem = 4,
|
|
14
|
+
/* enum_streamingsrcerr_StreamingSrcErrBufferOverflow */
|
|
15
|
+
StreamingSrcErrBufferOverflow = 5,
|
|
16
|
+
/* enum_streamingsrcerr_StreamingSrcErrBufferUnderflow */
|
|
17
|
+
StreamingSrcErrBufferUnderflow = 6,
|
|
18
|
+
/* enum_streamingsrcerr_StreamingSrcErrNotFound */
|
|
19
|
+
StreamingSrcErrNotFound = 7,
|
|
20
|
+
/* enum_streamingsrcerr_StreamingSrcErrTimeout */
|
|
21
|
+
StreamingSrcErrTimeout = 8,
|
|
22
|
+
/* enum_streamingsrcerr_StreamingSrcErrExpired */
|
|
23
|
+
StreamingSrcErrExpired = 9,
|
|
24
|
+
/* enum_streamingsrcerr_StreamingSrcErrUnsupported */
|
|
25
|
+
StreamingSrcErrUnsupported = 10,
|
|
26
|
+
/* enum_streamingsrcerr_StreamingSrcErrNotExist */
|
|
27
|
+
StreamingSrcErrNotExist = 11,
|
|
28
|
+
/* enum_streamingsrcerr_StreamingSrcErrExist */
|
|
29
|
+
StreamingSrcErrExist = 12,
|
|
30
|
+
/* enum_streamingsrcerr_StreamingSrcErrOpen */
|
|
31
|
+
StreamingSrcErrOpen = 13,
|
|
32
|
+
/* enum_streamingsrcerr_StreamingSrcErrClose */
|
|
33
|
+
StreamingSrcErrClose = 14,
|
|
34
|
+
/* enum_streamingsrcerr_StreamingSrcErrRead */
|
|
35
|
+
StreamingSrcErrRead = 15,
|
|
36
|
+
/* enum_streamingsrcerr_StreamingSrcErrWrite */
|
|
37
|
+
StreamingSrcErrWrite = 16,
|
|
38
|
+
/* enum_streamingsrcerr_StreamingSrcErrSeek */
|
|
39
|
+
StreamingSrcErrSeek = 17,
|
|
40
|
+
/* enum_streamingsrcerr_StreamingSrcErrEof */
|
|
41
|
+
StreamingSrcErrEof = 18,
|
|
42
|
+
/* enum_streamingsrcerr_StreamingSrcErrCodecopen */
|
|
43
|
+
StreamingSrcErrCodecopen = 19,
|
|
44
|
+
/* enum_streamingsrcerr_StreamingSrcErrCodecclose */
|
|
45
|
+
StreamingSrcErrCodecclose = 20,
|
|
46
|
+
/* enum_streamingsrcerr_StreamingSrcErrCodecproc */
|
|
47
|
+
StreamingSrcErrCodecproc = 21,
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* enum_streamingsrcstate */
|
|
51
|
+
export enum StreamingSrcState {
|
|
52
|
+
/* enum_streamingsrcstate_StreamingSrcStateClosed */
|
|
53
|
+
StreamingSrcStateClosed = 0,
|
|
54
|
+
/* enum_streamingsrcstate_StreamingSrcStateOpening */
|
|
55
|
+
StreamingSrcStateOpening = 1,
|
|
56
|
+
/* enum_streamingsrcstate_StreamingSrcStateIdle */
|
|
57
|
+
StreamingSrcStateIdle = 2,
|
|
58
|
+
/* enum_streamingsrcstate_StreamingSrcStatePlaying */
|
|
59
|
+
StreamingSrcStatePlaying = 3,
|
|
60
|
+
/* enum_streamingsrcstate_StreamingSrcStateSeeking */
|
|
61
|
+
StreamingSrcStateSeeking = 4,
|
|
62
|
+
/* enum_streamingsrcstate_StreamingSrcStateEof */
|
|
63
|
+
StreamingSrcStateEof = 5,
|
|
64
|
+
/* enum_streamingsrcstate_StreamingSrcStateError */
|
|
65
|
+
StreamingSrcStateError = 6,
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* class_inputseidata */
|
|
69
|
+
export class InputSeiData {
|
|
70
|
+
/* class_inputseidata_type */
|
|
71
|
+
type?: number;
|
|
72
|
+
/* class_inputseidata_timestamp */
|
|
73
|
+
timestamp?: number;
|
|
74
|
+
/* class_inputseidata_frame_index */
|
|
75
|
+
frame_index?: number;
|
|
76
|
+
/* class_inputseidata_private_data */
|
|
77
|
+
private_data?: Uint8Array;
|
|
78
|
+
/* class_inputseidata_data_size */
|
|
79
|
+
data_size?: number;
|
|
80
|
+
}
|