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,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { RenderModeType } from '../Private/AgoraMediaBase';
|
|
1
|
+
import { ErrorCodeType } from '../Private/AgoraBase';
|
|
2
|
+
import { RenderModeType, VideoSourceType } from '../Private/AgoraMediaBase';
|
|
3
3
|
import {
|
|
4
4
|
AgoraElectronBridge,
|
|
5
5
|
Channel,
|
|
6
6
|
ChannelIdMap,
|
|
7
7
|
FormatRendererVideoConfig,
|
|
8
|
+
RENDER_MODE,
|
|
8
9
|
RenderConfig,
|
|
9
|
-
RendererVideoConfig,
|
|
10
10
|
RenderMap,
|
|
11
|
-
|
|
11
|
+
RendererVideoConfig,
|
|
12
12
|
ShareVideoFrame,
|
|
13
13
|
UidMap,
|
|
14
14
|
VideoFrameCacheConfig,
|
|
@@ -22,14 +22,16 @@ import {
|
|
|
22
22
|
logInfo,
|
|
23
23
|
logWarn,
|
|
24
24
|
} from '../Utils';
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
import { IRenderer, RenderFailCallback } from './IRenderer';
|
|
27
|
+
import { IRendererManager } from './IRendererManager';
|
|
28
|
+
import WebGLRenderer from './WebGLRenderer';
|
|
27
29
|
import { YUVCanvasRenderer } from './YUVCanvasRenderer';
|
|
28
30
|
|
|
29
31
|
/**
|
|
30
32
|
* @ignore
|
|
31
33
|
*/
|
|
32
|
-
class RendererManager {
|
|
34
|
+
export class RendererManager extends IRendererManager {
|
|
33
35
|
/**
|
|
34
36
|
* @ignore
|
|
35
37
|
*/
|
|
@@ -51,26 +53,37 @@ class RendererManager {
|
|
|
51
53
|
* @ignore
|
|
52
54
|
*/
|
|
53
55
|
msgBridge: AgoraElectronBridge;
|
|
54
|
-
|
|
55
56
|
/**
|
|
56
57
|
* @ignore
|
|
57
58
|
*/
|
|
59
|
+
defaultRenderConfig: RendererVideoConfig;
|
|
60
|
+
|
|
58
61
|
constructor() {
|
|
62
|
+
super();
|
|
59
63
|
this.renderFps = 10;
|
|
60
64
|
this.renderers = new Map();
|
|
61
65
|
this.renderMode = this.checkWebglEnv()
|
|
62
66
|
? RENDER_MODE.WEBGL
|
|
63
67
|
: RENDER_MODE.SOFTWARE;
|
|
64
|
-
|
|
65
68
|
this.msgBridge = AgoraEnv.AgoraElectronBridge;
|
|
69
|
+
this.defaultRenderConfig = {
|
|
70
|
+
rendererOptions: {
|
|
71
|
+
contentMode: RenderModeType.RenderModeFit,
|
|
72
|
+
mirror: false,
|
|
73
|
+
},
|
|
74
|
+
};
|
|
66
75
|
}
|
|
67
76
|
|
|
68
77
|
/**
|
|
69
|
-
*
|
|
78
|
+
* Sets the channel mode of the current audio file.
|
|
79
|
+
* In a stereo music file, the left and right channels can store different audio data. According to your needs, you can set the channel mode to original mode, left channel mode, right channel mode, or mixed channel mode. For example, in the KTV scenario, the left channel of the music file stores the musical accompaniment, and the right channel stores the singing voice. If you only need to listen to the accompaniment, call this method to set the channel mode of the music file to left channel mode; if you need to listen to the accompaniment and the singing voice at the same time, call this method to set the channel mode to mixed channel mode.Call this method after calling open .This method only applies to stereo audio files.
|
|
80
|
+
*
|
|
81
|
+
* @param mode The channel mode. See AudioDualMonoMode .
|
|
70
82
|
*
|
|
71
|
-
* @
|
|
83
|
+
* @returns
|
|
84
|
+
* 0: Success.< 0: Failure.
|
|
72
85
|
*/
|
|
73
|
-
setRenderMode(mode: RENDER_MODE) {
|
|
86
|
+
public setRenderMode(mode: RENDER_MODE) {
|
|
74
87
|
this.renderMode = mode;
|
|
75
88
|
logInfo(
|
|
76
89
|
'setRenderMode: new render mode will take effect only if new view bind to render'
|
|
@@ -80,20 +93,20 @@ class RendererManager {
|
|
|
80
93
|
/**
|
|
81
94
|
* @ignore
|
|
82
95
|
*/
|
|
83
|
-
setFPS(fps: number) {
|
|
96
|
+
public setFPS(fps: number) {
|
|
84
97
|
this.renderFps = fps;
|
|
85
98
|
this.restartRender();
|
|
86
99
|
}
|
|
87
100
|
|
|
101
|
+
/**
|
|
102
|
+
* @ignore
|
|
103
|
+
*/
|
|
88
104
|
public setRenderOption(
|
|
89
105
|
view: HTMLElement,
|
|
90
106
|
contentMode = RenderModeType.RenderModeFit,
|
|
91
107
|
mirror: boolean = false
|
|
92
108
|
): void {
|
|
93
109
|
if (!view) {
|
|
94
|
-
/**
|
|
95
|
-
* @ignore
|
|
96
|
-
*/
|
|
97
110
|
logError('setRenderOption: view not exist', view);
|
|
98
111
|
}
|
|
99
112
|
this.forEachStream(({ renders }) => {
|
|
@@ -105,6 +118,9 @@ class RendererManager {
|
|
|
105
118
|
});
|
|
106
119
|
}
|
|
107
120
|
|
|
121
|
+
/**
|
|
122
|
+
* @ignore
|
|
123
|
+
*/
|
|
108
124
|
public setRenderOptionByConfig(rendererConfig: RendererVideoConfig): number {
|
|
109
125
|
const {
|
|
110
126
|
uid,
|
|
@@ -112,52 +128,47 @@ class RendererManager {
|
|
|
112
128
|
rendererOptions,
|
|
113
129
|
videoSourceType,
|
|
114
130
|
}: FormatRendererVideoConfig =
|
|
115
|
-
/**
|
|
116
|
-
* @ignore
|
|
117
|
-
*/
|
|
118
131
|
getDefaultRendererVideoConfig(rendererConfig);
|
|
119
132
|
|
|
120
|
-
if (!rendererConfig.view) {
|
|
121
|
-
logError('setRenderOptionByView: view not exist');
|
|
122
|
-
return -1;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
133
|
const renderList = this.getRenderers({ uid, channelId, videoSourceType });
|
|
126
134
|
renderList
|
|
127
135
|
? renderList
|
|
128
|
-
.filter((renderItem) =>
|
|
129
|
-
|
|
130
|
-
|
|
136
|
+
.filter((renderItem) => {
|
|
137
|
+
if (rendererConfig.view) {
|
|
138
|
+
return renderItem.equalsElement(rendererConfig.view);
|
|
139
|
+
} else {
|
|
140
|
+
return true;
|
|
141
|
+
}
|
|
142
|
+
})
|
|
131
143
|
.forEach((renderItem) => renderItem.setRenderOption(rendererOptions))
|
|
132
144
|
: logWarn(
|
|
133
145
|
`RenderStreamType: ${videoSourceType} channelId:${channelId} uid:${uid} have no render view, you need to call this api after setView`
|
|
134
146
|
);
|
|
135
|
-
return
|
|
147
|
+
return ErrorCodeType.ErrOk;
|
|
136
148
|
}
|
|
137
149
|
|
|
150
|
+
/**
|
|
151
|
+
* @ignore
|
|
152
|
+
*/
|
|
138
153
|
public checkWebglEnv(): boolean {
|
|
139
154
|
let gl;
|
|
140
|
-
|
|
155
|
+
let canvas: HTMLCanvasElement = document.createElement('canvas');
|
|
141
156
|
|
|
142
157
|
try {
|
|
143
158
|
gl =
|
|
144
159
|
canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
|
|
145
|
-
/**
|
|
146
|
-
* @ignore
|
|
147
|
-
*/
|
|
148
160
|
logInfo('Your browser support webGL');
|
|
149
161
|
} catch (e) {
|
|
150
162
|
logWarn('Your browser may not support webGL');
|
|
151
163
|
return false;
|
|
152
164
|
}
|
|
153
165
|
|
|
154
|
-
|
|
155
|
-
return true;
|
|
156
|
-
} else {
|
|
157
|
-
return false;
|
|
158
|
-
}
|
|
166
|
+
return !!gl;
|
|
159
167
|
}
|
|
160
168
|
|
|
169
|
+
/**
|
|
170
|
+
* @ignore
|
|
171
|
+
*/
|
|
161
172
|
public setupVideo(rendererVideoConfig: RendererVideoConfig): number {
|
|
162
173
|
const formatConfig = getDefaultRendererVideoConfig(rendererVideoConfig);
|
|
163
174
|
|
|
@@ -166,19 +177,15 @@ class RendererManager {
|
|
|
166
177
|
|
|
167
178
|
if (!formatConfig.view) {
|
|
168
179
|
logWarn('setupVideo->destroyRenderersByConfig, because of view is null');
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
channelId,
|
|
172
|
-
uid
|
|
173
|
-
);
|
|
174
|
-
return -1;
|
|
180
|
+
this.destroyRenderersByConfig(videoSourceType, channelId, uid);
|
|
181
|
+
return -ErrorCodeType.ErrInvalidArgument;
|
|
175
182
|
}
|
|
176
183
|
|
|
177
184
|
// ensure a render to RenderMap
|
|
178
185
|
const render = this.bindHTMLElementToRender(formatConfig, view!);
|
|
179
186
|
|
|
180
187
|
// render config
|
|
181
|
-
render
|
|
188
|
+
render?.setRenderOption(rendererOptions);
|
|
182
189
|
|
|
183
190
|
// enable iris videoFrame
|
|
184
191
|
this.enableVideoFrameCache({
|
|
@@ -189,32 +196,40 @@ class RendererManager {
|
|
|
189
196
|
|
|
190
197
|
// enable render
|
|
191
198
|
this.enableRender(true);
|
|
192
|
-
return
|
|
199
|
+
return ErrorCodeType.ErrOk;
|
|
193
200
|
}
|
|
194
201
|
|
|
202
|
+
/**
|
|
203
|
+
* @ignore
|
|
204
|
+
*/
|
|
195
205
|
public setupLocalVideo(rendererConfig: RendererVideoConfig): number {
|
|
196
206
|
const { videoSourceType } = rendererConfig;
|
|
197
207
|
if (videoSourceType === VideoSourceType.VideoSourceRemote) {
|
|
198
208
|
logError('setupLocalVideo videoSourceType error', videoSourceType);
|
|
199
|
-
return -
|
|
209
|
+
return -ErrorCodeType.ErrInvalidArgument;
|
|
200
210
|
}
|
|
201
211
|
this.setupVideo({ ...rendererConfig });
|
|
202
|
-
return
|
|
212
|
+
return ErrorCodeType.ErrOk;
|
|
203
213
|
}
|
|
204
214
|
|
|
215
|
+
/**
|
|
216
|
+
* @ignore
|
|
217
|
+
*/
|
|
205
218
|
public setupRemoteVideo(rendererConfig: RendererVideoConfig): number {
|
|
206
219
|
const { videoSourceType } = rendererConfig;
|
|
207
220
|
if (videoSourceType !== VideoSourceType.VideoSourceRemote) {
|
|
208
221
|
logError('setupRemoteVideo videoSourceType error', videoSourceType);
|
|
209
|
-
return -
|
|
222
|
+
return -ErrorCodeType.ErrInvalidArgument;
|
|
210
223
|
}
|
|
211
|
-
this.setupVideo({
|
|
212
|
-
|
|
213
|
-
videoSourceType: VideoSourceType.VideoSourceRemote,
|
|
214
|
-
});
|
|
215
|
-
return 0;
|
|
224
|
+
this.setupVideo({ ...rendererConfig });
|
|
225
|
+
return ErrorCodeType.ErrOk;
|
|
216
226
|
}
|
|
217
227
|
|
|
228
|
+
/**
|
|
229
|
+
* Destroys a video renderer object.
|
|
230
|
+
*
|
|
231
|
+
* @param view The HTMLElement object to be destroyed.
|
|
232
|
+
*/
|
|
218
233
|
public destroyRendererByView(view: Element): void {
|
|
219
234
|
const renders = this.renderers;
|
|
220
235
|
renders.forEach((channelMap, videoSourceType) => {
|
|
@@ -243,6 +258,9 @@ class RendererManager {
|
|
|
243
258
|
});
|
|
244
259
|
}
|
|
245
260
|
|
|
261
|
+
/**
|
|
262
|
+
* @ignore
|
|
263
|
+
*/
|
|
246
264
|
public destroyRenderersByConfig(
|
|
247
265
|
videoSourceType: VideoSourceType,
|
|
248
266
|
channelId?: Channel,
|
|
@@ -269,6 +287,9 @@ class RendererManager {
|
|
|
269
287
|
renderMap.renders = [];
|
|
270
288
|
}
|
|
271
289
|
|
|
290
|
+
/**
|
|
291
|
+
* @ignore
|
|
292
|
+
*/
|
|
272
293
|
public removeAllRenderer(): void {
|
|
273
294
|
const renderMap = this.forEachStream(
|
|
274
295
|
(renderConfig, videoFrameCacheConfig) => {
|
|
@@ -282,11 +303,23 @@ class RendererManager {
|
|
|
282
303
|
renderMap.clear();
|
|
283
304
|
}
|
|
284
305
|
|
|
285
|
-
|
|
306
|
+
/**
|
|
307
|
+
* @ignore
|
|
308
|
+
*/
|
|
309
|
+
public clear(): void {
|
|
286
310
|
this.stopRender();
|
|
287
311
|
this.removeAllRenderer();
|
|
288
312
|
}
|
|
289
313
|
|
|
314
|
+
/**
|
|
315
|
+
* Enables/Disables the local video capture.
|
|
316
|
+
* This method disables or re-enables the local video capture, and does not affect receiving the remote video stream.After calling enableVideo , the local video capture is enabled by default. You can call enableLocalVideo (false) to disable the local video capture. If you want to re-enable the local video capture, call enableLocalVideo(true).After the local video capturer is successfully disabled or re-enabled, the SDK triggers the onRemoteVideoStateChanged callback on the remote client.You can call this method either before or after joining a channel.This method enables the internal engine and is valid after leaving the channel.
|
|
317
|
+
*
|
|
318
|
+
* @param enabled Whether to enable the local video capture.true: (Default) Enable the local video capture.false: Disable the local video capture. Once the local video is disabled, the remote users cannot receive the video stream of the local user, while the local user can still receive the video streams of remote users. When set to false, this method does not require a local camera.
|
|
319
|
+
*
|
|
320
|
+
* @returns
|
|
321
|
+
* 0: Success.< 0: Failure.
|
|
322
|
+
*/
|
|
290
323
|
public enableRender(enabled = true): void {
|
|
291
324
|
if (enabled && this.isRendering) {
|
|
292
325
|
//is already _isRendering
|
|
@@ -297,6 +330,9 @@ class RendererManager {
|
|
|
297
330
|
}
|
|
298
331
|
}
|
|
299
332
|
|
|
333
|
+
/**
|
|
334
|
+
* @ignore
|
|
335
|
+
*/
|
|
300
336
|
public startRenderer(): void {
|
|
301
337
|
this.isRendering = true;
|
|
302
338
|
const renderFunc = (
|
|
@@ -313,33 +349,31 @@ class RendererManager {
|
|
|
313
349
|
|
|
314
350
|
switch (finalResult.ret) {
|
|
315
351
|
case 0:
|
|
316
|
-
//
|
|
352
|
+
// GET_VIDEO_FRAME_CACHE_RETURN_TYPE::OK = 0,
|
|
317
353
|
// everything is ok
|
|
318
354
|
break;
|
|
319
|
-
case 1:
|
|
320
|
-
//
|
|
321
|
-
|
|
322
|
-
case 2: {
|
|
323
|
-
// IRIS_VIDEO_PROCESS_ERR::ERR_SIZE_NOT_MATCHING
|
|
324
|
-
const { width, height } = finalResult;
|
|
355
|
+
case 1: {
|
|
356
|
+
// GET_VIDEO_FRAME_CACHE_RETURN_TYPE::RESIZED
|
|
357
|
+
const { width, height, yStride } = finalResult;
|
|
325
358
|
const newShareVideoFrame = this.resizeShareVideoFrame(
|
|
326
359
|
videoSourceType,
|
|
327
360
|
channelId,
|
|
328
361
|
uid,
|
|
329
362
|
width,
|
|
330
|
-
height
|
|
363
|
+
height,
|
|
364
|
+
yStride
|
|
331
365
|
);
|
|
332
366
|
rendererItem.shareVideoFrame = newShareVideoFrame;
|
|
333
367
|
finalResult = this.msgBridge.GetVideoFrame(newShareVideoFrame);
|
|
334
368
|
break;
|
|
335
369
|
}
|
|
336
|
-
case
|
|
337
|
-
//
|
|
370
|
+
case 2:
|
|
371
|
+
// GET_VIDEO_FRAME_CACHE_RETURN_TYPE::NO_CACHE
|
|
338
372
|
// setupVideo/AgoraView render before initialize
|
|
339
|
-
this.enableVideoFrameCache({ videoSourceType, channelId, uid });
|
|
340
|
-
|
|
373
|
+
// this.enableVideoFrameCache({ videoSourceType, channelId, uid });
|
|
374
|
+
break;
|
|
341
375
|
default:
|
|
342
|
-
|
|
376
|
+
break;
|
|
343
377
|
}
|
|
344
378
|
if (finalResult.ret !== 0) {
|
|
345
379
|
logWarn('GetVideoFrame ret is', finalResult.ret, rendererItem);
|
|
@@ -361,6 +395,9 @@ class RendererManager {
|
|
|
361
395
|
}, 1000 / this.renderFps);
|
|
362
396
|
}
|
|
363
397
|
|
|
398
|
+
/**
|
|
399
|
+
* @ignore
|
|
400
|
+
*/
|
|
364
401
|
public stopRender(): void {
|
|
365
402
|
this.isRendering = false;
|
|
366
403
|
if (this.videoFrameUpdateInterval) {
|
|
@@ -369,6 +406,9 @@ class RendererManager {
|
|
|
369
406
|
}
|
|
370
407
|
}
|
|
371
408
|
|
|
409
|
+
/**
|
|
410
|
+
* @ignore
|
|
411
|
+
*/
|
|
372
412
|
public restartRender(): void {
|
|
373
413
|
if (this.videoFrameUpdateInterval) {
|
|
374
414
|
this.stopRender();
|
|
@@ -377,14 +417,20 @@ class RendererManager {
|
|
|
377
417
|
}
|
|
378
418
|
}
|
|
379
419
|
|
|
420
|
+
/**
|
|
421
|
+
* @ignore
|
|
422
|
+
*/
|
|
380
423
|
private createRenderer(failCallback?: RenderFailCallback): IRenderer {
|
|
381
424
|
if (this.renderMode === RENDER_MODE.SOFTWARE) {
|
|
382
425
|
return new YUVCanvasRenderer();
|
|
383
426
|
} else {
|
|
384
|
-
return new
|
|
427
|
+
return new WebGLRenderer(failCallback);
|
|
385
428
|
}
|
|
386
429
|
}
|
|
387
430
|
|
|
431
|
+
/**
|
|
432
|
+
* @ignore
|
|
433
|
+
*/
|
|
388
434
|
private getRender({
|
|
389
435
|
videoSourceType,
|
|
390
436
|
channelId,
|
|
@@ -393,6 +439,9 @@ class RendererManager {
|
|
|
393
439
|
return this.renderers.get(videoSourceType)?.get(channelId)?.get(uid);
|
|
394
440
|
}
|
|
395
441
|
|
|
442
|
+
/**
|
|
443
|
+
* @ignore
|
|
444
|
+
*/
|
|
396
445
|
private getRenderers({
|
|
397
446
|
videoSourceType,
|
|
398
447
|
channelId,
|
|
@@ -404,10 +453,13 @@ class RendererManager {
|
|
|
404
453
|
);
|
|
405
454
|
}
|
|
406
455
|
|
|
456
|
+
/**
|
|
457
|
+
* @ignore
|
|
458
|
+
*/
|
|
407
459
|
private bindHTMLElementToRender(
|
|
408
460
|
config: FormatRendererVideoConfig,
|
|
409
461
|
view: HTMLElement
|
|
410
|
-
): IRenderer {
|
|
462
|
+
): IRenderer | undefined {
|
|
411
463
|
this.ensureRendererConfig(config);
|
|
412
464
|
const renders = this.getRenderers(config);
|
|
413
465
|
const filterRenders =
|
|
@@ -439,6 +491,9 @@ class RendererManager {
|
|
|
439
491
|
return renderer;
|
|
440
492
|
}
|
|
441
493
|
|
|
494
|
+
/**
|
|
495
|
+
* @ignore
|
|
496
|
+
*/
|
|
442
497
|
private forEachStream(
|
|
443
498
|
callbackfn: (
|
|
444
499
|
renderConfig: RenderConfig,
|
|
@@ -464,6 +519,9 @@ class RendererManager {
|
|
|
464
519
|
return renders;
|
|
465
520
|
}
|
|
466
521
|
|
|
522
|
+
/**
|
|
523
|
+
* @ignore
|
|
524
|
+
*/
|
|
467
525
|
private enableVideoFrameCache(
|
|
468
526
|
videoFrameCacheConfig: VideoFrameCacheConfig
|
|
469
527
|
): void {
|
|
@@ -471,6 +529,9 @@ class RendererManager {
|
|
|
471
529
|
this.msgBridge.EnableVideoFrameCache(videoFrameCacheConfig);
|
|
472
530
|
}
|
|
473
531
|
|
|
532
|
+
/**
|
|
533
|
+
* @ignore
|
|
534
|
+
*/
|
|
474
535
|
private disableVideoFrameCache(
|
|
475
536
|
videoFrameCacheConfig: VideoFrameCacheConfig
|
|
476
537
|
): void {
|
|
@@ -478,6 +539,9 @@ class RendererManager {
|
|
|
478
539
|
this.msgBridge.DisableVideoFrameCache(videoFrameCacheConfig);
|
|
479
540
|
}
|
|
480
541
|
|
|
542
|
+
/**
|
|
543
|
+
* @ignore
|
|
544
|
+
*/
|
|
481
545
|
private ensureRendererConfig(config: VideoFrameCacheConfig):
|
|
482
546
|
| Map<
|
|
483
547
|
number,
|
|
@@ -521,33 +585,40 @@ class RendererManager {
|
|
|
521
585
|
return channelMap;
|
|
522
586
|
}
|
|
523
587
|
|
|
588
|
+
/**
|
|
589
|
+
* @ignore
|
|
590
|
+
*/
|
|
524
591
|
private resizeShareVideoFrame(
|
|
525
592
|
videoSourceType: VideoSourceType,
|
|
526
593
|
channelId: string,
|
|
527
594
|
uid: number,
|
|
528
595
|
width = 0,
|
|
529
|
-
height = 0
|
|
596
|
+
height = 0,
|
|
597
|
+
yStride = 0
|
|
530
598
|
): ShareVideoFrame {
|
|
531
599
|
return {
|
|
532
600
|
videoSourceType,
|
|
533
601
|
channelId,
|
|
534
602
|
uid,
|
|
535
|
-
yBuffer: Buffer.alloc(
|
|
536
|
-
uBuffer: Buffer.alloc((
|
|
537
|
-
vBuffer: Buffer.alloc((
|
|
603
|
+
yBuffer: Buffer.alloc(yStride * height),
|
|
604
|
+
uBuffer: Buffer.alloc((yStride * height) / 4),
|
|
605
|
+
vBuffer: Buffer.alloc((yStride * height) / 4),
|
|
538
606
|
width,
|
|
539
607
|
height,
|
|
608
|
+
yStride,
|
|
540
609
|
};
|
|
541
610
|
}
|
|
542
611
|
|
|
543
|
-
|
|
612
|
+
/**
|
|
613
|
+
* @ignore
|
|
614
|
+
*/
|
|
615
|
+
public updateVideoFrameCacheInMap(
|
|
544
616
|
config: VideoFrameCacheConfig,
|
|
545
617
|
shareVideoFrame: ShareVideoFrame
|
|
546
618
|
): void {
|
|
547
619
|
let rendererConfigMap = this.ensureRendererConfig(config);
|
|
548
620
|
rendererConfigMap
|
|
549
|
-
?
|
|
550
|
-
Object.assign(rendererConfigMap.get(config.uid), {
|
|
621
|
+
? Object.assign(rendererConfigMap.get(config.uid) ?? {}, {
|
|
551
622
|
shareVideoFrame,
|
|
552
623
|
})
|
|
553
624
|
: logWarn(
|
|
@@ -555,10 +626,3 @@ class RendererManager {
|
|
|
555
626
|
);
|
|
556
627
|
}
|
|
557
628
|
}
|
|
558
|
-
|
|
559
|
-
const AgoraRendererManager = new RendererManager();
|
|
560
|
-
|
|
561
|
-
AgoraEnv.AgoraRendererManager = AgoraRendererManager;
|
|
562
|
-
|
|
563
|
-
export default AgoraRendererManager;
|
|
564
|
-
export { RendererManager };
|