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,15 +1,19 @@
|
|
|
1
|
-
import { callIrisApi } from '../internal/IrisApiEngine';
|
|
2
|
-
import { IMediaEngine } from '../IAgoraMediaEngine';
|
|
3
1
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
AudioTrackConfig,
|
|
3
|
+
AudioTrackType,
|
|
4
|
+
EncodedVideoFrameInfo,
|
|
5
|
+
SenderOptions,
|
|
6
|
+
} from '../AgoraBase';
|
|
7
|
+
import {
|
|
8
8
|
AudioFrame,
|
|
9
|
-
ExternalVideoSourceType,
|
|
10
9
|
ExternalVideoFrame,
|
|
10
|
+
ExternalVideoSourceType,
|
|
11
|
+
IAudioFrameObserver,
|
|
12
|
+
IVideoEncodedFrameObserver,
|
|
13
|
+
IVideoFrameObserver,
|
|
11
14
|
} from '../AgoraMediaBase';
|
|
12
|
-
import {
|
|
15
|
+
import { IMediaEngine } from '../IAgoraMediaEngine';
|
|
16
|
+
|
|
13
17
|
// @ts-ignore
|
|
14
18
|
export class IMediaEngineImpl implements IMediaEngine {
|
|
15
19
|
registerAudioFrameObserver(observer: IAudioFrameObserver): number {
|
|
@@ -69,29 +73,15 @@ export class IMediaEngineImpl implements IMediaEngine {
|
|
|
69
73
|
return 'MediaEngine_registerVideoEncodedFrameObserver';
|
|
70
74
|
}
|
|
71
75
|
|
|
72
|
-
pushAudioFrame(
|
|
73
|
-
|
|
74
|
-
frame: AudioFrame,
|
|
75
|
-
wrap = false,
|
|
76
|
-
sourceId = 0
|
|
77
|
-
): number {
|
|
78
|
-
const apiType = this.getApiTypeFromPushAudioFrame(
|
|
79
|
-
type,
|
|
80
|
-
frame,
|
|
81
|
-
wrap,
|
|
82
|
-
sourceId
|
|
83
|
-
);
|
|
76
|
+
pushAudioFrame(frame: AudioFrame, trackId: number = 0): number {
|
|
77
|
+
const apiType = this.getApiTypeFromPushAudioFrame(frame, trackId);
|
|
84
78
|
const jsonParams = {
|
|
85
|
-
type: type,
|
|
86
79
|
frame: frame,
|
|
87
|
-
|
|
88
|
-
sourceId: sourceId,
|
|
80
|
+
trackId: trackId,
|
|
89
81
|
toJSON: () => {
|
|
90
82
|
return {
|
|
91
|
-
type: type,
|
|
92
83
|
frame: frame,
|
|
93
|
-
|
|
94
|
-
sourceId: sourceId,
|
|
84
|
+
trackId: trackId,
|
|
95
85
|
};
|
|
96
86
|
},
|
|
97
87
|
};
|
|
@@ -100,68 +90,12 @@ export class IMediaEngineImpl implements IMediaEngine {
|
|
|
100
90
|
}
|
|
101
91
|
|
|
102
92
|
protected getApiTypeFromPushAudioFrame(
|
|
103
|
-
type: MediaSourceType,
|
|
104
93
|
frame: AudioFrame,
|
|
105
|
-
|
|
106
|
-
sourceId = 0
|
|
94
|
+
trackId: number = 0
|
|
107
95
|
): string {
|
|
108
96
|
return 'MediaEngine_pushAudioFrame';
|
|
109
97
|
}
|
|
110
98
|
|
|
111
|
-
pushCaptureAudioFrame(frame: AudioFrame): number {
|
|
112
|
-
const apiType = this.getApiTypeFromPushCaptureAudioFrame(frame);
|
|
113
|
-
const jsonParams = {
|
|
114
|
-
frame: frame,
|
|
115
|
-
toJSON: () => {
|
|
116
|
-
return {
|
|
117
|
-
frame: frame,
|
|
118
|
-
};
|
|
119
|
-
},
|
|
120
|
-
};
|
|
121
|
-
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
122
|
-
return jsonResults.result;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
protected getApiTypeFromPushCaptureAudioFrame(frame: AudioFrame): string {
|
|
126
|
-
return 'MediaEngine_pushCaptureAudioFrame';
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
pushReverseAudioFrame(frame: AudioFrame): number {
|
|
130
|
-
const apiType = this.getApiTypeFromPushReverseAudioFrame(frame);
|
|
131
|
-
const jsonParams = {
|
|
132
|
-
frame: frame,
|
|
133
|
-
toJSON: () => {
|
|
134
|
-
return {
|
|
135
|
-
frame: frame,
|
|
136
|
-
};
|
|
137
|
-
},
|
|
138
|
-
};
|
|
139
|
-
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
140
|
-
return jsonResults.result;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
protected getApiTypeFromPushReverseAudioFrame(frame: AudioFrame): string {
|
|
144
|
-
return 'MediaEngine_pushReverseAudioFrame';
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
pushDirectAudioFrame(frame: AudioFrame): number {
|
|
148
|
-
const apiType = this.getApiTypeFromPushDirectAudioFrame(frame);
|
|
149
|
-
const jsonParams = {
|
|
150
|
-
frame: frame,
|
|
151
|
-
toJSON: () => {
|
|
152
|
-
return {
|
|
153
|
-
frame: frame,
|
|
154
|
-
};
|
|
155
|
-
},
|
|
156
|
-
};
|
|
157
|
-
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
158
|
-
return jsonResults.result;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
protected getApiTypeFromPushDirectAudioFrame(frame: AudioFrame): string {
|
|
162
|
-
return 'MediaEngine_pushDirectAudioFrame';
|
|
163
|
-
}
|
|
164
|
-
|
|
165
99
|
pullAudioFrame(): AudioFrame {
|
|
166
100
|
const apiType = this.getApiTypeFromPullAudioFrame();
|
|
167
101
|
const jsonParams = {};
|
|
@@ -217,15 +151,13 @@ export class IMediaEngineImpl implements IMediaEngine {
|
|
|
217
151
|
enabled: boolean,
|
|
218
152
|
sampleRate: number,
|
|
219
153
|
channels: number,
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
publish = true
|
|
154
|
+
localPlayback: boolean = false,
|
|
155
|
+
publish: boolean = true
|
|
223
156
|
): number {
|
|
224
157
|
const apiType = this.getApiTypeFromSetExternalAudioSource(
|
|
225
158
|
enabled,
|
|
226
159
|
sampleRate,
|
|
227
160
|
channels,
|
|
228
|
-
sourceNumber,
|
|
229
161
|
localPlayback,
|
|
230
162
|
publish
|
|
231
163
|
);
|
|
@@ -233,7 +165,6 @@ export class IMediaEngineImpl implements IMediaEngine {
|
|
|
233
165
|
enabled: enabled,
|
|
234
166
|
sampleRate: sampleRate,
|
|
235
167
|
channels: channels,
|
|
236
|
-
sourceNumber: sourceNumber,
|
|
237
168
|
localPlayback: localPlayback,
|
|
238
169
|
publish: publish,
|
|
239
170
|
toJSON: () => {
|
|
@@ -241,7 +172,6 @@ export class IMediaEngineImpl implements IMediaEngine {
|
|
|
241
172
|
enabled: enabled,
|
|
242
173
|
sampleRate: sampleRate,
|
|
243
174
|
channels: channels,
|
|
244
|
-
sourceNumber: sourceNumber,
|
|
245
175
|
localPlayback: localPlayback,
|
|
246
176
|
publish: publish,
|
|
247
177
|
};
|
|
@@ -255,13 +185,59 @@ export class IMediaEngineImpl implements IMediaEngine {
|
|
|
255
185
|
enabled: boolean,
|
|
256
186
|
sampleRate: number,
|
|
257
187
|
channels: number,
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
publish = true
|
|
188
|
+
localPlayback: boolean = false,
|
|
189
|
+
publish: boolean = true
|
|
261
190
|
): string {
|
|
262
191
|
return 'MediaEngine_setExternalAudioSource';
|
|
263
192
|
}
|
|
264
193
|
|
|
194
|
+
createCustomAudioTrack(
|
|
195
|
+
trackType: AudioTrackType,
|
|
196
|
+
config: AudioTrackConfig
|
|
197
|
+
): number {
|
|
198
|
+
const apiType = this.getApiTypeFromCreateCustomAudioTrack(
|
|
199
|
+
trackType,
|
|
200
|
+
config
|
|
201
|
+
);
|
|
202
|
+
const jsonParams = {
|
|
203
|
+
trackType: trackType,
|
|
204
|
+
config: config,
|
|
205
|
+
toJSON: () => {
|
|
206
|
+
return {
|
|
207
|
+
trackType: trackType,
|
|
208
|
+
config: config,
|
|
209
|
+
};
|
|
210
|
+
},
|
|
211
|
+
};
|
|
212
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
213
|
+
return jsonResults.result;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
protected getApiTypeFromCreateCustomAudioTrack(
|
|
217
|
+
trackType: AudioTrackType,
|
|
218
|
+
config: AudioTrackConfig
|
|
219
|
+
): string {
|
|
220
|
+
return 'MediaEngine_createCustomAudioTrack';
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
destroyCustomAudioTrack(trackId: number): number {
|
|
224
|
+
const apiType = this.getApiTypeFromDestroyCustomAudioTrack(trackId);
|
|
225
|
+
const jsonParams = {
|
|
226
|
+
trackId: trackId,
|
|
227
|
+
toJSON: () => {
|
|
228
|
+
return {
|
|
229
|
+
trackId: trackId,
|
|
230
|
+
};
|
|
231
|
+
},
|
|
232
|
+
};
|
|
233
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
234
|
+
return jsonResults.result;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
protected getApiTypeFromDestroyCustomAudioTrack(trackId: number): string {
|
|
238
|
+
return 'MediaEngine_destroyCustomAudioTrack';
|
|
239
|
+
}
|
|
240
|
+
|
|
265
241
|
setExternalAudioSink(
|
|
266
242
|
enabled: boolean,
|
|
267
243
|
sampleRate: number,
|
|
@@ -296,17 +272,17 @@ export class IMediaEngineImpl implements IMediaEngine {
|
|
|
296
272
|
return 'MediaEngine_setExternalAudioSink';
|
|
297
273
|
}
|
|
298
274
|
|
|
299
|
-
enableCustomAudioLocalPlayback(
|
|
275
|
+
enableCustomAudioLocalPlayback(trackId: number, enabled: boolean): number {
|
|
300
276
|
const apiType = this.getApiTypeFromEnableCustomAudioLocalPlayback(
|
|
301
|
-
|
|
277
|
+
trackId,
|
|
302
278
|
enabled
|
|
303
279
|
);
|
|
304
280
|
const jsonParams = {
|
|
305
|
-
|
|
281
|
+
trackId: trackId,
|
|
306
282
|
enabled: enabled,
|
|
307
283
|
toJSON: () => {
|
|
308
284
|
return {
|
|
309
|
-
|
|
285
|
+
trackId: trackId,
|
|
310
286
|
enabled: enabled,
|
|
311
287
|
};
|
|
312
288
|
},
|
|
@@ -316,39 +292,13 @@ export class IMediaEngineImpl implements IMediaEngine {
|
|
|
316
292
|
}
|
|
317
293
|
|
|
318
294
|
protected getApiTypeFromEnableCustomAudioLocalPlayback(
|
|
319
|
-
|
|
295
|
+
trackId: number,
|
|
320
296
|
enabled: boolean
|
|
321
297
|
): string {
|
|
322
298
|
return 'MediaEngine_enableCustomAudioLocalPlayback';
|
|
323
299
|
}
|
|
324
300
|
|
|
325
|
-
|
|
326
|
-
const apiType = this.getApiTypeFromSetDirectExternalAudioSource(
|
|
327
|
-
enable,
|
|
328
|
-
localPlayback
|
|
329
|
-
);
|
|
330
|
-
const jsonParams = {
|
|
331
|
-
enable: enable,
|
|
332
|
-
localPlayback: localPlayback,
|
|
333
|
-
toJSON: () => {
|
|
334
|
-
return {
|
|
335
|
-
enable: enable,
|
|
336
|
-
localPlayback: localPlayback,
|
|
337
|
-
};
|
|
338
|
-
},
|
|
339
|
-
};
|
|
340
|
-
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
341
|
-
return jsonResults.result;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
protected getApiTypeFromSetDirectExternalAudioSource(
|
|
345
|
-
enable: boolean,
|
|
346
|
-
localPlayback = false
|
|
347
|
-
): string {
|
|
348
|
-
return 'MediaEngine_setDirectExternalAudioSource';
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
pushVideoFrame(frame: ExternalVideoFrame, videoTrackId = 0): number {
|
|
301
|
+
pushVideoFrame(frame: ExternalVideoFrame, videoTrackId: number = 0): number {
|
|
352
302
|
const apiType = this.getApiTypeFromPushVideoFrame(frame, videoTrackId);
|
|
353
303
|
const jsonParams = {
|
|
354
304
|
frame: frame,
|
|
@@ -366,7 +316,7 @@ export class IMediaEngineImpl implements IMediaEngine {
|
|
|
366
316
|
|
|
367
317
|
protected getApiTypeFromPushVideoFrame(
|
|
368
318
|
frame: ExternalVideoFrame,
|
|
369
|
-
videoTrackId = 0
|
|
319
|
+
videoTrackId: number = 0
|
|
370
320
|
): string {
|
|
371
321
|
return 'MediaEngine_pushVideoFrame';
|
|
372
322
|
}
|
|
@@ -375,7 +325,7 @@ export class IMediaEngineImpl implements IMediaEngine {
|
|
|
375
325
|
imageBuffer: Uint8Array,
|
|
376
326
|
length: number,
|
|
377
327
|
videoEncodedFrameInfo: EncodedVideoFrameInfo,
|
|
378
|
-
videoTrackId = 0
|
|
328
|
+
videoTrackId: number = 0
|
|
379
329
|
): number {
|
|
380
330
|
const apiType = this.getApiTypeFromPushEncodedVideoImage(
|
|
381
331
|
imageBuffer,
|
|
@@ -404,7 +354,7 @@ export class IMediaEngineImpl implements IMediaEngine {
|
|
|
404
354
|
imageBuffer: Uint8Array,
|
|
405
355
|
length: number,
|
|
406
356
|
videoEncodedFrameInfo: EncodedVideoFrameInfo,
|
|
407
|
-
videoTrackId = 0
|
|
357
|
+
videoTrackId: number = 0
|
|
408
358
|
): string {
|
|
409
359
|
return 'MediaEngine_pushEncodedVideoImage';
|
|
410
360
|
}
|
|
@@ -476,3 +426,5 @@ export class IMediaEngineImpl implements IMediaEngine {
|
|
|
476
426
|
return 'MediaEngine_unregisterVideoEncodedFrameObserver';
|
|
477
427
|
}
|
|
478
428
|
}
|
|
429
|
+
|
|
430
|
+
import { callIrisApi } from '../internal/IrisApiEngine';
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SpatialAudioParams } from '../AgoraBase';
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
AudioDualMonoMode,
|
|
4
|
+
IAudioPcmFrameSink,
|
|
5
|
+
IAudioSpectrumObserver,
|
|
6
|
+
RawAudioFrameOpModeType,
|
|
7
|
+
RenderModeType,
|
|
8
|
+
} from '../AgoraMediaBase';
|
|
8
9
|
import {
|
|
10
|
+
MediaPlayerState,
|
|
9
11
|
MediaSource,
|
|
10
12
|
PlayerStreamInfo,
|
|
11
|
-
MediaPlayerState,
|
|
12
13
|
} from '../AgoraMediaPlayerTypes';
|
|
13
14
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} from '../
|
|
15
|
+
IMediaPlayer,
|
|
16
|
+
IMediaPlayerCacheManager,
|
|
17
|
+
IMediaPlayerVideoFrameObserver,
|
|
18
|
+
} from '../IAgoraMediaPlayer';
|
|
18
19
|
import { IMediaPlayerSourceObserver } from '../IAgoraMediaPlayerSource';
|
|
19
|
-
|
|
20
|
+
|
|
20
21
|
// @ts-ignore
|
|
21
22
|
export class IMediaPlayerImpl implements IMediaPlayer {
|
|
22
23
|
getMediaPlayerId(): number {
|
|
@@ -530,6 +531,90 @@ export class IMediaPlayerImpl implements IMediaPlayer {
|
|
|
530
531
|
return 'MediaPlayer_unregisterPlayerSourceObserver';
|
|
531
532
|
}
|
|
532
533
|
|
|
534
|
+
registerAudioFrameObserver(
|
|
535
|
+
observer: IAudioPcmFrameSink,
|
|
536
|
+
mode: RawAudioFrameOpModeType = RawAudioFrameOpModeType.RawAudioFrameOpModeReadOnly
|
|
537
|
+
): number {
|
|
538
|
+
const apiType = this.getApiTypeFromRegisterAudioFrameObserver(
|
|
539
|
+
observer,
|
|
540
|
+
mode
|
|
541
|
+
);
|
|
542
|
+
const jsonParams = {
|
|
543
|
+
observer: observer,
|
|
544
|
+
mode: mode,
|
|
545
|
+
toJSON: () => {
|
|
546
|
+
return {
|
|
547
|
+
mode: mode,
|
|
548
|
+
};
|
|
549
|
+
},
|
|
550
|
+
};
|
|
551
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
552
|
+
return jsonResults.result;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
protected getApiTypeFromRegisterAudioFrameObserver(
|
|
556
|
+
observer: IAudioPcmFrameSink,
|
|
557
|
+
mode: RawAudioFrameOpModeType = RawAudioFrameOpModeType.RawAudioFrameOpModeReadOnly
|
|
558
|
+
): string {
|
|
559
|
+
return 'MediaPlayer_registerAudioFrameObserver';
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
unregisterAudioFrameObserver(observer: IAudioPcmFrameSink): number {
|
|
563
|
+
const apiType = this.getApiTypeFromUnregisterAudioFrameObserver(observer);
|
|
564
|
+
const jsonParams = {
|
|
565
|
+
observer: observer,
|
|
566
|
+
toJSON: () => {
|
|
567
|
+
return {};
|
|
568
|
+
},
|
|
569
|
+
};
|
|
570
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
571
|
+
return jsonResults.result;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
protected getApiTypeFromUnregisterAudioFrameObserver(
|
|
575
|
+
observer: IAudioPcmFrameSink
|
|
576
|
+
): string {
|
|
577
|
+
return 'MediaPlayer_unregisterAudioFrameObserver';
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
registerVideoFrameObserver(observer: IMediaPlayerVideoFrameObserver): number {
|
|
581
|
+
const apiType = this.getApiTypeFromRegisterVideoFrameObserver(observer);
|
|
582
|
+
const jsonParams = {
|
|
583
|
+
observer: observer,
|
|
584
|
+
toJSON: () => {
|
|
585
|
+
return {};
|
|
586
|
+
},
|
|
587
|
+
};
|
|
588
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
589
|
+
return jsonResults.result;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
protected getApiTypeFromRegisterVideoFrameObserver(
|
|
593
|
+
observer: IMediaPlayerVideoFrameObserver
|
|
594
|
+
): string {
|
|
595
|
+
return 'MediaPlayer_registerVideoFrameObserver';
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
unregisterVideoFrameObserver(
|
|
599
|
+
observer: IMediaPlayerVideoFrameObserver
|
|
600
|
+
): number {
|
|
601
|
+
const apiType = this.getApiTypeFromUnregisterVideoFrameObserver(observer);
|
|
602
|
+
const jsonParams = {
|
|
603
|
+
observer: observer,
|
|
604
|
+
toJSON: () => {
|
|
605
|
+
return {};
|
|
606
|
+
},
|
|
607
|
+
};
|
|
608
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
609
|
+
return jsonResults.result;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
protected getApiTypeFromUnregisterVideoFrameObserver(
|
|
613
|
+
observer: IMediaPlayerVideoFrameObserver
|
|
614
|
+
): string {
|
|
615
|
+
return 'MediaPlayer_unregisterVideoFrameObserver';
|
|
616
|
+
}
|
|
617
|
+
|
|
533
618
|
registerMediaPlayerAudioSpectrumObserver(
|
|
534
619
|
observer: IAudioSpectrumObserver,
|
|
535
620
|
intervalInMS: number
|
|
@@ -725,7 +810,7 @@ export class IMediaPlayerImpl implements IMediaPlayer {
|
|
|
725
810
|
return 'MediaPlayer_renewAgoraCDNSrcToken';
|
|
726
811
|
}
|
|
727
812
|
|
|
728
|
-
switchAgoraCDNSrc(src: string, syncPts = false): number {
|
|
813
|
+
switchAgoraCDNSrc(src: string, syncPts: boolean = false): number {
|
|
729
814
|
const apiType = this.getApiTypeFromSwitchAgoraCDNSrc(src, syncPts);
|
|
730
815
|
const jsonParams = {
|
|
731
816
|
src: src,
|
|
@@ -743,12 +828,12 @@ export class IMediaPlayerImpl implements IMediaPlayer {
|
|
|
743
828
|
|
|
744
829
|
protected getApiTypeFromSwitchAgoraCDNSrc(
|
|
745
830
|
src: string,
|
|
746
|
-
syncPts = false
|
|
831
|
+
syncPts: boolean = false
|
|
747
832
|
): string {
|
|
748
833
|
return 'MediaPlayer_switchAgoraCDNSrc';
|
|
749
834
|
}
|
|
750
835
|
|
|
751
|
-
switchSrc(src: string, syncPts = true): number {
|
|
836
|
+
switchSrc(src: string, syncPts: boolean = true): number {
|
|
752
837
|
const apiType = this.getApiTypeFromSwitchSrc(src, syncPts);
|
|
753
838
|
const jsonParams = {
|
|
754
839
|
src: src,
|
|
@@ -764,7 +849,10 @@ export class IMediaPlayerImpl implements IMediaPlayer {
|
|
|
764
849
|
return jsonResults.result;
|
|
765
850
|
}
|
|
766
851
|
|
|
767
|
-
protected getApiTypeFromSwitchSrc(
|
|
852
|
+
protected getApiTypeFromSwitchSrc(
|
|
853
|
+
src: string,
|
|
854
|
+
syncPts: boolean = true
|
|
855
|
+
): string {
|
|
768
856
|
return 'MediaPlayer_switchSrc';
|
|
769
857
|
}
|
|
770
858
|
|
|
@@ -866,82 +954,6 @@ export class IMediaPlayerImpl implements IMediaPlayer {
|
|
|
866
954
|
): string {
|
|
867
955
|
return 'MediaPlayer_setSoundPositionParams';
|
|
868
956
|
}
|
|
869
|
-
|
|
870
|
-
registerAudioFrameObserver(observer: IMediaPlayerAudioFrameObserver): number {
|
|
871
|
-
const apiType = this.getApiTypeFromRegisterAudioFrameObserver(observer);
|
|
872
|
-
const jsonParams = {
|
|
873
|
-
observer: observer,
|
|
874
|
-
toJSON: () => {
|
|
875
|
-
return {};
|
|
876
|
-
},
|
|
877
|
-
};
|
|
878
|
-
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
879
|
-
return jsonResults.result;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
protected getApiTypeFromRegisterAudioFrameObserver(
|
|
883
|
-
observer: IMediaPlayerAudioFrameObserver
|
|
884
|
-
): string {
|
|
885
|
-
return 'MediaPlayer_registerAudioFrameObserver';
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
unregisterAudioFrameObserver(
|
|
889
|
-
observer: IMediaPlayerAudioFrameObserver
|
|
890
|
-
): number {
|
|
891
|
-
const apiType = this.getApiTypeFromUnregisterAudioFrameObserver(observer);
|
|
892
|
-
const jsonParams = {
|
|
893
|
-
observer: observer,
|
|
894
|
-
toJSON: () => {
|
|
895
|
-
return {};
|
|
896
|
-
},
|
|
897
|
-
};
|
|
898
|
-
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
899
|
-
return jsonResults.result;
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
protected getApiTypeFromUnregisterAudioFrameObserver(
|
|
903
|
-
observer: IMediaPlayerAudioFrameObserver
|
|
904
|
-
): string {
|
|
905
|
-
return 'MediaPlayer_unregisterAudioFrameObserver';
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
registerVideoFrameObserver(observer: IMediaPlayerVideoFrameObserver): number {
|
|
909
|
-
const apiType = this.getApiTypeFromRegisterVideoFrameObserver(observer);
|
|
910
|
-
const jsonParams = {
|
|
911
|
-
observer: observer,
|
|
912
|
-
toJSON: () => {
|
|
913
|
-
return {};
|
|
914
|
-
},
|
|
915
|
-
};
|
|
916
|
-
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
917
|
-
return jsonResults.result;
|
|
918
|
-
}
|
|
919
|
-
|
|
920
|
-
protected getApiTypeFromRegisterVideoFrameObserver(
|
|
921
|
-
observer: IMediaPlayerVideoFrameObserver
|
|
922
|
-
): string {
|
|
923
|
-
return 'MediaPlayer_registerVideoFrameObserver';
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
unregisterVideoFrameObserver(
|
|
927
|
-
observer: IMediaPlayerVideoFrameObserver
|
|
928
|
-
): number {
|
|
929
|
-
const apiType = this.getApiTypeFromUnregisterVideoFrameObserver(observer);
|
|
930
|
-
const jsonParams = {
|
|
931
|
-
observer: observer,
|
|
932
|
-
toJSON: () => {
|
|
933
|
-
return {};
|
|
934
|
-
},
|
|
935
|
-
};
|
|
936
|
-
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
937
|
-
return jsonResults.result;
|
|
938
|
-
}
|
|
939
|
-
|
|
940
|
-
protected getApiTypeFromUnregisterVideoFrameObserver(
|
|
941
|
-
observer: IMediaPlayerVideoFrameObserver
|
|
942
|
-
): string {
|
|
943
|
-
return 'MediaPlayer_unregisterVideoFrameObserver';
|
|
944
|
-
}
|
|
945
957
|
}
|
|
946
958
|
|
|
947
959
|
// @ts-ignore
|
|
@@ -1111,20 +1123,6 @@ export class IMediaPlayerCacheManagerImpl implements IMediaPlayerCacheManager {
|
|
|
1111
1123
|
}
|
|
1112
1124
|
}
|
|
1113
1125
|
|
|
1114
|
-
export function processIMediaPlayerAudioFrameObserver(
|
|
1115
|
-
handler: IMediaPlayerAudioFrameObserver,
|
|
1116
|
-
event: string,
|
|
1117
|
-
jsonParams: any
|
|
1118
|
-
) {
|
|
1119
|
-
switch (event) {
|
|
1120
|
-
case 'onFrame':
|
|
1121
|
-
if (handler.onFrame !== undefined) {
|
|
1122
|
-
handler.onFrame(jsonParams.frame);
|
|
1123
|
-
}
|
|
1124
|
-
break;
|
|
1125
|
-
}
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
1126
|
export function processIMediaPlayerVideoFrameObserver(
|
|
1129
1127
|
handler: IMediaPlayerVideoFrameObserver,
|
|
1130
1128
|
event: string,
|
|
@@ -1138,3 +1136,5 @@ export function processIMediaPlayerVideoFrameObserver(
|
|
|
1138
1136
|
break;
|
|
1139
1137
|
}
|
|
1140
1138
|
}
|
|
1139
|
+
|
|
1140
|
+
import { callIrisApi } from '../internal/IrisApiEngine';
|
|
@@ -1,27 +1,17 @@
|
|
|
1
|
-
import { callIrisApi } from '../internal/IrisApiEngine';
|
|
2
|
-
import { IMediaRecorder } from '../IAgoraMediaRecorder';
|
|
3
|
-
import { RtcConnection } from '../IAgoraRtcEngineEx';
|
|
4
1
|
import {
|
|
5
2
|
IMediaRecorderObserver,
|
|
6
3
|
MediaRecorderConfiguration,
|
|
7
4
|
} from '../AgoraMediaBase';
|
|
5
|
+
import { IMediaRecorder } from '../IAgoraMediaRecorder';
|
|
6
|
+
|
|
8
7
|
// @ts-ignore
|
|
9
8
|
export class IMediaRecorderImpl implements IMediaRecorder {
|
|
10
|
-
setMediaRecorderObserver(
|
|
11
|
-
|
|
12
|
-
callback: IMediaRecorderObserver
|
|
13
|
-
): number {
|
|
14
|
-
const apiType = this.getApiTypeFromSetMediaRecorderObserver(
|
|
15
|
-
connection,
|
|
16
|
-
callback
|
|
17
|
-
);
|
|
9
|
+
setMediaRecorderObserver(callback: IMediaRecorderObserver): number {
|
|
10
|
+
const apiType = this.getApiTypeFromSetMediaRecorderObserver(callback);
|
|
18
11
|
const jsonParams = {
|
|
19
|
-
connection: connection,
|
|
20
12
|
callback: callback,
|
|
21
13
|
toJSON: () => {
|
|
22
|
-
return {
|
|
23
|
-
connection: connection,
|
|
24
|
-
};
|
|
14
|
+
return {};
|
|
25
15
|
},
|
|
26
16
|
};
|
|
27
17
|
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
@@ -29,23 +19,17 @@ export class IMediaRecorderImpl implements IMediaRecorder {
|
|
|
29
19
|
}
|
|
30
20
|
|
|
31
21
|
protected getApiTypeFromSetMediaRecorderObserver(
|
|
32
|
-
connection: RtcConnection,
|
|
33
22
|
callback: IMediaRecorderObserver
|
|
34
23
|
): string {
|
|
35
24
|
return 'MediaRecorder_setMediaRecorderObserver';
|
|
36
25
|
}
|
|
37
26
|
|
|
38
|
-
startRecording(
|
|
39
|
-
|
|
40
|
-
config: MediaRecorderConfiguration
|
|
41
|
-
): number {
|
|
42
|
-
const apiType = this.getApiTypeFromStartRecording(connection, config);
|
|
27
|
+
startRecording(config: MediaRecorderConfiguration): number {
|
|
28
|
+
const apiType = this.getApiTypeFromStartRecording(config);
|
|
43
29
|
const jsonParams = {
|
|
44
|
-
connection: connection,
|
|
45
30
|
config: config,
|
|
46
31
|
toJSON: () => {
|
|
47
32
|
return {
|
|
48
|
-
connection: connection,
|
|
49
33
|
config: config,
|
|
50
34
|
};
|
|
51
35
|
},
|
|
@@ -55,37 +39,21 @@ export class IMediaRecorderImpl implements IMediaRecorder {
|
|
|
55
39
|
}
|
|
56
40
|
|
|
57
41
|
protected getApiTypeFromStartRecording(
|
|
58
|
-
connection: RtcConnection,
|
|
59
42
|
config: MediaRecorderConfiguration
|
|
60
43
|
): string {
|
|
61
44
|
return 'MediaRecorder_startRecording';
|
|
62
45
|
}
|
|
63
46
|
|
|
64
|
-
stopRecording(
|
|
65
|
-
const apiType = this.getApiTypeFromStopRecording(
|
|
66
|
-
const jsonParams = {
|
|
67
|
-
connection: connection,
|
|
68
|
-
toJSON: () => {
|
|
69
|
-
return {
|
|
70
|
-
connection: connection,
|
|
71
|
-
};
|
|
72
|
-
},
|
|
73
|
-
};
|
|
47
|
+
stopRecording(): number {
|
|
48
|
+
const apiType = this.getApiTypeFromStopRecording();
|
|
49
|
+
const jsonParams = {};
|
|
74
50
|
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
75
51
|
return jsonResults.result;
|
|
76
52
|
}
|
|
77
53
|
|
|
78
|
-
protected getApiTypeFromStopRecording(
|
|
54
|
+
protected getApiTypeFromStopRecording(): string {
|
|
79
55
|
return 'MediaRecorder_stopRecording';
|
|
80
56
|
}
|
|
81
|
-
|
|
82
|
-
release(): void {
|
|
83
|
-
const apiType = this.getApiTypeFromRelease();
|
|
84
|
-
const jsonParams = {};
|
|
85
|
-
callIrisApi.call(this, apiType, jsonParams);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
protected getApiTypeFromRelease(): string {
|
|
89
|
-
return 'MediaRecorder_release';
|
|
90
|
-
}
|
|
91
57
|
}
|
|
58
|
+
|
|
59
|
+
import { callIrisApi } from '../internal/IrisApiEngine';
|