agora-electron-sdk 0.0.0-dev.1
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/CHANGELOG.md +315 -0
- package/LICENSE +21 -0
- package/README.md +143 -0
- package/gulpfile.js +52 -0
- package/js/AgoraSdk.js +64 -0
- package/js/Decoder/gpu-utils.js +74 -0
- package/js/Decoder/index.js +172 -0
- package/js/Private/AgoraBase.js +3985 -0
- package/js/Private/AgoraMediaBase.js +1014 -0
- package/js/Private/AgoraMediaPlayerTypes.js +316 -0
- package/js/Private/IAgoraH265Transcoder.js +36 -0
- package/js/Private/IAgoraLog.js +78 -0
- package/js/Private/IAgoraMediaEngine.js +32 -0
- package/js/Private/IAgoraMediaPlayer.js +16 -0
- package/js/Private/IAgoraMediaPlayerSource.js +3 -0
- package/js/Private/IAgoraMediaRecorder.js +10 -0
- package/js/Private/IAgoraMediaStreamingSource.js +74 -0
- package/js/Private/IAgoraMusicContentCenter.js +157 -0
- package/js/Private/IAgoraRhythmPlayer.js +62 -0
- package/js/Private/IAgoraRtcEngine.js +982 -0
- package/js/Private/IAgoraRtcEngineEx.js +19 -0
- package/js/Private/IAgoraSpatialAudio.js +24 -0
- package/js/Private/IAudioDeviceManager.js +20 -0
- package/js/Private/extension/AgoraBaseExtension.js +3 -0
- package/js/Private/extension/AgoraMediaBaseExtension.js +2 -0
- package/js/Private/extension/AgoraMediaPlayerTypesExtension.js +2 -0
- package/js/Private/extension/IAgoraH265TranscoderExtension.js +2 -0
- package/js/Private/extension/IAgoraLogExtension.js +2 -0
- package/js/Private/extension/IAgoraMediaEngineExtension.js +2 -0
- package/js/Private/extension/IAgoraMediaPlayerExtension.js +2 -0
- package/js/Private/extension/IAgoraMediaPlayerSourceExtension.js +2 -0
- package/js/Private/extension/IAgoraMediaRecorderExtension.js +2 -0
- package/js/Private/extension/IAgoraMusicContentCenterExtension.js +2 -0
- package/js/Private/extension/IAgoraRhythmPlayerExtension.js +2 -0
- package/js/Private/extension/IAgoraRtcEngineExExtension.js +2 -0
- package/js/Private/extension/IAgoraRtcEngineExtension.js +2 -0
- package/js/Private/extension/IAgoraSpatialAudioExtension.js +2 -0
- package/js/Private/extension/IAudioDeviceManagerExtension.js +2 -0
- package/js/Private/impl/AgoraBaseImpl.js +23 -0
- package/js/Private/impl/AgoraMediaBaseImpl.js +149 -0
- package/js/Private/impl/IAgoraH265TranscoderImpl.js +116 -0
- package/js/Private/impl/IAgoraMediaEngineImpl.js +337 -0
- package/js/Private/impl/IAgoraMediaPlayerImpl.js +950 -0
- package/js/Private/impl/IAgoraMediaPlayerSourceImpl.js +73 -0
- package/js/Private/impl/IAgoraMediaRecorderImpl.js +47 -0
- package/js/Private/impl/IAgoraMusicContentCenterImpl.js +422 -0
- package/js/Private/impl/IAgoraRtcEngineExImpl.js +1042 -0
- package/js/Private/impl/IAgoraRtcEngineImpl.js +5167 -0
- package/js/Private/impl/IAgoraSpatialAudioImpl.js +358 -0
- package/js/Private/impl/IAudioDeviceManagerImpl.js +375 -0
- package/js/Private/internal/AgoraH265TranscoderInternal.js +62 -0
- package/js/Private/internal/AgoraMediaBaseInternal.js +15 -0
- package/js/Private/internal/AudioDeviceManagerInternal.js +44 -0
- package/js/Private/internal/IrisApiEngine.js +424 -0
- package/js/Private/internal/LocalSpatialAudioEngineInternal.js +7 -0
- package/js/Private/internal/MediaEngineInternal.js +122 -0
- package/js/Private/internal/MediaPlayerInternal.js +194 -0
- package/js/Private/internal/MediaRecorderInternal.js +70 -0
- package/js/Private/internal/MusicContentCenterInternal.js +139 -0
- package/js/Private/internal/RtcEngineExInternal.js +430 -0
- package/js/Private/ipc/main.js +21 -0
- package/js/Private/ipc/renderer.js +21 -0
- package/js/Private/ti/AgoraBase-ti.js +40 -0
- package/js/Private/ti/AgoraMediaBase-ti.js +75 -0
- package/js/Private/ti/AgoraMediaPlayerTypes-ti.js +5 -0
- package/js/Private/ti/IAgoraH265Transcoder-ti.js +40 -0
- package/js/Private/ti/IAgoraLog-ti.js +5 -0
- package/js/Private/ti/IAgoraMediaEngine-ti.js +5 -0
- package/js/Private/ti/IAgoraMediaPlayer-ti.js +38 -0
- package/js/Private/ti/IAgoraMediaPlayerSource-ti.js +50 -0
- package/js/Private/ti/IAgoraMediaRecorder-ti.js +5 -0
- package/js/Private/ti/IAgoraMediaStreamingSource-ti.js +5 -0
- package/js/Private/ti/IAgoraMusicContentCenter-ti.js +42 -0
- package/js/Private/ti/IAgoraRhythmPlayer-ti.js +5 -0
- package/js/Private/ti/IAgoraRtcEngine-ti.js +141 -0
- package/js/Private/ti/IAgoraRtcEngineEx-ti.js +5 -0
- package/js/Private/ti/IAgoraSpatialAudio-ti.js +5 -0
- package/js/Private/ti/IAudioDeviceManager-ti.js +5 -0
- package/js/Renderer/AgoraView.js +161 -0
- package/js/Renderer/CapabilityManager.js +99 -0
- package/js/Renderer/IRenderer.js +136 -0
- package/js/Renderer/IRendererCache.js +75 -0
- package/js/Renderer/RendererCache.js +100 -0
- package/js/Renderer/RendererManager.js +301 -0
- package/js/Renderer/WebCodecsRenderer/index.js +109 -0
- package/js/Renderer/WebCodecsRendererCache.js +115 -0
- package/js/Renderer/WebGLRenderer/index.js +314 -0
- package/js/Renderer/WebGLRenderer/webgl-utils.js +1337 -0
- package/js/Renderer/YUVCanvasRenderer/index.js +46 -0
- package/js/Renderer/index.js +17 -0
- package/js/Types.js +67 -0
- package/js/Utils.js +187 -0
- package/package.json +167 -0
- package/scripts/bootstrap.js +29 -0
- package/scripts/build.js +37 -0
- package/scripts/buildJS.js +14 -0
- package/scripts/checkElectron.js +43 -0
- package/scripts/clean.js +16 -0
- package/scripts/download.js +105 -0
- package/scripts/downloadPrebuild.js +199 -0
- package/scripts/getConfig.js +73 -0
- package/scripts/logger.js +32 -0
- package/scripts/synclib.js +69 -0
- package/scripts/util.js +47 -0
- package/scripts/zipBuild.js +40 -0
- package/ts/AgoraSdk.ts +54 -0
- package/ts/Decoder/gpu-utils.ts +92 -0
- package/ts/Decoder/index.ts +206 -0
- package/ts/Private/AgoraBase.ts +5511 -0
- package/ts/Private/AgoraMediaBase.ts +1764 -0
- package/ts/Private/AgoraMediaPlayerTypes.ts +464 -0
- package/ts/Private/IAgoraH265Transcoder.ts +73 -0
- package/ts/Private/IAgoraLog.ts +91 -0
- package/ts/Private/IAgoraMediaEngine.ts +316 -0
- package/ts/Private/IAgoraMediaPlayer.ts +744 -0
- package/ts/Private/IAgoraMediaPlayerSource.ts +137 -0
- package/ts/Private/IAgoraMediaRecorder.ts +25 -0
- package/ts/Private/IAgoraMediaStreamingSource.ts +81 -0
- package/ts/Private/IAgoraMusicContentCenter.ts +455 -0
- package/ts/Private/IAgoraRhythmPlayer.ts +67 -0
- package/ts/Private/IAgoraRtcEngine.ts +7306 -0
- package/ts/Private/IAgoraRtcEngineEx.ts +992 -0
- package/ts/Private/IAgoraSpatialAudio.ts +250 -0
- package/ts/Private/IAudioDeviceManager.ts +342 -0
- package/ts/Private/extension/AgoraBaseExtension.ts +14 -0
- package/ts/Private/extension/AgoraMediaBaseExtension.ts +1 -0
- package/ts/Private/extension/AgoraMediaPlayerTypesExtension.ts +1 -0
- package/ts/Private/extension/IAgoraH265TranscoderExtension.ts +39 -0
- package/ts/Private/extension/IAgoraLogExtension.ts +1 -0
- package/ts/Private/extension/IAgoraMediaEngineExtension.ts +62 -0
- package/ts/Private/extension/IAgoraMediaPlayerExtension.ts +64 -0
- package/ts/Private/extension/IAgoraMediaPlayerSourceExtension.ts +1 -0
- package/ts/Private/extension/IAgoraMediaRecorderExtension.ts +59 -0
- package/ts/Private/extension/IAgoraMusicContentCenterExtension.ts +34 -0
- package/ts/Private/extension/IAgoraRhythmPlayerExtension.ts +1 -0
- package/ts/Private/extension/IAgoraRtcEngineExExtension.ts +1 -0
- package/ts/Private/extension/IAgoraRtcEngineExtension.ts +64 -0
- package/ts/Private/extension/IAgoraSpatialAudioExtension.ts +1 -0
- package/ts/Private/extension/IAudioDeviceManagerExtension.ts +1 -0
- package/ts/Private/impl/AgoraBaseImpl.ts +39 -0
- package/ts/Private/impl/AgoraMediaBaseImpl.ts +237 -0
- package/ts/Private/impl/IAgoraH265TranscoderImpl.ts +152 -0
- package/ts/Private/impl/IAgoraMediaEngineImpl.ts +491 -0
- package/ts/Private/impl/IAgoraMediaPlayerImpl.ts +1169 -0
- package/ts/Private/impl/IAgoraMediaPlayerSourceImpl.ts +94 -0
- package/ts/Private/impl/IAgoraMediaRecorderImpl.ts +59 -0
- package/ts/Private/impl/IAgoraMusicContentCenterImpl.ts +562 -0
- package/ts/Private/impl/IAgoraRtcEngineExImpl.ts +1672 -0
- package/ts/Private/impl/IAgoraRtcEngineImpl.ts +7352 -0
- package/ts/Private/impl/IAgoraSpatialAudioImpl.ts +495 -0
- package/ts/Private/impl/IAudioDeviceManagerImpl.ts +443 -0
- package/ts/Private/internal/AgoraH265TranscoderInternal.ts +97 -0
- package/ts/Private/internal/AgoraMediaBaseInternal.ts +15 -0
- package/ts/Private/internal/AudioDeviceManagerInternal.ts +46 -0
- package/ts/Private/internal/IrisApiEngine.ts +598 -0
- package/ts/Private/internal/LocalSpatialAudioEngineInternal.ts +3 -0
- package/ts/Private/internal/MediaEngineInternal.ts +190 -0
- package/ts/Private/internal/MediaPlayerInternal.ts +311 -0
- package/ts/Private/internal/MediaRecorderInternal.ts +100 -0
- package/ts/Private/internal/MusicContentCenterInternal.ts +208 -0
- package/ts/Private/internal/RtcEngineExInternal.ts +647 -0
- package/ts/Private/ipc/main.ts +22 -0
- package/ts/Private/ipc/renderer.ts +21 -0
- package/ts/Private/ti/AgoraBase-ti.ts +16 -0
- package/ts/Private/ti/AgoraMediaBase-ti.ts +58 -0
- package/ts/Private/ti/AgoraMediaPlayerTypes-ti.ts +11 -0
- package/ts/Private/ti/IAgoraH265Transcoder-ti.ts +16 -0
- package/ts/Private/ti/IAgoraLog-ti.ts +11 -0
- package/ts/Private/ti/IAgoraMediaEngine-ti.ts +11 -0
- package/ts/Private/ti/IAgoraMediaPlayer-ti.ts +14 -0
- package/ts/Private/ti/IAgoraMediaPlayerSource-ti.ts +26 -0
- package/ts/Private/ti/IAgoraMediaRecorder-ti.ts +11 -0
- package/ts/Private/ti/IAgoraMediaStreamingSource-ti.ts +11 -0
- package/ts/Private/ti/IAgoraMusicContentCenter-ti.ts +18 -0
- package/ts/Private/ti/IAgoraRhythmPlayer-ti.ts +11 -0
- package/ts/Private/ti/IAgoraRtcEngine-ti.ts +119 -0
- package/ts/Private/ti/IAgoraRtcEngineEx-ti.ts +11 -0
- package/ts/Private/ti/IAgoraSpatialAudio-ti.ts +11 -0
- package/ts/Private/ti/IAudioDeviceManager-ti.ts +11 -0
- package/ts/Renderer/AgoraView.ts +235 -0
- package/ts/Renderer/CapabilityManager.ts +126 -0
- package/ts/Renderer/IRenderer.ts +158 -0
- package/ts/Renderer/IRendererCache.ts +96 -0
- package/ts/Renderer/RendererCache.ts +124 -0
- package/ts/Renderer/RendererManager.ts +400 -0
- package/ts/Renderer/WebCodecsRenderer/index.ts +145 -0
- package/ts/Renderer/WebCodecsRendererCache.ts +137 -0
- package/ts/Renderer/WebGLRenderer/index.ts +489 -0
- package/ts/Renderer/WebGLRenderer/webgl-utils.js +1510 -0
- package/ts/Renderer/YUVCanvasRenderer/index.ts +67 -0
- package/ts/Renderer/index.ts +1 -0
- package/ts/Types.ts +249 -0
- package/ts/Utils.ts +197 -0
- package/types/AgoraSdk.d.ts +40 -0
- package/types/AgoraSdk.d.ts.map +1 -0
- package/types/Decoder/gpu-utils.d.ts +21 -0
- package/types/Decoder/gpu-utils.d.ts.map +1 -0
- package/types/Decoder/index.d.ts +26 -0
- package/types/Decoder/index.d.ts.map +1 -0
- package/types/Private/AgoraBase.d.ts +5310 -0
- package/types/Private/AgoraBase.d.ts.map +1 -0
- package/types/Private/AgoraMediaBase.d.ts +1668 -0
- package/types/Private/AgoraMediaBase.d.ts.map +1 -0
- package/types/Private/AgoraMediaPlayerTypes.d.ts +453 -0
- package/types/Private/AgoraMediaPlayerTypes.d.ts.map +1 -0
- package/types/Private/IAgoraH265Transcoder.d.ts +28 -0
- package/types/Private/IAgoraH265Transcoder.d.ts.map +1 -0
- package/types/Private/IAgoraLog.d.ts +89 -0
- package/types/Private/IAgoraLog.d.ts.map +1 -0
- package/types/Private/IAgoraMediaEngine.d.ts +250 -0
- package/types/Private/IAgoraMediaEngine.d.ts.map +1 -0
- package/types/Private/IAgoraMediaPlayer.d.ts +648 -0
- package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -0
- package/types/Private/IAgoraMediaPlayerSource.d.ts +109 -0
- package/types/Private/IAgoraMediaPlayerSource.d.ts.map +1 -0
- package/types/Private/IAgoraMediaRecorder.d.ts +20 -0
- 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 +381 -0
- package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -0
- package/types/Private/IAgoraRhythmPlayer.d.ts +65 -0
- package/types/Private/IAgoraRhythmPlayer.d.ts.map +1 -0
- package/types/Private/IAgoraRtcEngine.d.ts +6103 -0
- package/types/Private/IAgoraRtcEngine.d.ts.map +1 -0
- package/types/Private/IAgoraRtcEngineEx.d.ts +741 -0
- package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -0
- package/types/Private/IAgoraSpatialAudio.d.ts +196 -0
- package/types/Private/IAgoraSpatialAudio.d.ts.map +1 -0
- package/types/Private/IAudioDeviceManager.d.ts +312 -0
- package/types/Private/IAudioDeviceManager.d.ts.map +1 -0
- package/types/Private/extension/AgoraBaseExtension.d.ts +14 -0
- package/types/Private/extension/AgoraBaseExtension.d.ts.map +1 -0
- package/types/Private/extension/AgoraMediaBaseExtension.d.ts +2 -0
- package/types/Private/extension/AgoraMediaBaseExtension.d.ts.map +1 -0
- package/types/Private/extension/AgoraMediaPlayerTypesExtension.d.ts +2 -0
- package/types/Private/extension/AgoraMediaPlayerTypesExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraH265TranscoderExtension.d.ts +24 -0
- package/types/Private/extension/IAgoraH265TranscoderExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraLogExtension.d.ts +2 -0
- package/types/Private/extension/IAgoraLogExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraMediaEngineExtension.d.ts +40 -0
- package/types/Private/extension/IAgoraMediaEngineExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraMediaPlayerExtension.d.ts +46 -0
- package/types/Private/extension/IAgoraMediaPlayerExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts +2 -0
- package/types/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraMediaRecorderExtension.d.ts +44 -0
- package/types/Private/extension/IAgoraMediaRecorderExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraMusicContentCenterExtension.d.ts +20 -0
- package/types/Private/extension/IAgoraMusicContentCenterExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraRhythmPlayerExtension.d.ts +2 -0
- package/types/Private/extension/IAgoraRhythmPlayerExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraRtcEngineExExtension.d.ts +2 -0
- package/types/Private/extension/IAgoraRtcEngineExExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraRtcEngineExtension.d.ts +42 -0
- package/types/Private/extension/IAgoraRtcEngineExtension.d.ts.map +1 -0
- package/types/Private/extension/IAgoraSpatialAudioExtension.d.ts +2 -0
- package/types/Private/extension/IAgoraSpatialAudioExtension.d.ts.map +1 -0
- package/types/Private/extension/IAudioDeviceManagerExtension.d.ts +2 -0
- package/types/Private/extension/IAudioDeviceManagerExtension.d.ts.map +1 -0
- package/types/Private/impl/AgoraBaseImpl.d.ts +3 -0
- package/types/Private/impl/AgoraBaseImpl.d.ts.map +1 -0
- package/types/Private/impl/AgoraMediaBaseImpl.d.ts +14 -0
- package/types/Private/impl/AgoraMediaBaseImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraH265TranscoderImpl.d.ts +15 -0
- package/types/Private/impl/IAgoraH265TranscoderImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraMediaEngineImpl.d.ts +46 -0
- package/types/Private/impl/IAgoraMediaEngineImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts +143 -0
- package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts +3 -0
- package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraMediaRecorderImpl.d.ts +11 -0
- package/types/Private/impl/IAgoraMediaRecorderImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts +67 -0
- package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts +116 -0
- package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +628 -0
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts +47 -0
- package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts.map +1 -0
- package/types/Private/impl/IAudioDeviceManagerImpl.d.ts +65 -0
- package/types/Private/impl/IAudioDeviceManagerImpl.d.ts.map +1 -0
- package/types/Private/internal/AgoraH265TranscoderInternal.d.ts +14 -0
- package/types/Private/internal/AgoraH265TranscoderInternal.d.ts.map +1 -0
- package/types/Private/internal/AgoraMediaBaseInternal.d.ts +8 -0
- package/types/Private/internal/AgoraMediaBaseInternal.d.ts.map +1 -0
- package/types/Private/internal/AudioDeviceManagerInternal.d.ts +9 -0
- package/types/Private/internal/AudioDeviceManagerInternal.d.ts.map +1 -0
- package/types/Private/internal/IrisApiEngine.d.ts +69 -0
- package/types/Private/internal/IrisApiEngine.d.ts.map +1 -0
- package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts +4 -0
- package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts.map +1 -0
- package/types/Private/internal/MediaEngineInternal.d.ts +23 -0
- package/types/Private/internal/MediaEngineInternal.d.ts.map +1 -0
- package/types/Private/internal/MediaPlayerInternal.d.ts +30 -0
- package/types/Private/internal/MediaPlayerInternal.d.ts.map +1 -0
- package/types/Private/internal/MediaRecorderInternal.d.ts +16 -0
- package/types/Private/internal/MediaRecorderInternal.d.ts.map +1 -0
- package/types/Private/internal/MusicContentCenterInternal.d.ts +31 -0
- package/types/Private/internal/MusicContentCenterInternal.d.ts.map +1 -0
- package/types/Private/internal/RtcEngineExInternal.d.ts +73 -0
- package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -0
- package/types/Private/ipc/main.d.ts +2 -0
- package/types/Private/ipc/main.d.ts.map +1 -0
- package/types/Private/ipc/renderer.d.ts +3 -0
- package/types/Private/ipc/renderer.d.ts.map +1 -0
- package/types/Private/ti/AgoraBase-ti.d.ts +8 -0
- package/types/Private/ti/AgoraBase-ti.d.ts.map +1 -0
- package/types/Private/ti/AgoraMediaBase-ti.d.ts +15 -0
- package/types/Private/ti/AgoraMediaBase-ti.d.ts.map +1 -0
- package/types/Private/ti/AgoraMediaPlayerTypes-ti.d.ts +7 -0
- package/types/Private/ti/AgoraMediaPlayerTypes-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraH265Transcoder-ti.d.ts +8 -0
- package/types/Private/ti/IAgoraH265Transcoder-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraLog-ti.d.ts +7 -0
- package/types/Private/ti/IAgoraLog-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraMediaEngine-ti.d.ts +7 -0
- package/types/Private/ti/IAgoraMediaEngine-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraMediaPlayer-ti.d.ts +8 -0
- package/types/Private/ti/IAgoraMediaPlayer-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts +8 -0
- package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraMediaRecorder-ti.d.ts +7 -0
- package/types/Private/ti/IAgoraMediaRecorder-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraMediaStreamingSource-ti.d.ts +7 -0
- package/types/Private/ti/IAgoraMediaStreamingSource-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraMusicContentCenter-ti.d.ts +8 -0
- package/types/Private/ti/IAgoraMusicContentCenter-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraRhythmPlayer-ti.d.ts +7 -0
- package/types/Private/ti/IAgoraRhythmPlayer-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraRtcEngine-ti.d.ts +10 -0
- package/types/Private/ti/IAgoraRtcEngine-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraRtcEngineEx-ti.d.ts +7 -0
- package/types/Private/ti/IAgoraRtcEngineEx-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraSpatialAudio-ti.d.ts +7 -0
- package/types/Private/ti/IAgoraSpatialAudio-ti.d.ts.map +1 -0
- package/types/Private/ti/IAudioDeviceManager-ti.d.ts +7 -0
- package/types/Private/ti/IAudioDeviceManager-ti.d.ts.map +1 -0
- package/types/Renderer/AgoraView.d.ts +76 -0
- package/types/Renderer/AgoraView.d.ts.map +1 -0
- package/types/Renderer/CapabilityManager.d.ts +20 -0
- package/types/Renderer/CapabilityManager.d.ts.map +1 -0
- package/types/Renderer/IRenderer.d.ts +20 -0
- package/types/Renderer/IRenderer.d.ts.map +1 -0
- package/types/Renderer/IRendererCache.d.ts +26 -0
- package/types/Renderer/IRendererCache.d.ts.map +1 -0
- package/types/Renderer/RendererCache.d.ts +24 -0
- package/types/Renderer/RendererCache.d.ts.map +1 -0
- package/types/Renderer/RendererManager.d.ts +66 -0
- package/types/Renderer/RendererManager.d.ts.map +1 -0
- package/types/Renderer/WebCodecsRenderer/index.d.ts +14 -0
- package/types/Renderer/WebCodecsRenderer/index.d.ts.map +1 -0
- package/types/Renderer/WebCodecsRendererCache.d.ts +15 -0
- package/types/Renderer/WebCodecsRendererCache.d.ts.map +1 -0
- package/types/Renderer/WebGLRenderer/index.d.ts +27 -0
- 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 +9 -0
- package/types/Renderer/YUVCanvasRenderer/index.d.ts.map +1 -0
- package/types/Renderer/index.d.ts +2 -0
- package/types/Renderer/index.d.ts.map +1 -0
- package/types/Types.d.ts +177 -0
- package/types/Types.d.ts.map +1 -0
- package/types/Utils.d.ts +50 -0
- package/types/Utils.d.ts.map +1 -0
|
@@ -0,0 +1,38 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.IMediaPlayerVideoFrameObserver = void 0;
|
|
27
|
+
/**
|
|
28
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
29
|
+
*/
|
|
30
|
+
const t = __importStar(require("ts-interface-checker"));
|
|
31
|
+
// tslint:disable:object-literal-key-quotes
|
|
32
|
+
exports.IMediaPlayerVideoFrameObserver = t.iface([], {
|
|
33
|
+
"onFrame": t.opt(t.func("void", t.param("frame", "VideoFrame"))),
|
|
34
|
+
});
|
|
35
|
+
const exportedTypeSuite = {
|
|
36
|
+
IMediaPlayerVideoFrameObserver: exports.IMediaPlayerVideoFrameObserver,
|
|
37
|
+
};
|
|
38
|
+
exports.default = exportedTypeSuite;
|
|
@@ -0,0 +1,50 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.IMediaPlayerSourceObserver = void 0;
|
|
27
|
+
/**
|
|
28
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
29
|
+
*/
|
|
30
|
+
const t = __importStar(require("ts-interface-checker"));
|
|
31
|
+
// tslint:disable:object-literal-key-quotes
|
|
32
|
+
exports.IMediaPlayerSourceObserver = t.iface([], {
|
|
33
|
+
"onPlayerSourceStateChanged": t.opt(t.func("void", t.param("state", "MediaPlayerState"), t.param("reason", "MediaPlayerReason"))),
|
|
34
|
+
"onPositionChanged": t.opt(t.func("void", t.param("positionMs", "number"), t.param("timestampMs", "number"))),
|
|
35
|
+
"onPlayerEvent": t.opt(t.func("void", t.param("eventCode", "MediaPlayerEvent"), t.param("elapsedTime", "number"), t.param("message", "string"))),
|
|
36
|
+
"onMetaData": t.opt(t.func("void", t.param("data", "Uint8Array"), t.param("length", "number"))),
|
|
37
|
+
"onPlayBufferUpdated": t.opt(t.func("void", t.param("playCachedBuffer", "number"))),
|
|
38
|
+
"onPreloadEvent": t.opt(t.func("void", t.param("src", "string"), t.param("event", "PlayerPreloadEvent"))),
|
|
39
|
+
"onCompleted": t.opt(t.func("void")),
|
|
40
|
+
"onAgoraCDNTokenWillExpire": t.opt(t.func("void")),
|
|
41
|
+
"onPlayerSrcInfoChanged": t.opt(t.func("void", t.param("from", "SrcInfo"), t.param("to", "SrcInfo"))),
|
|
42
|
+
"onPlayerInfoUpdated": t.opt(t.func("void", t.param("info", "PlayerUpdatedInfo"))),
|
|
43
|
+
"onPlayerCacheStats": t.opt(t.func("void", t.param("stats", "CacheStatistics"))),
|
|
44
|
+
"onPlayerPlaybackStats": t.opt(t.func("void", t.param("stats", "PlayerPlaybackStats"))),
|
|
45
|
+
"onAudioVolumeIndication": t.opt(t.func("void", t.param("volume", "number"))),
|
|
46
|
+
});
|
|
47
|
+
const exportedTypeSuite = {
|
|
48
|
+
IMediaPlayerSourceObserver: exports.IMediaPlayerSourceObserver,
|
|
49
|
+
};
|
|
50
|
+
exports.default = exportedTypeSuite;
|
|
@@ -0,0 +1,42 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.IMusicContentCenterEventHandler = void 0;
|
|
27
|
+
/**
|
|
28
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
29
|
+
*/
|
|
30
|
+
const t = __importStar(require("ts-interface-checker"));
|
|
31
|
+
// tslint:disable:object-literal-key-quotes
|
|
32
|
+
exports.IMusicContentCenterEventHandler = t.iface([], {
|
|
33
|
+
"onMusicChartsResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("result", t.array("MusicChartInfo")), t.param("reason", "MusicContentCenterStateReason"))),
|
|
34
|
+
"onMusicCollectionResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("result", "MusicCollection"), t.param("reason", "MusicContentCenterStateReason"))),
|
|
35
|
+
"onLyricResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("songCode", "number"), t.param("lyricUrl", "string"), t.param("reason", "MusicContentCenterStateReason"))),
|
|
36
|
+
"onSongSimpleInfoResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("songCode", "number"), t.param("simpleInfo", "string"), t.param("reason", "MusicContentCenterStateReason"))),
|
|
37
|
+
"onPreLoadEvent": t.opt(t.func("void", t.param("requestId", "string"), t.param("songCode", "number"), t.param("percent", "number"), t.param("lyricUrl", "string"), t.param("state", "PreloadState"), t.param("reason", "MusicContentCenterStateReason"))),
|
|
38
|
+
});
|
|
39
|
+
const exportedTypeSuite = {
|
|
40
|
+
IMusicContentCenterEventHandler: exports.IMusicContentCenterEventHandler,
|
|
41
|
+
};
|
|
42
|
+
exports.default = exportedTypeSuite;
|
|
@@ -0,0 +1,141 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.IDirectCdnStreamingEventHandler = exports.IMetadataObserver = exports.IRtcEngineEventHandler = void 0;
|
|
27
|
+
/**
|
|
28
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
29
|
+
*/
|
|
30
|
+
const t = __importStar(require("ts-interface-checker"));
|
|
31
|
+
// tslint:disable:object-literal-key-quotes
|
|
32
|
+
exports.IRtcEngineEventHandler = t.iface([], {
|
|
33
|
+
"onJoinChannelSuccess": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("elapsed", "number"))),
|
|
34
|
+
"onRejoinChannelSuccess": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("elapsed", "number"))),
|
|
35
|
+
"onProxyConnected": t.opt(t.func("void", t.param("channel", "string"), t.param("uid", "number"), t.param("proxyType", "ProxyType"), t.param("localProxyIp", "string"), t.param("elapsed", "number"))),
|
|
36
|
+
"onError": t.opt(t.func("void", t.param("err", "ErrorCodeType"), t.param("msg", "string"))),
|
|
37
|
+
"onAudioQuality": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("quality", "QualityType"), t.param("delay", "number"), t.param("lost", "number"))),
|
|
38
|
+
"onLastmileProbeResult": t.opt(t.func("void", t.param("result", "LastmileProbeResult"))),
|
|
39
|
+
"onAudioVolumeIndication": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("speakers", t.array("AudioVolumeInfo")), t.param("speakerNumber", "number"), t.param("totalVolume", "number"))),
|
|
40
|
+
"onLeaveChannel": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("stats", "RtcStats"))),
|
|
41
|
+
"onRtcStats": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("stats", "RtcStats"))),
|
|
42
|
+
"onAudioDeviceStateChanged": t.opt(t.func("void", t.param("deviceId", "string"), t.param("deviceType", "MediaDeviceType"), t.param("deviceState", "MediaDeviceStateType"))),
|
|
43
|
+
"onAudioMixingPositionChanged": t.opt(t.func("void", t.param("position", "number"))),
|
|
44
|
+
"onAudioMixingFinished": t.opt(t.func("void")),
|
|
45
|
+
"onAudioEffectFinished": t.opt(t.func("void", t.param("soundId", "number"))),
|
|
46
|
+
"onVideoDeviceStateChanged": t.opt(t.func("void", t.param("deviceId", "string"), t.param("deviceType", "MediaDeviceType"), t.param("deviceState", "MediaDeviceStateType"))),
|
|
47
|
+
"onNetworkQuality": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("txQuality", "QualityType"), t.param("rxQuality", "QualityType"))),
|
|
48
|
+
"onIntraRequestReceived": t.opt(t.func("void", t.param("connection", "RtcConnection"))),
|
|
49
|
+
"onUplinkNetworkInfoUpdated": t.opt(t.func("void", t.param("info", "UplinkNetworkInfo"))),
|
|
50
|
+
"onDownlinkNetworkInfoUpdated": t.opt(t.func("void", t.param("info", "DownlinkNetworkInfo"))),
|
|
51
|
+
"onLastmileQuality": t.opt(t.func("void", t.param("quality", "QualityType"))),
|
|
52
|
+
"onFirstLocalVideoFrame": t.opt(t.func("void", t.param("source", "VideoSourceType"), t.param("width", "number"), t.param("height", "number"), t.param("elapsed", "number"))),
|
|
53
|
+
"onFirstLocalVideoFramePublished": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("elapsed", "number"))),
|
|
54
|
+
"onFirstRemoteVideoDecoded": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("width", "number"), t.param("height", "number"), t.param("elapsed", "number"))),
|
|
55
|
+
"onVideoSizeChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("sourceType", "VideoSourceType"), t.param("uid", "number"), t.param("width", "number"), t.param("height", "number"), t.param("rotation", "number"))),
|
|
56
|
+
"onLocalVideoStateChanged": t.opt(t.func("void", t.param("source", "VideoSourceType"), t.param("state", "LocalVideoStreamState"), t.param("reason", "LocalVideoStreamReason"))),
|
|
57
|
+
"onRemoteVideoStateChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("state", "RemoteVideoState"), t.param("reason", "RemoteVideoStateReason"), t.param("elapsed", "number"))),
|
|
58
|
+
"onFirstRemoteVideoFrame": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("width", "number"), t.param("height", "number"), t.param("elapsed", "number"))),
|
|
59
|
+
"onUserJoined": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("elapsed", "number"))),
|
|
60
|
+
"onUserOffline": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("reason", "UserOfflineReasonType"))),
|
|
61
|
+
"onUserMuteAudio": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("muted", "boolean"))),
|
|
62
|
+
"onUserMuteVideo": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("muted", "boolean"))),
|
|
63
|
+
"onUserEnableVideo": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("enabled", "boolean"))),
|
|
64
|
+
"onUserStateChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("state", "number"))),
|
|
65
|
+
"onUserEnableLocalVideo": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("enabled", "boolean"))),
|
|
66
|
+
"onRemoteAudioStats": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("stats", "RemoteAudioStats"))),
|
|
67
|
+
"onLocalAudioStats": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("stats", "LocalAudioStats"))),
|
|
68
|
+
"onLocalVideoStats": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("stats", "LocalVideoStats"))),
|
|
69
|
+
"onRemoteVideoStats": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("stats", "RemoteVideoStats"))),
|
|
70
|
+
"onCameraReady": t.opt(t.func("void")),
|
|
71
|
+
"onCameraFocusAreaChanged": t.opt(t.func("void", t.param("x", "number"), t.param("y", "number"), t.param("width", "number"), t.param("height", "number"))),
|
|
72
|
+
"onCameraExposureAreaChanged": t.opt(t.func("void", t.param("x", "number"), t.param("y", "number"), t.param("width", "number"), t.param("height", "number"))),
|
|
73
|
+
"onFacePositionChanged": t.opt(t.func("void", t.param("imageWidth", "number"), t.param("imageHeight", "number"), t.param("vecRectangle", t.array("Rectangle")), t.param("vecDistance", t.array("number")), t.param("numFaces", "number"))),
|
|
74
|
+
"onVideoStopped": t.opt(t.func("void")),
|
|
75
|
+
"onAudioMixingStateChanged": t.opt(t.func("void", t.param("state", "AudioMixingStateType"), t.param("reason", "AudioMixingReasonType"))),
|
|
76
|
+
"onRhythmPlayerStateChanged": t.opt(t.func("void", t.param("state", "RhythmPlayerStateType"), t.param("reason", "RhythmPlayerReason"))),
|
|
77
|
+
"onConnectionLost": t.opt(t.func("void", t.param("connection", "RtcConnection"))),
|
|
78
|
+
"onConnectionInterrupted": t.opt(t.func("void", t.param("connection", "RtcConnection"))),
|
|
79
|
+
"onConnectionBanned": t.opt(t.func("void", t.param("connection", "RtcConnection"))),
|
|
80
|
+
"onStreamMessage": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("streamId", "number"), t.param("data", "Uint8Array"), t.param("length", "number"), t.param("sentTs", "number"))),
|
|
81
|
+
"onStreamMessageError": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("streamId", "number"), t.param("code", "ErrorCodeType"), t.param("missed", "number"), t.param("cached", "number"))),
|
|
82
|
+
"onRequestToken": t.opt(t.func("void", t.param("connection", "RtcConnection"))),
|
|
83
|
+
"onTokenPrivilegeWillExpire": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("token", "string"))),
|
|
84
|
+
"onLicenseValidationFailure": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("reason", "LicenseErrorType"))),
|
|
85
|
+
"onFirstLocalAudioFramePublished": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("elapsed", "number"))),
|
|
86
|
+
"onFirstRemoteAudioDecoded": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("uid", "number"), t.param("elapsed", "number"))),
|
|
87
|
+
"onFirstRemoteAudioFrame": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("userId", "number"), t.param("elapsed", "number"))),
|
|
88
|
+
"onLocalAudioStateChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("state", "LocalAudioStreamState"), t.param("reason", "LocalAudioStreamReason"))),
|
|
89
|
+
"onRemoteAudioStateChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("state", "RemoteAudioState"), t.param("reason", "RemoteAudioStateReason"), t.param("elapsed", "number"))),
|
|
90
|
+
"onActiveSpeaker": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("uid", "number"))),
|
|
91
|
+
"onContentInspectResult": t.opt(t.func("void", t.param("result", "ContentInspectResult"))),
|
|
92
|
+
"onSnapshotTaken": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("uid", "number"), t.param("filePath", "string"), t.param("width", "number"), t.param("height", "number"), t.param("errCode", "number"))),
|
|
93
|
+
"onClientRoleChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("oldRole", "ClientRoleType"), t.param("newRole", "ClientRoleType"), t.param("newRoleOptions", "ClientRoleOptions"))),
|
|
94
|
+
"onClientRoleChangeFailed": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("reason", "ClientRoleChangeFailedReason"), t.param("currentRole", "ClientRoleType"))),
|
|
95
|
+
"onAudioDeviceVolumeChanged": t.opt(t.func("void", t.param("deviceType", "MediaDeviceType"), t.param("volume", "number"), t.param("muted", "boolean"))),
|
|
96
|
+
"onRtmpStreamingStateChanged": t.opt(t.func("void", t.param("url", "string"), t.param("state", "RtmpStreamPublishState"), t.param("reason", "RtmpStreamPublishReason"))),
|
|
97
|
+
"onRtmpStreamingEvent": t.opt(t.func("void", t.param("url", "string"), t.param("eventCode", "RtmpStreamingEvent"))),
|
|
98
|
+
"onTranscodingUpdated": t.opt(t.func("void")),
|
|
99
|
+
"onAudioRoutingChanged": t.opt(t.func("void", t.param("routing", "number"))),
|
|
100
|
+
"onChannelMediaRelayStateChanged": t.opt(t.func("void", t.param("state", "ChannelMediaRelayState"), t.param("code", "ChannelMediaRelayError"))),
|
|
101
|
+
"onLocalPublishFallbackToAudioOnly": t.opt(t.func("void", t.param("isFallbackOrRecover", "boolean"))),
|
|
102
|
+
"onRemoteSubscribeFallbackToAudioOnly": t.opt(t.func("void", t.param("uid", "number"), t.param("isFallbackOrRecover", "boolean"))),
|
|
103
|
+
"onRemoteAudioTransportStats": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("delay", "number"), t.param("lost", "number"), t.param("rxKBitRate", "number"))),
|
|
104
|
+
"onRemoteVideoTransportStats": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("delay", "number"), t.param("lost", "number"), t.param("rxKBitRate", "number"))),
|
|
105
|
+
"onConnectionStateChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("state", "ConnectionStateType"), t.param("reason", "ConnectionChangedReasonType"))),
|
|
106
|
+
"onWlAccMessage": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("reason", "WlaccMessageReason"), t.param("action", "WlaccSuggestAction"), t.param("wlAccMsg", "string"))),
|
|
107
|
+
"onWlAccStats": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("currentStats", "WlAccStats"), t.param("averageStats", "WlAccStats"))),
|
|
108
|
+
"onNetworkTypeChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("type", "NetworkType"))),
|
|
109
|
+
"onEncryptionError": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("errorType", "EncryptionErrorType"))),
|
|
110
|
+
"onPermissionError": t.opt(t.func("void", t.param("permissionType", "PermissionType"))),
|
|
111
|
+
"onLocalUserRegistered": t.opt(t.func("void", t.param("uid", "number"), t.param("userAccount", "string"))),
|
|
112
|
+
"onUserInfoUpdated": t.opt(t.func("void", t.param("uid", "number"), t.param("info", "UserInfo"))),
|
|
113
|
+
"onUserAccountUpdated": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("remoteUserAccount", "string"))),
|
|
114
|
+
"onVideoRenderingTracingResult": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("uid", "number"), t.param("currentEvent", "MediaTraceEvent"), t.param("tracingInfo", "VideoRenderingTracingInfo"))),
|
|
115
|
+
"onLocalVideoTranscoderError": t.opt(t.func("void", t.param("stream", "TranscodingVideoStream"), t.param("error", "VideoTranscoderError"))),
|
|
116
|
+
"onUploadLogResult": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("requestId", "string"), t.param("success", "boolean"), t.param("reason", "UploadErrorReason"))),
|
|
117
|
+
"onAudioSubscribeStateChanged": t.opt(t.func("void", t.param("channel", "string"), t.param("uid", "number"), t.param("oldState", "StreamSubscribeState"), t.param("newState", "StreamSubscribeState"), t.param("elapseSinceLastState", "number"))),
|
|
118
|
+
"onVideoSubscribeStateChanged": t.opt(t.func("void", t.param("channel", "string"), t.param("uid", "number"), t.param("oldState", "StreamSubscribeState"), t.param("newState", "StreamSubscribeState"), t.param("elapseSinceLastState", "number"))),
|
|
119
|
+
"onAudioPublishStateChanged": t.opt(t.func("void", t.param("channel", "string"), t.param("oldState", "StreamPublishState"), t.param("newState", "StreamPublishState"), t.param("elapseSinceLastState", "number"))),
|
|
120
|
+
"onVideoPublishStateChanged": t.opt(t.func("void", t.param("source", "VideoSourceType"), t.param("channel", "string"), t.param("oldState", "StreamPublishState"), t.param("newState", "StreamPublishState"), t.param("elapseSinceLastState", "number"))),
|
|
121
|
+
"onTranscodedStreamLayoutInfo": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("uid", "number"), t.param("width", "number"), t.param("height", "number"), t.param("layoutCount", "number"), t.param("layoutlist", t.array("VideoLayout")))),
|
|
122
|
+
"onAudioMetadataReceived": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("uid", "number"), t.param("metadata", "string"), t.param("length", "number"))),
|
|
123
|
+
"onExtensionEventWithContext": t.opt(t.func("void", t.param("context", "ExtensionContext"), t.param("key", "string"), t.param("value", "string"))),
|
|
124
|
+
"onExtensionStartedWithContext": t.opt(t.func("void", t.param("context", "ExtensionContext"))),
|
|
125
|
+
"onExtensionStoppedWithContext": t.opt(t.func("void", t.param("context", "ExtensionContext"))),
|
|
126
|
+
"onExtensionErrorWithContext": t.opt(t.func("void", t.param("context", "ExtensionContext"), t.param("error", "number"), t.param("message", "string"))),
|
|
127
|
+
"onSetRtmFlagResult": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("code", "number"))),
|
|
128
|
+
});
|
|
129
|
+
exports.IMetadataObserver = t.iface([], {
|
|
130
|
+
"onMetadataReceived": t.opt(t.func("void", t.param("metadata", "Metadata"))),
|
|
131
|
+
});
|
|
132
|
+
exports.IDirectCdnStreamingEventHandler = t.iface([], {
|
|
133
|
+
"onDirectCdnStreamingStateChanged": t.opt(t.func("void", t.param("state", "DirectCdnStreamingState"), t.param("reason", "DirectCdnStreamingReason"), t.param("message", "string"))),
|
|
134
|
+
"onDirectCdnStreamingStats": t.opt(t.func("void", t.param("stats", "DirectCdnStreamingStats"))),
|
|
135
|
+
});
|
|
136
|
+
const exportedTypeSuite = {
|
|
137
|
+
IRtcEngineEventHandler: exports.IRtcEngineEventHandler,
|
|
138
|
+
IMetadataObserver: exports.IMetadataObserver,
|
|
139
|
+
IDirectCdnStreamingEventHandler: exports.IDirectCdnStreamingEventHandler,
|
|
140
|
+
};
|
|
141
|
+
exports.default = exportedTypeSuite;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const AgoraBase_1 = require("../Private/AgoraBase");
|
|
4
|
+
const AgoraMediaBase_1 = require("../Private/AgoraMediaBase");
|
|
5
|
+
const Utils_1 = require("../Utils");
|
|
6
|
+
const VIDEO_SOURCE_TYPE_STRING = 'video-source-type';
|
|
7
|
+
const UID_STRING = 'uid';
|
|
8
|
+
const CHANNEL_ID_STRING = 'channel-id';
|
|
9
|
+
const POSITION_STRING = 'position';
|
|
10
|
+
const RENDERER_CONTENT_MODE_STRING = 'renderer-content-mode';
|
|
11
|
+
const RENDERER_MIRROR_STRING = 'renderer-mirror';
|
|
12
|
+
const observedAttributes = [
|
|
13
|
+
VIDEO_SOURCE_TYPE_STRING,
|
|
14
|
+
UID_STRING,
|
|
15
|
+
CHANNEL_ID_STRING,
|
|
16
|
+
POSITION_STRING,
|
|
17
|
+
RENDERER_CONTENT_MODE_STRING,
|
|
18
|
+
RENDERER_MIRROR_STRING,
|
|
19
|
+
];
|
|
20
|
+
class AgoraView extends HTMLElement {
|
|
21
|
+
static get observedAttributes() {
|
|
22
|
+
return observedAttributes;
|
|
23
|
+
}
|
|
24
|
+
get sourceType() {
|
|
25
|
+
const number = Number(this.getAttribute(VIDEO_SOURCE_TYPE_STRING));
|
|
26
|
+
return isNaN(number) ? 0 : number;
|
|
27
|
+
}
|
|
28
|
+
set sourceType(val) {
|
|
29
|
+
if (val) {
|
|
30
|
+
this.setAttribute(VIDEO_SOURCE_TYPE_STRING, String(val));
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
this.removeAttribute(VIDEO_SOURCE_TYPE_STRING);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
get uid() {
|
|
37
|
+
const number = Number(this.getAttribute(UID_STRING));
|
|
38
|
+
return isNaN(number) ? 0 : number;
|
|
39
|
+
}
|
|
40
|
+
set uid(val) {
|
|
41
|
+
if (val) {
|
|
42
|
+
this.setAttribute(UID_STRING, String(val));
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
this.removeAttribute(UID_STRING);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
get channelId() {
|
|
49
|
+
return this.getAttribute(CHANNEL_ID_STRING) || '';
|
|
50
|
+
}
|
|
51
|
+
set channelId(val) {
|
|
52
|
+
if (val) {
|
|
53
|
+
this.setAttribute(CHANNEL_ID_STRING, val);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
this.removeAttribute(CHANNEL_ID_STRING);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
get position() {
|
|
60
|
+
const number = Number(this.getAttribute(POSITION_STRING));
|
|
61
|
+
return isNaN(number)
|
|
62
|
+
? AgoraMediaBase_1.VideoModulePosition.PositionPreEncoder |
|
|
63
|
+
AgoraMediaBase_1.VideoModulePosition.PositionPreRenderer
|
|
64
|
+
: number;
|
|
65
|
+
}
|
|
66
|
+
set position(val) {
|
|
67
|
+
if (val) {
|
|
68
|
+
this.setAttribute(POSITION_STRING, String(val));
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
this.removeAttribute(POSITION_STRING);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
get renderMode() {
|
|
75
|
+
const number = Number(this.getAttribute(RENDERER_CONTENT_MODE_STRING) ||
|
|
76
|
+
AgoraMediaBase_1.RenderModeType.RenderModeFit);
|
|
77
|
+
return isNaN(number) ? AgoraMediaBase_1.RenderModeType.RenderModeFit : number;
|
|
78
|
+
}
|
|
79
|
+
set renderMode(val) {
|
|
80
|
+
if (val) {
|
|
81
|
+
this.setAttribute(RENDERER_CONTENT_MODE_STRING, String(val));
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
this.removeAttribute(RENDERER_CONTENT_MODE_STRING);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
get renderMirror() {
|
|
88
|
+
return this.getAttribute(RENDERER_MIRROR_STRING) === 'true';
|
|
89
|
+
}
|
|
90
|
+
set renderMirror(val) {
|
|
91
|
+
if (val) {
|
|
92
|
+
this.setAttribute(RENDERER_MIRROR_STRING, String(val));
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
this.removeAttribute(RENDERER_MIRROR_STRING);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
constructor() {
|
|
99
|
+
super();
|
|
100
|
+
this.isConnectedCallback = false;
|
|
101
|
+
this.initializeRender = () => {
|
|
102
|
+
const { channelId, uid, sourceType, position, renderMode, renderMirror } = this;
|
|
103
|
+
Utils_1.AgoraEnv.AgoraRendererManager?.addOrRemoveRenderer({
|
|
104
|
+
sourceType,
|
|
105
|
+
view: this,
|
|
106
|
+
uid,
|
|
107
|
+
channelId,
|
|
108
|
+
position,
|
|
109
|
+
renderMode,
|
|
110
|
+
mirrorMode: renderMirror
|
|
111
|
+
? AgoraBase_1.VideoMirrorModeType.VideoMirrorModeEnabled
|
|
112
|
+
: AgoraBase_1.VideoMirrorModeType.VideoMirrorModeDisabled,
|
|
113
|
+
setupMode: AgoraBase_1.VideoViewSetupMode.VideoViewSetupReplace,
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
this.destroyRender = () => {
|
|
117
|
+
const { channelId, uid, sourceType, position } = this;
|
|
118
|
+
Utils_1.AgoraEnv.AgoraRendererManager?.removeRendererFromCache({
|
|
119
|
+
channelId,
|
|
120
|
+
position,
|
|
121
|
+
uid,
|
|
122
|
+
sourceType,
|
|
123
|
+
view: this,
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
connectedCallback() {
|
|
128
|
+
this.isConnectedCallback = true;
|
|
129
|
+
this.initializeRender();
|
|
130
|
+
}
|
|
131
|
+
attributeChangedCallback(attrName, oldVal, newVal) {
|
|
132
|
+
if (!this.isConnectedCallback) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const isSetRenderOption = [
|
|
136
|
+
RENDERER_CONTENT_MODE_STRING,
|
|
137
|
+
RENDERER_MIRROR_STRING,
|
|
138
|
+
].includes(attrName);
|
|
139
|
+
if (isSetRenderOption) {
|
|
140
|
+
Utils_1.AgoraEnv.AgoraRendererManager?.setRendererContext({
|
|
141
|
+
view: this,
|
|
142
|
+
renderMode: this.renderMode,
|
|
143
|
+
mirrorMode: this.renderMirror
|
|
144
|
+
? AgoraBase_1.VideoMirrorModeType.VideoMirrorModeEnabled
|
|
145
|
+
: AgoraBase_1.VideoMirrorModeType.VideoMirrorModeDisabled,
|
|
146
|
+
});
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
const isNeedReInitialize = observedAttributes.includes(attrName);
|
|
150
|
+
if (!isNeedReInitialize) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
this.initializeRender();
|
|
154
|
+
}
|
|
155
|
+
disconnectedCallback() {
|
|
156
|
+
this.isConnectedCallback = false;
|
|
157
|
+
this.destroyRender();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
exports.default = AgoraView;
|
|
161
|
+
window.customElements.define('agora-view', AgoraView);
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CapabilityManager = void 0;
|
|
7
|
+
const semver_1 = __importDefault(require("semver"));
|
|
8
|
+
const AgoraSdk_1 = __importDefault(require("../AgoraSdk"));
|
|
9
|
+
const gpu_utils_1 = require("../Decoder/gpu-utils");
|
|
10
|
+
const AgoraBase_1 = require("../Private/AgoraBase");
|
|
11
|
+
const renderer_1 = require("../Private/ipc/renderer");
|
|
12
|
+
const Types_1 = require("../Types");
|
|
13
|
+
const Utils_1 = require("../Utils");
|
|
14
|
+
/**
|
|
15
|
+
* @ignore
|
|
16
|
+
*/
|
|
17
|
+
class CapabilityManager {
|
|
18
|
+
setWebCodecsDecoderEnabled(enabled) {
|
|
19
|
+
this.webCodecsDecoderEnabled = enabled;
|
|
20
|
+
}
|
|
21
|
+
constructor() {
|
|
22
|
+
this.gpuInfo = new gpu_utils_1.GpuInfo();
|
|
23
|
+
this.frameCodecMapping = {};
|
|
24
|
+
this.webCodecsDecoderEnabled = Utils_1.AgoraEnv.enableWebCodecsDecoder;
|
|
25
|
+
this._engine = (0, AgoraSdk_1.default)();
|
|
26
|
+
if (Utils_1.AgoraEnv.enableWebCodecsDecoder) {
|
|
27
|
+
this.getGpuInfo(() => {
|
|
28
|
+
if (Utils_1.AgoraEnv.videoFallbackStrategy ===
|
|
29
|
+
Types_1.VideoFallbackStrategy.PerformancePriority) {
|
|
30
|
+
if (!this.isSupportedH265()) {
|
|
31
|
+
if (this.isSupportedH264()) {
|
|
32
|
+
this._engine.setParameters(JSON.stringify({ 'che.video.h265_dec_enable': false }));
|
|
33
|
+
(0, Utils_1.logInfo)('the videoFallbackStrategy is PerformancePriority, H265 is not supported, fallback to H264');
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
this.webCodecsDecoderEnabled = false;
|
|
37
|
+
(0, Utils_1.logInfo)('the videoFallbackStrategy is PerformancePriority, H264 and H265 are not supported, fallback to native decoder');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
else if (Utils_1.AgoraEnv.videoFallbackStrategy ===
|
|
42
|
+
Types_1.VideoFallbackStrategy.BandwidthPriority) {
|
|
43
|
+
if (!this.isSupportedH265()) {
|
|
44
|
+
this.webCodecsDecoderEnabled = false;
|
|
45
|
+
(0, Utils_1.logInfo)('the videoFallbackStrategy is BandwidthPriority, H265 is not supported, fallback to native decoder');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
getGpuInfo(callback) {
|
|
52
|
+
//getGpuInfo and videoDecoder is not supported in electron version < 22.0.0
|
|
53
|
+
//@ts-ignore
|
|
54
|
+
if (semver_1.default.lt(process.versions.electron, '22.0.0')) {
|
|
55
|
+
(0, Utils_1.logError)('WebCodecsDecoder is not supported in electron version < 22.0.0, please upgrade electron to 22.0.0 or later.');
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
//@ts-ignore
|
|
59
|
+
if (process.type === 'renderer') {
|
|
60
|
+
(0, renderer_1.ipcSend)(Types_1.IPCMessageType.AGORA_IPC_GET_GPU_INFO)
|
|
61
|
+
.then((result) => {
|
|
62
|
+
this.gpuInfo.videoDecodeAcceleratorSupportedProfile = result;
|
|
63
|
+
this.webCodecsDecoderEnabled = (Utils_1.AgoraEnv.enableWebCodecsDecoder &&
|
|
64
|
+
this.gpuInfo.videoDecodeAcceleratorSupportedProfile.length > 0);
|
|
65
|
+
result.forEach((profile) => {
|
|
66
|
+
const match = Types_1.codecMapping.find((item) => profile.codec.includes(item.profile));
|
|
67
|
+
if (match) {
|
|
68
|
+
//Normally, the range of compatible widths and heights should be the same under the same codec.
|
|
69
|
+
//there is no need to differentiate between different profiles. This could be optimized in the future.
|
|
70
|
+
this.frameCodecMapping[match.type] = {
|
|
71
|
+
codec: match.codec,
|
|
72
|
+
minWidth: profile.minWidth,
|
|
73
|
+
minHeight: profile.minHeight,
|
|
74
|
+
maxWidth: profile.maxWidth,
|
|
75
|
+
maxHeight: profile.maxHeight,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
callback && callback();
|
|
80
|
+
})
|
|
81
|
+
.catch((error) => {
|
|
82
|
+
(0, Utils_1.logError)('Failed to get GPU info, please check if you are already import agora-electron-sdk in the main process.', error);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
(0, Utils_1.logError)('This function only works in renderer process');
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
isSupportedH264() {
|
|
90
|
+
return this.frameCodecMapping[AgoraBase_1.VideoCodecType.VideoCodecH264] !== undefined;
|
|
91
|
+
}
|
|
92
|
+
isSupportedH265() {
|
|
93
|
+
return this.frameCodecMapping[AgoraBase_1.VideoCodecType.VideoCodecH265] !== undefined;
|
|
94
|
+
}
|
|
95
|
+
release() {
|
|
96
|
+
Utils_1.AgoraEnv.enableWebCodecsDecoder = false;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.CapabilityManager = CapabilityManager;
|