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,185 +1,195 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* @Author: zhangtao@agora.io
|
|
4
|
-
* @Date: 2021-04-28 13:34:48
|
|
5
|
-
* @Last Modified by: zhangtao@agora.io
|
|
6
|
-
* @Last Modified time: 2021-05-19 15:59:03
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.YUVCanvasRenderer = void 0;
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const isEqual = require('lodash.isequal');
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
class YUVCanvasRenderer extends IRenderer_1.IRenderer {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if (this.
|
|
54
|
-
this.
|
|
55
|
-
this.
|
|
56
|
-
}
|
|
57
|
-
if (this.
|
|
58
|
-
this.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
this._videoFrame.height
|
|
147
|
-
this._videoFrame.
|
|
148
|
-
this._videoFrame.
|
|
149
|
-
this._videoFrame.
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
this._videoFrame.
|
|
154
|
-
this._videoFrame.
|
|
155
|
-
this._videoFrame.
|
|
156
|
-
this._videoFrame.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
this.
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* @Author: zhangtao@agora.io
|
|
4
|
+
* @Date: 2021-04-28 13:34:48
|
|
5
|
+
* @Last Modified by: zhangtao@agora.io
|
|
6
|
+
* @Last Modified time: 2021-05-19 15:59:03
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.YUVCanvasRenderer = void 0;
|
|
10
|
+
const AgoraMediaBase_1 = require("../../Private/AgoraMediaBase");
|
|
11
|
+
const IRenderer_1 = require("../IRenderer");
|
|
12
|
+
const isEqual = require('lodash.isequal');
|
|
13
|
+
const YUVBuffer = require('yuv-buffer');
|
|
14
|
+
const YUVCanvas = require('yuv-canvas');
|
|
15
|
+
class YUVCanvasRenderer extends IRenderer_1.IRenderer {
|
|
16
|
+
_cacheCanvasOptions;
|
|
17
|
+
_yuvCanvasSink;
|
|
18
|
+
_container;
|
|
19
|
+
_videoFrame;
|
|
20
|
+
constructor() {
|
|
21
|
+
super();
|
|
22
|
+
this._videoFrame = {
|
|
23
|
+
rotation: 0,
|
|
24
|
+
width: 0,
|
|
25
|
+
height: 0,
|
|
26
|
+
yStride: 0,
|
|
27
|
+
yBuffer: new Uint8Array(0),
|
|
28
|
+
uBuffer: new Uint8Array(0),
|
|
29
|
+
vBuffer: new Uint8Array(0),
|
|
30
|
+
videoSourceType: -1,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
bind(element) {
|
|
34
|
+
super.bind(element);
|
|
35
|
+
let container = document.createElement('div');
|
|
36
|
+
Object.assign(container.style, {
|
|
37
|
+
width: '100%',
|
|
38
|
+
height: '100%',
|
|
39
|
+
display: 'flex',
|
|
40
|
+
justifyContent: 'center',
|
|
41
|
+
alignItems: 'center',
|
|
42
|
+
overflow: 'hidden',
|
|
43
|
+
});
|
|
44
|
+
this._container = container;
|
|
45
|
+
this.parentElement.appendChild(this._container);
|
|
46
|
+
this.canvas = document.createElement('canvas');
|
|
47
|
+
this._container.appendChild(this.canvas);
|
|
48
|
+
this._yuvCanvasSink = YUVCanvas.attach(this.canvas, {
|
|
49
|
+
webGL: false,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
unbind() {
|
|
53
|
+
if (this._container) {
|
|
54
|
+
this._container.replaceChildren();
|
|
55
|
+
this._container = undefined;
|
|
56
|
+
}
|
|
57
|
+
if (this.parentElement) {
|
|
58
|
+
this.parentElement.replaceChildren();
|
|
59
|
+
this.parentElement = undefined;
|
|
60
|
+
}
|
|
61
|
+
if (this.canvas) {
|
|
62
|
+
this.canvas = undefined;
|
|
63
|
+
}
|
|
64
|
+
if (this._yuvCanvasSink && this._yuvCanvasSink?.loseContext) {
|
|
65
|
+
this._yuvCanvasSink?.loseContext();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
zoom(vertical, contentMode = AgoraMediaBase_1.RenderModeType.RenderModeFit, width, height, clientWidth, clientHeight) {
|
|
69
|
+
let localRatio = clientWidth / clientHeight;
|
|
70
|
+
let tempRatio = width / height;
|
|
71
|
+
if (isNaN(localRatio) || isNaN(tempRatio)) {
|
|
72
|
+
return 1;
|
|
73
|
+
}
|
|
74
|
+
if (contentMode === AgoraMediaBase_1.RenderModeType.RenderModeHidden) {
|
|
75
|
+
if (vertical) {
|
|
76
|
+
return clientHeight / clientWidth < width / height
|
|
77
|
+
? clientWidth / height
|
|
78
|
+
: clientHeight / width;
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
return clientWidth / clientHeight > width / height
|
|
82
|
+
? clientWidth / width
|
|
83
|
+
: clientHeight / height;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
if (vertical) {
|
|
88
|
+
return clientHeight / clientWidth < width / height
|
|
89
|
+
? clientHeight / width
|
|
90
|
+
: clientWidth / height;
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
return clientWidth / clientHeight > width / height
|
|
94
|
+
? clientHeight / height
|
|
95
|
+
: clientWidth / width;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
updateCanvas(options = {
|
|
100
|
+
frameWidth: 0,
|
|
101
|
+
frameHeight: 0,
|
|
102
|
+
rotation: 0,
|
|
103
|
+
contentMode: 0,
|
|
104
|
+
clientWidth: 0,
|
|
105
|
+
clientHeight: 0,
|
|
106
|
+
}) {
|
|
107
|
+
if (this._cacheCanvasOptions) {
|
|
108
|
+
if (isEqual(this._cacheCanvasOptions, options)) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
this._cacheCanvasOptions = Object.assign({}, options);
|
|
113
|
+
if (this.canvas) {
|
|
114
|
+
if (options.rotation === 0 || options.rotation === 180) {
|
|
115
|
+
this.canvas.width = options.frameWidth;
|
|
116
|
+
this.canvas.height = options.frameHeight;
|
|
117
|
+
Object.assign(this.canvas.style, {
|
|
118
|
+
'width': options.frameWidth + 'px',
|
|
119
|
+
'height': options.frameHeight + 'px',
|
|
120
|
+
'object-fit': 'cover',
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
else if (options.rotation === 90 || options.rotation === 270) {
|
|
124
|
+
this.canvas.height = options.frameWidth;
|
|
125
|
+
this.canvas.width = options.frameHeight;
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
throw new Error('Invalid value for rotation. Only support 0, 90, 180, 270');
|
|
129
|
+
}
|
|
130
|
+
let transformItems = [];
|
|
131
|
+
transformItems.push(`rotateZ(${options.rotation}deg)`);
|
|
132
|
+
let scale = this.zoom(options.rotation === 90 || options.rotation === 270, options.contentMode, options.frameWidth, options.frameHeight, options.clientWidth, options.clientHeight);
|
|
133
|
+
this.canvas.style.transform = `scale(${scale.toString()})`;
|
|
134
|
+
if (transformItems.length > 0) {
|
|
135
|
+
this.canvas.style.transform = `${transformItems.join(' ')}`;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
drawFrame(frame) {
|
|
140
|
+
if (!this._container || !this._yuvCanvasSink) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
let frameWidth = frame.width;
|
|
144
|
+
let frameHeight = frame.height;
|
|
145
|
+
if (this._videoFrame.yStride === 0 ||
|
|
146
|
+
this._videoFrame.height === 0 ||
|
|
147
|
+
this._videoFrame.yStride != frame.yStride ||
|
|
148
|
+
this._videoFrame.height != frame.height) {
|
|
149
|
+
this._videoFrame.yBuffer = new Uint8Array(frame.yStride * frameHeight);
|
|
150
|
+
this._videoFrame.uBuffer = new Uint8Array((frame.yStride * frameHeight) / 4);
|
|
151
|
+
this._videoFrame.vBuffer = new Uint8Array((frame.yStride * frameHeight) / 4);
|
|
152
|
+
}
|
|
153
|
+
this._videoFrame.yBuffer.set(frame.yBuffer);
|
|
154
|
+
this._videoFrame.uBuffer.set(frame.uBuffer);
|
|
155
|
+
this._videoFrame.vBuffer.set(frame.vBuffer);
|
|
156
|
+
this._videoFrame.width = frame.width;
|
|
157
|
+
this._videoFrame.height = frame.height;
|
|
158
|
+
this._videoFrame.yStride = frame.yStride;
|
|
159
|
+
this._videoFrame.rotation = frame.rotation;
|
|
160
|
+
let options = {
|
|
161
|
+
frameWidth,
|
|
162
|
+
frameHeight,
|
|
163
|
+
rotation: frame.rotation ? frame.rotation : 0,
|
|
164
|
+
contentMode: this.contentMode,
|
|
165
|
+
clientWidth: this._container.clientWidth,
|
|
166
|
+
clientHeight: this._container.clientHeight,
|
|
167
|
+
};
|
|
168
|
+
this.updateCanvas(options);
|
|
169
|
+
let format = YUVBuffer.format({
|
|
170
|
+
width: frameWidth,
|
|
171
|
+
height: frameHeight,
|
|
172
|
+
chromaWidth: frameWidth / 2,
|
|
173
|
+
chromaHeight: frameHeight / 2,
|
|
174
|
+
cropLeft: frame.yStride - frameWidth,
|
|
175
|
+
});
|
|
176
|
+
let yuvBufferFrame = YUVBuffer.frame(format, {
|
|
177
|
+
bytes: this._videoFrame.yBuffer,
|
|
178
|
+
stride: frame.yStride,
|
|
179
|
+
}, {
|
|
180
|
+
bytes: this._videoFrame.uBuffer,
|
|
181
|
+
stride: frame.yStride / 2,
|
|
182
|
+
}, {
|
|
183
|
+
bytes: this._videoFrame.vBuffer,
|
|
184
|
+
stride: frame.yStride / 2,
|
|
185
|
+
});
|
|
186
|
+
this._yuvCanvasSink.drawFrame(yuvBufferFrame);
|
|
187
|
+
}
|
|
188
|
+
refreshCanvas() {
|
|
189
|
+
if (this._cacheCanvasOptions) {
|
|
190
|
+
this.zoom(this._cacheCanvasOptions.rotation === 90 ||
|
|
191
|
+
this._cacheCanvasOptions.rotation === 270, this._cacheCanvasOptions.contentMode, this._cacheCanvasOptions.frameWidth, this._cacheCanvasOptions.frameHeight, this._cacheCanvasOptions.clientWidth, this._cacheCanvasOptions.clientHeight);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
exports.YUVCanvasRenderer = YUVCanvasRenderer;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./IRenderer"), exports);
|
|
18
|
+
__exportStar(require("./IRendererManager"), exports);
|
package/js/Types.js
CHANGED
|
@@ -1,29 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
/**
|
|
5
|
-
* @ignore
|
|
6
|
-
*/
|
|
7
|
-
var RENDER_MODE;
|
|
8
|
-
(function (RENDER_MODE) {
|
|
9
|
-
/**
|
|
10
|
-
* @ignore
|
|
11
|
-
*/
|
|
12
|
-
RENDER_MODE[RENDER_MODE["WEBGL"] = 1] = "WEBGL";
|
|
13
|
-
/**
|
|
14
|
-
* @ignore
|
|
15
|
-
*/
|
|
16
|
-
RENDER_MODE[RENDER_MODE["SOFTWARE"] = 2] = "SOFTWARE";
|
|
17
|
-
})(RENDER_MODE = exports.RENDER_MODE || (exports.RENDER_MODE = {}));
|
|
18
|
-
/**
|
|
19
|
-
* @ignore
|
|
20
|
-
*/
|
|
21
|
-
var CallBackModule;
|
|
22
|
-
(function (CallBackModule) {
|
|
23
|
-
/**
|
|
24
|
-
* @ignore
|
|
25
|
-
*/
|
|
26
|
-
CallBackModule[CallBackModule["RTC"] = 0] = "RTC";
|
|
27
|
-
CallBackModule[CallBackModule["MPK"] = 1] = "MPK";
|
|
28
|
-
CallBackModule[CallBackModule["OBSERVER"] = 2] = "OBSERVER";
|
|
29
|
-
})(CallBackModule = exports.CallBackModule || (exports.CallBackModule = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RENDER_MODE = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @ignore
|
|
6
|
+
*/
|
|
7
|
+
var RENDER_MODE;
|
|
8
|
+
(function (RENDER_MODE) {
|
|
9
|
+
/**
|
|
10
|
+
* @ignore
|
|
11
|
+
*/
|
|
12
|
+
RENDER_MODE[RENDER_MODE["WEBGL"] = 1] = "WEBGL";
|
|
13
|
+
/**
|
|
14
|
+
* @ignore
|
|
15
|
+
*/
|
|
16
|
+
RENDER_MODE[RENDER_MODE["SOFTWARE"] = 2] = "SOFTWARE";
|
|
17
|
+
})(RENDER_MODE = exports.RENDER_MODE || (exports.RENDER_MODE = {}));
|