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,443 @@
|
|
|
1
|
+
import { AudioDeviceInfo } from '../IAgoraRtcEngine';
|
|
2
|
+
import { IAudioDeviceManager } from '../IAudioDeviceManager';
|
|
3
|
+
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
export class IAudioDeviceManagerImpl implements IAudioDeviceManager {
|
|
6
|
+
enumeratePlaybackDevices(): AudioDeviceInfo[] {
|
|
7
|
+
const apiType = this.getApiTypeFromEnumeratePlaybackDevices();
|
|
8
|
+
const jsonParams = {};
|
|
9
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
10
|
+
return jsonResults.result;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
protected getApiTypeFromEnumeratePlaybackDevices(): string {
|
|
14
|
+
return 'AudioDeviceManager_enumeratePlaybackDevices';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
enumerateRecordingDevices(): AudioDeviceInfo[] {
|
|
18
|
+
const apiType = this.getApiTypeFromEnumerateRecordingDevices();
|
|
19
|
+
const jsonParams = {};
|
|
20
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
21
|
+
return jsonResults.result;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
protected getApiTypeFromEnumerateRecordingDevices(): string {
|
|
25
|
+
return 'AudioDeviceManager_enumerateRecordingDevices';
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
setPlaybackDevice(deviceId: string): number {
|
|
29
|
+
const apiType = this.getApiTypeFromSetPlaybackDevice(deviceId);
|
|
30
|
+
const jsonParams = {
|
|
31
|
+
deviceId: deviceId,
|
|
32
|
+
toJSON: () => {
|
|
33
|
+
return {
|
|
34
|
+
deviceId: deviceId,
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
39
|
+
return jsonResults.result;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
protected getApiTypeFromSetPlaybackDevice(deviceId: string): string {
|
|
43
|
+
return 'AudioDeviceManager_setPlaybackDevice_4ad5f6e';
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
getPlaybackDevice(): string {
|
|
47
|
+
const apiType = this.getApiTypeFromGetPlaybackDevice();
|
|
48
|
+
const jsonParams = {};
|
|
49
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
50
|
+
const deviceId = jsonResults.deviceId;
|
|
51
|
+
return deviceId;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
protected getApiTypeFromGetPlaybackDevice(): string {
|
|
55
|
+
return 'AudioDeviceManager_getPlaybackDevice_73b9872';
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
getPlaybackDeviceInfo(): AudioDeviceInfo {
|
|
59
|
+
const apiType = this.getApiTypeFromGetPlaybackDeviceInfo();
|
|
60
|
+
const jsonParams = {};
|
|
61
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
62
|
+
return jsonResults.result;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
protected getApiTypeFromGetPlaybackDeviceInfo(): string {
|
|
66
|
+
return 'AudioDeviceManager_getPlaybackDeviceInfo_ed3a96d';
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
setPlaybackDeviceVolume(volume: number): number {
|
|
70
|
+
const apiType = this.getApiTypeFromSetPlaybackDeviceVolume(volume);
|
|
71
|
+
const jsonParams = {
|
|
72
|
+
volume: volume,
|
|
73
|
+
toJSON: () => {
|
|
74
|
+
return {
|
|
75
|
+
volume: volume,
|
|
76
|
+
};
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
80
|
+
return jsonResults.result;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
protected getApiTypeFromSetPlaybackDeviceVolume(volume: number): string {
|
|
84
|
+
return 'AudioDeviceManager_setPlaybackDeviceVolume_46f8ab7';
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
getPlaybackDeviceVolume(): number {
|
|
88
|
+
const apiType = this.getApiTypeFromGetPlaybackDeviceVolume();
|
|
89
|
+
const jsonParams = {};
|
|
90
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
91
|
+
const volume = jsonResults.volume;
|
|
92
|
+
return volume;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
protected getApiTypeFromGetPlaybackDeviceVolume(): string {
|
|
96
|
+
return 'AudioDeviceManager_getPlaybackDeviceVolume_915cb25';
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
setRecordingDevice(deviceId: string): number {
|
|
100
|
+
const apiType = this.getApiTypeFromSetRecordingDevice(deviceId);
|
|
101
|
+
const jsonParams = {
|
|
102
|
+
deviceId: deviceId,
|
|
103
|
+
toJSON: () => {
|
|
104
|
+
return {
|
|
105
|
+
deviceId: deviceId,
|
|
106
|
+
};
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
110
|
+
return jsonResults.result;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
protected getApiTypeFromSetRecordingDevice(deviceId: string): string {
|
|
114
|
+
return 'AudioDeviceManager_setRecordingDevice_4ad5f6e';
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
getRecordingDevice(): string {
|
|
118
|
+
const apiType = this.getApiTypeFromGetRecordingDevice();
|
|
119
|
+
const jsonParams = {};
|
|
120
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
121
|
+
const deviceId = jsonResults.deviceId;
|
|
122
|
+
return deviceId;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
protected getApiTypeFromGetRecordingDevice(): string {
|
|
126
|
+
return 'AudioDeviceManager_getRecordingDevice_73b9872';
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
getRecordingDeviceInfo(): AudioDeviceInfo {
|
|
130
|
+
const apiType = this.getApiTypeFromGetRecordingDeviceInfo();
|
|
131
|
+
const jsonParams = {};
|
|
132
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
133
|
+
return jsonResults.result;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
protected getApiTypeFromGetRecordingDeviceInfo(): string {
|
|
137
|
+
return 'AudioDeviceManager_getRecordingDeviceInfo_ed3a96d';
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
setRecordingDeviceVolume(volume: number): number {
|
|
141
|
+
const apiType = this.getApiTypeFromSetRecordingDeviceVolume(volume);
|
|
142
|
+
const jsonParams = {
|
|
143
|
+
volume: volume,
|
|
144
|
+
toJSON: () => {
|
|
145
|
+
return {
|
|
146
|
+
volume: volume,
|
|
147
|
+
};
|
|
148
|
+
},
|
|
149
|
+
};
|
|
150
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
151
|
+
return jsonResults.result;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
protected getApiTypeFromSetRecordingDeviceVolume(volume: number): string {
|
|
155
|
+
return 'AudioDeviceManager_setRecordingDeviceVolume_46f8ab7';
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
getRecordingDeviceVolume(): number {
|
|
159
|
+
const apiType = this.getApiTypeFromGetRecordingDeviceVolume();
|
|
160
|
+
const jsonParams = {};
|
|
161
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
162
|
+
const volume = jsonResults.volume;
|
|
163
|
+
return volume;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
protected getApiTypeFromGetRecordingDeviceVolume(): string {
|
|
167
|
+
return 'AudioDeviceManager_getRecordingDeviceVolume_915cb25';
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
setLoopbackDevice(deviceId: string): number {
|
|
171
|
+
const apiType = this.getApiTypeFromSetLoopbackDevice(deviceId);
|
|
172
|
+
const jsonParams = {
|
|
173
|
+
deviceId: deviceId,
|
|
174
|
+
toJSON: () => {
|
|
175
|
+
return {
|
|
176
|
+
deviceId: deviceId,
|
|
177
|
+
};
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
181
|
+
return jsonResults.result;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
protected getApiTypeFromSetLoopbackDevice(deviceId: string): string {
|
|
185
|
+
return 'AudioDeviceManager_setLoopbackDevice_4ad5f6e';
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
getLoopbackDevice(): string {
|
|
189
|
+
const apiType = this.getApiTypeFromGetLoopbackDevice();
|
|
190
|
+
const jsonParams = {};
|
|
191
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
192
|
+
const deviceId = jsonResults.deviceId;
|
|
193
|
+
return deviceId;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
protected getApiTypeFromGetLoopbackDevice(): string {
|
|
197
|
+
return 'AudioDeviceManager_getLoopbackDevice_73b9872';
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
setPlaybackDeviceMute(mute: boolean): number {
|
|
201
|
+
const apiType = this.getApiTypeFromSetPlaybackDeviceMute(mute);
|
|
202
|
+
const jsonParams = {
|
|
203
|
+
mute: mute,
|
|
204
|
+
toJSON: () => {
|
|
205
|
+
return {
|
|
206
|
+
mute: mute,
|
|
207
|
+
};
|
|
208
|
+
},
|
|
209
|
+
};
|
|
210
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
211
|
+
return jsonResults.result;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
protected getApiTypeFromSetPlaybackDeviceMute(mute: boolean): string {
|
|
215
|
+
return 'AudioDeviceManager_setPlaybackDeviceMute_5039d15';
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
getPlaybackDeviceMute(): boolean {
|
|
219
|
+
const apiType = this.getApiTypeFromGetPlaybackDeviceMute();
|
|
220
|
+
const jsonParams = {};
|
|
221
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
222
|
+
const mute = jsonResults.mute;
|
|
223
|
+
return mute;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
protected getApiTypeFromGetPlaybackDeviceMute(): string {
|
|
227
|
+
return 'AudioDeviceManager_getPlaybackDeviceMute_d942327';
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
setRecordingDeviceMute(mute: boolean): number {
|
|
231
|
+
const apiType = this.getApiTypeFromSetRecordingDeviceMute(mute);
|
|
232
|
+
const jsonParams = {
|
|
233
|
+
mute: mute,
|
|
234
|
+
toJSON: () => {
|
|
235
|
+
return {
|
|
236
|
+
mute: mute,
|
|
237
|
+
};
|
|
238
|
+
},
|
|
239
|
+
};
|
|
240
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
241
|
+
return jsonResults.result;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
protected getApiTypeFromSetRecordingDeviceMute(mute: boolean): string {
|
|
245
|
+
return 'AudioDeviceManager_setRecordingDeviceMute_5039d15';
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
getRecordingDeviceMute(): boolean {
|
|
249
|
+
const apiType = this.getApiTypeFromGetRecordingDeviceMute();
|
|
250
|
+
const jsonParams = {};
|
|
251
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
252
|
+
const mute = jsonResults.mute;
|
|
253
|
+
return mute;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
protected getApiTypeFromGetRecordingDeviceMute(): string {
|
|
257
|
+
return 'AudioDeviceManager_getRecordingDeviceMute_d942327';
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
startPlaybackDeviceTest(testAudioFilePath: string): number {
|
|
261
|
+
const apiType =
|
|
262
|
+
this.getApiTypeFromStartPlaybackDeviceTest(testAudioFilePath);
|
|
263
|
+
const jsonParams = {
|
|
264
|
+
testAudioFilePath: testAudioFilePath,
|
|
265
|
+
toJSON: () => {
|
|
266
|
+
return {
|
|
267
|
+
testAudioFilePath: testAudioFilePath,
|
|
268
|
+
};
|
|
269
|
+
},
|
|
270
|
+
};
|
|
271
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
272
|
+
return jsonResults.result;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
protected getApiTypeFromStartPlaybackDeviceTest(
|
|
276
|
+
testAudioFilePath: string
|
|
277
|
+
): string {
|
|
278
|
+
return 'AudioDeviceManager_startPlaybackDeviceTest_3a2037f';
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
stopPlaybackDeviceTest(): number {
|
|
282
|
+
const apiType = this.getApiTypeFromStopPlaybackDeviceTest();
|
|
283
|
+
const jsonParams = {};
|
|
284
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
285
|
+
return jsonResults.result;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
protected getApiTypeFromStopPlaybackDeviceTest(): string {
|
|
289
|
+
return 'AudioDeviceManager_stopPlaybackDeviceTest';
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
startRecordingDeviceTest(indicationInterval: number): number {
|
|
293
|
+
const apiType =
|
|
294
|
+
this.getApiTypeFromStartRecordingDeviceTest(indicationInterval);
|
|
295
|
+
const jsonParams = {
|
|
296
|
+
indicationInterval: indicationInterval,
|
|
297
|
+
toJSON: () => {
|
|
298
|
+
return {
|
|
299
|
+
indicationInterval: indicationInterval,
|
|
300
|
+
};
|
|
301
|
+
},
|
|
302
|
+
};
|
|
303
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
304
|
+
return jsonResults.result;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
protected getApiTypeFromStartRecordingDeviceTest(
|
|
308
|
+
indicationInterval: number
|
|
309
|
+
): string {
|
|
310
|
+
return 'AudioDeviceManager_startRecordingDeviceTest_46f8ab7';
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
stopRecordingDeviceTest(): number {
|
|
314
|
+
const apiType = this.getApiTypeFromStopRecordingDeviceTest();
|
|
315
|
+
const jsonParams = {};
|
|
316
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
317
|
+
return jsonResults.result;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
protected getApiTypeFromStopRecordingDeviceTest(): string {
|
|
321
|
+
return 'AudioDeviceManager_stopRecordingDeviceTest';
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
startAudioDeviceLoopbackTest(indicationInterval: number): number {
|
|
325
|
+
const apiType =
|
|
326
|
+
this.getApiTypeFromStartAudioDeviceLoopbackTest(indicationInterval);
|
|
327
|
+
const jsonParams = {
|
|
328
|
+
indicationInterval: indicationInterval,
|
|
329
|
+
toJSON: () => {
|
|
330
|
+
return {
|
|
331
|
+
indicationInterval: indicationInterval,
|
|
332
|
+
};
|
|
333
|
+
},
|
|
334
|
+
};
|
|
335
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
336
|
+
return jsonResults.result;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
protected getApiTypeFromStartAudioDeviceLoopbackTest(
|
|
340
|
+
indicationInterval: number
|
|
341
|
+
): string {
|
|
342
|
+
return 'AudioDeviceManager_startAudioDeviceLoopbackTest_46f8ab7';
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
stopAudioDeviceLoopbackTest(): number {
|
|
346
|
+
const apiType = this.getApiTypeFromStopAudioDeviceLoopbackTest();
|
|
347
|
+
const jsonParams = {};
|
|
348
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
349
|
+
return jsonResults.result;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
protected getApiTypeFromStopAudioDeviceLoopbackTest(): string {
|
|
353
|
+
return 'AudioDeviceManager_stopAudioDeviceLoopbackTest';
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
followSystemPlaybackDevice(enable: boolean): number {
|
|
357
|
+
const apiType = this.getApiTypeFromFollowSystemPlaybackDevice(enable);
|
|
358
|
+
const jsonParams = {
|
|
359
|
+
enable: enable,
|
|
360
|
+
toJSON: () => {
|
|
361
|
+
return {
|
|
362
|
+
enable: enable,
|
|
363
|
+
};
|
|
364
|
+
},
|
|
365
|
+
};
|
|
366
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
367
|
+
return jsonResults.result;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
protected getApiTypeFromFollowSystemPlaybackDevice(enable: boolean): string {
|
|
371
|
+
return 'AudioDeviceManager_followSystemPlaybackDevice_5039d15';
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
followSystemRecordingDevice(enable: boolean): number {
|
|
375
|
+
const apiType = this.getApiTypeFromFollowSystemRecordingDevice(enable);
|
|
376
|
+
const jsonParams = {
|
|
377
|
+
enable: enable,
|
|
378
|
+
toJSON: () => {
|
|
379
|
+
return {
|
|
380
|
+
enable: enable,
|
|
381
|
+
};
|
|
382
|
+
},
|
|
383
|
+
};
|
|
384
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
385
|
+
return jsonResults.result;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
protected getApiTypeFromFollowSystemRecordingDevice(enable: boolean): string {
|
|
389
|
+
return 'AudioDeviceManager_followSystemRecordingDevice_5039d15';
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
followSystemLoopbackDevice(enable: boolean): number {
|
|
393
|
+
const apiType = this.getApiTypeFromFollowSystemLoopbackDevice(enable);
|
|
394
|
+
const jsonParams = {
|
|
395
|
+
enable: enable,
|
|
396
|
+
toJSON: () => {
|
|
397
|
+
return {
|
|
398
|
+
enable: enable,
|
|
399
|
+
};
|
|
400
|
+
},
|
|
401
|
+
};
|
|
402
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
403
|
+
return jsonResults.result;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
protected getApiTypeFromFollowSystemLoopbackDevice(enable: boolean): string {
|
|
407
|
+
return 'AudioDeviceManager_followSystemLoopbackDevice_5039d15';
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
release(): void {
|
|
411
|
+
const apiType = this.getApiTypeFromRelease();
|
|
412
|
+
const jsonParams = {};
|
|
413
|
+
callIrisApi.call(this, apiType, jsonParams);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
protected getApiTypeFromRelease(): string {
|
|
417
|
+
return 'AudioDeviceManager_release';
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
getPlaybackDefaultDevice(): AudioDeviceInfo {
|
|
421
|
+
const apiType = this.getApiTypeFromGetPlaybackDefaultDevice();
|
|
422
|
+
const jsonParams = {};
|
|
423
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
424
|
+
return jsonResults.result;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
protected getApiTypeFromGetPlaybackDefaultDevice(): string {
|
|
428
|
+
return 'AudioDeviceManager_getPlaybackDefaultDevice';
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
getRecordingDefaultDevice(): AudioDeviceInfo {
|
|
432
|
+
const apiType = this.getApiTypeFromGetRecordingDefaultDevice();
|
|
433
|
+
const jsonParams = {};
|
|
434
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
435
|
+
return jsonResults.result;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
protected getApiTypeFromGetRecordingDefaultDevice(): string {
|
|
439
|
+
return 'AudioDeviceManager_getRecordingDefaultDevice';
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
import { callIrisApi } from '../internal/IrisApiEngine';
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { createCheckers } from 'ts-interface-checker';
|
|
2
|
+
|
|
3
|
+
import { IH265TranscoderObserver } from '../IAgoraH265Transcoder';
|
|
4
|
+
import { IH265TranscoderEvent } from '../extension/IAgoraH265TranscoderExtension';
|
|
5
|
+
import { IH265TranscoderImpl } from '../impl/IAgoraH265TranscoderImpl';
|
|
6
|
+
|
|
7
|
+
import IAgoraH265TranscoderTI from '../ti/IAgoraH265Transcoder-ti';
|
|
8
|
+
|
|
9
|
+
const checkers = createCheckers(IAgoraH265TranscoderTI);
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
DeviceEventEmitter,
|
|
13
|
+
EVENT_TYPE,
|
|
14
|
+
EventProcessor,
|
|
15
|
+
} from './IrisApiEngine';
|
|
16
|
+
|
|
17
|
+
export class H265TranscoderInternal extends IH265TranscoderImpl {
|
|
18
|
+
static _h265_transcoder_observers: IH265TranscoderObserver[] = [];
|
|
19
|
+
|
|
20
|
+
release() {
|
|
21
|
+
H265TranscoderInternal._h265_transcoder_observers = [];
|
|
22
|
+
this.removeAllListeners();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
_addListenerPreCheck<EventType extends keyof IH265TranscoderEvent>(
|
|
26
|
+
eventType: EventType
|
|
27
|
+
): boolean {
|
|
28
|
+
if (
|
|
29
|
+
checkers.IH265TranscoderObserver?.strictTest({
|
|
30
|
+
[eventType]: undefined,
|
|
31
|
+
})
|
|
32
|
+
) {
|
|
33
|
+
if (H265TranscoderInternal._h265_transcoder_observers.length === 0) {
|
|
34
|
+
this.registerTranscoderObserver({});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
addListener<EventType extends keyof IH265TranscoderEvent>(
|
|
41
|
+
eventType: EventType,
|
|
42
|
+
listener: IH265TranscoderEvent[EventType]
|
|
43
|
+
): void {
|
|
44
|
+
this._addListenerPreCheck(eventType);
|
|
45
|
+
const callback = (eventProcessor: EventProcessor<any>, data: any) => {
|
|
46
|
+
if (eventProcessor.type(data) !== EVENT_TYPE.IAgoraH265Transcoder) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
eventProcessor.func.map((it) => {
|
|
50
|
+
it({ [eventType]: listener }, eventType, data);
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
// @ts-ignore
|
|
54
|
+
listener!.agoraCallback = callback;
|
|
55
|
+
DeviceEventEmitter.addListener(eventType, callback);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
removeListener<EventType extends keyof IH265TranscoderEvent>(
|
|
59
|
+
eventType: EventType,
|
|
60
|
+
listener?: IH265TranscoderEvent[EventType]
|
|
61
|
+
) {
|
|
62
|
+
DeviceEventEmitter.removeListener(
|
|
63
|
+
eventType,
|
|
64
|
+
// @ts-ignore
|
|
65
|
+
listener?.agoraCallback ?? listener
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
removeAllListeners<EventType extends keyof IH265TranscoderEvent>(
|
|
70
|
+
eventType?: EventType
|
|
71
|
+
) {
|
|
72
|
+
DeviceEventEmitter.removeAllListeners(eventType);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
override registerTranscoderObserver(
|
|
76
|
+
observer: IH265TranscoderObserver
|
|
77
|
+
): number {
|
|
78
|
+
if (
|
|
79
|
+
!H265TranscoderInternal._h265_transcoder_observers.find(
|
|
80
|
+
(value) => value === observer
|
|
81
|
+
)
|
|
82
|
+
) {
|
|
83
|
+
H265TranscoderInternal._h265_transcoder_observers.push(observer);
|
|
84
|
+
}
|
|
85
|
+
return super.registerTranscoderObserver(observer);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
override unregisterTranscoderObserver(
|
|
89
|
+
observer: IH265TranscoderObserver
|
|
90
|
+
): number {
|
|
91
|
+
H265TranscoderInternal._h265_transcoder_observers =
|
|
92
|
+
H265TranscoderInternal._h265_transcoder_observers.filter(
|
|
93
|
+
(value) => value !== observer
|
|
94
|
+
);
|
|
95
|
+
return super.unregisterTranscoderObserver(observer);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IVideoFrameMetaInfo, MetaInfoKey } from '../AgoraMediaBase';
|
|
2
|
+
import { IVideoFrameMetaInfoImpl } from '../impl/AgoraMediaBaseImpl';
|
|
3
|
+
|
|
4
|
+
export class VideoFrameMetaInfoInternal extends IVideoFrameMetaInfoImpl {
|
|
5
|
+
private _videoFrameMetaInfo: IVideoFrameMetaInfo | undefined;
|
|
6
|
+
constructor(videoFrameMetaInfo: IVideoFrameMetaInfo | undefined) {
|
|
7
|
+
super();
|
|
8
|
+
this._videoFrameMetaInfo = videoFrameMetaInfo;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
override getMetaInfoStr(key: MetaInfoKey): string {
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
return this._videoFrameMetaInfo?.[key];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AudioDeviceInfo } from '../IAgoraRtcEngine';
|
|
2
|
+
import { IAudioDeviceManagerImpl } from '../impl/IAudioDeviceManagerImpl';
|
|
3
|
+
|
|
4
|
+
import { callIrisApi } from './IrisApiEngine';
|
|
5
|
+
|
|
6
|
+
export class AudioDeviceManagerInternal extends IAudioDeviceManagerImpl {
|
|
7
|
+
override getPlaybackDeviceInfo(): AudioDeviceInfo {
|
|
8
|
+
const apiType = this.getApiTypeFromGetPlaybackDeviceInfo();
|
|
9
|
+
const jsonParams = {};
|
|
10
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
11
|
+
return {
|
|
12
|
+
deviceId: jsonResults.deviceId,
|
|
13
|
+
deviceName: jsonResults.deviceName,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
override getRecordingDeviceInfo(): AudioDeviceInfo {
|
|
18
|
+
const apiType = this.getApiTypeFromGetRecordingDeviceInfo();
|
|
19
|
+
const jsonParams = {};
|
|
20
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
21
|
+
return {
|
|
22
|
+
deviceId: jsonResults.deviceId,
|
|
23
|
+
deviceName: jsonResults.deviceName,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
override getPlaybackDefaultDevice(): AudioDeviceInfo {
|
|
28
|
+
const apiType = this.getApiTypeFromGetPlaybackDefaultDevice();
|
|
29
|
+
const jsonParams = {};
|
|
30
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
31
|
+
return {
|
|
32
|
+
deviceId: jsonResults.deviceId,
|
|
33
|
+
deviceName: jsonResults.deviceName,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
override getRecordingDefaultDevice(): AudioDeviceInfo {
|
|
38
|
+
const apiType = this.getApiTypeFromGetRecordingDefaultDevice();
|
|
39
|
+
const jsonParams = {};
|
|
40
|
+
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
|
|
41
|
+
return {
|
|
42
|
+
deviceId: jsonResults.deviceId,
|
|
43
|
+
deviceName: jsonResults.deviceName,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|