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,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
3
|
+
*/
|
|
4
|
+
import * as t from "ts-interface-checker";
|
|
5
|
+
// tslint:disable:object-literal-key-quotes
|
|
6
|
+
|
|
7
|
+
export const IAudioPcmFrameSink = t.iface([], {
|
|
8
|
+
"onFrame": t.opt(t.func("void", t.param("frame", "AudioPcmFrame"))),
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export const IAudioFrameObserverBase = t.iface([], {
|
|
12
|
+
"onRecordAudioFrame": t.opt(t.func("void", t.param("channelId", "string"), t.param("audioFrame", "AudioFrame"))),
|
|
13
|
+
"onPlaybackAudioFrame": t.opt(t.func("void", t.param("channelId", "string"), t.param("audioFrame", "AudioFrame"))),
|
|
14
|
+
"onMixedAudioFrame": t.opt(t.func("void", t.param("channelId", "string"), t.param("audioFrame", "AudioFrame"))),
|
|
15
|
+
"onEarMonitoringAudioFrame": t.opt(t.func("void", t.param("audioFrame", "AudioFrame"))),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const IAudioFrameObserver = t.iface(["IAudioFrameObserverBase"], {
|
|
19
|
+
"onPlaybackAudioFrameBeforeMixing": t.opt(t.func("void", t.param("channelId", "string"), t.param("uid", "number"), t.param("audioFrame", "AudioFrame"))),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export const IAudioSpectrumObserver = t.iface([], {
|
|
23
|
+
"onLocalAudioSpectrum": t.opt(t.func("void", t.param("data", "AudioSpectrumData"))),
|
|
24
|
+
"onRemoteAudioSpectrum": t.opt(t.func("void", t.param("spectrums", t.array("UserAudioSpectrumInfo")), t.param("spectrumNumber", "number"))),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export const IVideoEncodedFrameObserver = t.iface([], {
|
|
28
|
+
"onEncodedVideoFrameReceived": t.opt(t.func("void", t.param("uid", "number"), t.param("imageBuffer", "Uint8Array"), t.param("length", "number"), t.param("videoEncodedFrameInfo", "EncodedVideoFrameInfo"))),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export const IVideoFrameObserver = t.iface([], {
|
|
32
|
+
"onCaptureVideoFrame": t.opt(t.func("void", t.param("sourceType", "VideoSourceType"), t.param("videoFrame", "VideoFrame"))),
|
|
33
|
+
"onPreEncodeVideoFrame": t.opt(t.func("void", t.param("sourceType", "VideoSourceType"), t.param("videoFrame", "VideoFrame"))),
|
|
34
|
+
"onMediaPlayerVideoFrame": t.opt(t.func("void", t.param("videoFrame", "VideoFrame"), t.param("mediaPlayerId", "number"))),
|
|
35
|
+
"onRenderVideoFrame": t.opt(t.func("void", t.param("channelId", "string"), t.param("remoteUid", "number"), t.param("videoFrame", "VideoFrame"))),
|
|
36
|
+
"onTranscodedVideoFrame": t.opt(t.func("void", t.param("videoFrame", "VideoFrame"))),
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export const IFaceInfoObserver = t.iface([], {
|
|
40
|
+
"onFaceInfo": t.opt(t.func("void", t.param("outFaceInfo", "string"))),
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export const IMediaRecorderObserver = t.iface([], {
|
|
44
|
+
"onRecorderStateChanged": t.opt(t.func("void", t.param("channelId", "string"), t.param("uid", "number"), t.param("state", "RecorderState"), t.param("reason", "RecorderReasonCode"))),
|
|
45
|
+
"onRecorderInfoUpdated": t.opt(t.func("void", t.param("channelId", "string"), t.param("uid", "number"), t.param("info", "RecorderInfo"))),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const exportedTypeSuite: t.ITypeSuite = {
|
|
49
|
+
IAudioPcmFrameSink,
|
|
50
|
+
IAudioFrameObserverBase,
|
|
51
|
+
IAudioFrameObserver,
|
|
52
|
+
IAudioSpectrumObserver,
|
|
53
|
+
IVideoEncodedFrameObserver,
|
|
54
|
+
IVideoFrameObserver,
|
|
55
|
+
IFaceInfoObserver,
|
|
56
|
+
IMediaRecorderObserver,
|
|
57
|
+
};
|
|
58
|
+
export default exportedTypeSuite;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
3
|
+
*/
|
|
4
|
+
import * as t from "ts-interface-checker";
|
|
5
|
+
// tslint:disable:object-literal-key-quotes
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const exportedTypeSuite: t.ITypeSuite = {
|
|
10
|
+
};
|
|
11
|
+
export default exportedTypeSuite;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
3
|
+
*/
|
|
4
|
+
import * as t from "ts-interface-checker";
|
|
5
|
+
// tslint:disable:object-literal-key-quotes
|
|
6
|
+
|
|
7
|
+
export const IH265TranscoderObserver = t.iface([], {
|
|
8
|
+
"onEnableTranscode": t.opt(t.func("void", t.param("result", "H265TranscodeResult"))),
|
|
9
|
+
"onQueryChannel": t.opt(t.func("void", t.param("result", "H265TranscodeResult"), t.param("originChannel", "string"), t.param("transcodeChannel", "string"))),
|
|
10
|
+
"onTriggerTranscode": t.opt(t.func("void", t.param("result", "H265TranscodeResult"))),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const exportedTypeSuite: t.ITypeSuite = {
|
|
14
|
+
IH265TranscoderObserver,
|
|
15
|
+
};
|
|
16
|
+
export default exportedTypeSuite;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
3
|
+
*/
|
|
4
|
+
import * as t from "ts-interface-checker";
|
|
5
|
+
// tslint:disable:object-literal-key-quotes
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const exportedTypeSuite: t.ITypeSuite = {
|
|
10
|
+
};
|
|
11
|
+
export default exportedTypeSuite;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
3
|
+
*/
|
|
4
|
+
import * as t from "ts-interface-checker";
|
|
5
|
+
// tslint:disable:object-literal-key-quotes
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const exportedTypeSuite: t.ITypeSuite = {
|
|
10
|
+
};
|
|
11
|
+
export default exportedTypeSuite;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
3
|
+
*/
|
|
4
|
+
import * as t from "ts-interface-checker";
|
|
5
|
+
// tslint:disable:object-literal-key-quotes
|
|
6
|
+
|
|
7
|
+
export const IMediaPlayerVideoFrameObserver = t.iface([], {
|
|
8
|
+
"onFrame": t.opt(t.func("void", t.param("frame", "VideoFrame"))),
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const exportedTypeSuite: t.ITypeSuite = {
|
|
12
|
+
IMediaPlayerVideoFrameObserver,
|
|
13
|
+
};
|
|
14
|
+
export default exportedTypeSuite;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
3
|
+
*/
|
|
4
|
+
import * as t from "ts-interface-checker";
|
|
5
|
+
// tslint:disable:object-literal-key-quotes
|
|
6
|
+
|
|
7
|
+
export const IMediaPlayerSourceObserver = t.iface([], {
|
|
8
|
+
"onPlayerSourceStateChanged": t.opt(t.func("void", t.param("state", "MediaPlayerState"), t.param("reason", "MediaPlayerReason"))),
|
|
9
|
+
"onPositionChanged": t.opt(t.func("void", t.param("positionMs", "number"), t.param("timestampMs", "number"))),
|
|
10
|
+
"onPlayerEvent": t.opt(t.func("void", t.param("eventCode", "MediaPlayerEvent"), t.param("elapsedTime", "number"), t.param("message", "string"))),
|
|
11
|
+
"onMetaData": t.opt(t.func("void", t.param("data", "Uint8Array"), t.param("length", "number"))),
|
|
12
|
+
"onPlayBufferUpdated": t.opt(t.func("void", t.param("playCachedBuffer", "number"))),
|
|
13
|
+
"onPreloadEvent": t.opt(t.func("void", t.param("src", "string"), t.param("event", "PlayerPreloadEvent"))),
|
|
14
|
+
"onCompleted": t.opt(t.func("void")),
|
|
15
|
+
"onAgoraCDNTokenWillExpire": t.opt(t.func("void")),
|
|
16
|
+
"onPlayerSrcInfoChanged": t.opt(t.func("void", t.param("from", "SrcInfo"), t.param("to", "SrcInfo"))),
|
|
17
|
+
"onPlayerInfoUpdated": t.opt(t.func("void", t.param("info", "PlayerUpdatedInfo"))),
|
|
18
|
+
"onPlayerCacheStats": t.opt(t.func("void", t.param("stats", "CacheStatistics"))),
|
|
19
|
+
"onPlayerPlaybackStats": t.opt(t.func("void", t.param("stats", "PlayerPlaybackStats"))),
|
|
20
|
+
"onAudioVolumeIndication": t.opt(t.func("void", t.param("volume", "number"))),
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const exportedTypeSuite: t.ITypeSuite = {
|
|
24
|
+
IMediaPlayerSourceObserver,
|
|
25
|
+
};
|
|
26
|
+
export default exportedTypeSuite;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
3
|
+
*/
|
|
4
|
+
import * as t from "ts-interface-checker";
|
|
5
|
+
// tslint:disable:object-literal-key-quotes
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const exportedTypeSuite: t.ITypeSuite = {
|
|
10
|
+
};
|
|
11
|
+
export default exportedTypeSuite;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
3
|
+
*/
|
|
4
|
+
import * as t from "ts-interface-checker";
|
|
5
|
+
// tslint:disable:object-literal-key-quotes
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const exportedTypeSuite: t.ITypeSuite = {
|
|
10
|
+
};
|
|
11
|
+
export default exportedTypeSuite;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
3
|
+
*/
|
|
4
|
+
import * as t from "ts-interface-checker";
|
|
5
|
+
// tslint:disable:object-literal-key-quotes
|
|
6
|
+
|
|
7
|
+
export const IMusicContentCenterEventHandler = t.iface([], {
|
|
8
|
+
"onMusicChartsResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("result", t.array("MusicChartInfo")), t.param("reason", "MusicContentCenterStateReason"))),
|
|
9
|
+
"onMusicCollectionResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("result", "MusicCollection"), t.param("reason", "MusicContentCenterStateReason"))),
|
|
10
|
+
"onLyricResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("songCode", "number"), t.param("lyricUrl", "string"), t.param("reason", "MusicContentCenterStateReason"))),
|
|
11
|
+
"onSongSimpleInfoResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("songCode", "number"), t.param("simpleInfo", "string"), t.param("reason", "MusicContentCenterStateReason"))),
|
|
12
|
+
"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"))),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const exportedTypeSuite: t.ITypeSuite = {
|
|
16
|
+
IMusicContentCenterEventHandler,
|
|
17
|
+
};
|
|
18
|
+
export default exportedTypeSuite;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
3
|
+
*/
|
|
4
|
+
import * as t from "ts-interface-checker";
|
|
5
|
+
// tslint:disable:object-literal-key-quotes
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const exportedTypeSuite: t.ITypeSuite = {
|
|
10
|
+
};
|
|
11
|
+
export default exportedTypeSuite;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
3
|
+
*/
|
|
4
|
+
import * as t from "ts-interface-checker";
|
|
5
|
+
// tslint:disable:object-literal-key-quotes
|
|
6
|
+
|
|
7
|
+
export const IRtcEngineEventHandler = t.iface([], {
|
|
8
|
+
"onJoinChannelSuccess": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("elapsed", "number"))),
|
|
9
|
+
"onRejoinChannelSuccess": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("elapsed", "number"))),
|
|
10
|
+
"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"))),
|
|
11
|
+
"onError": t.opt(t.func("void", t.param("err", "ErrorCodeType"), t.param("msg", "string"))),
|
|
12
|
+
"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"))),
|
|
13
|
+
"onLastmileProbeResult": t.opt(t.func("void", t.param("result", "LastmileProbeResult"))),
|
|
14
|
+
"onAudioVolumeIndication": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("speakers", t.array("AudioVolumeInfo")), t.param("speakerNumber", "number"), t.param("totalVolume", "number"))),
|
|
15
|
+
"onLeaveChannel": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("stats", "RtcStats"))),
|
|
16
|
+
"onRtcStats": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("stats", "RtcStats"))),
|
|
17
|
+
"onAudioDeviceStateChanged": t.opt(t.func("void", t.param("deviceId", "string"), t.param("deviceType", "MediaDeviceType"), t.param("deviceState", "MediaDeviceStateType"))),
|
|
18
|
+
"onAudioMixingPositionChanged": t.opt(t.func("void", t.param("position", "number"))),
|
|
19
|
+
"onAudioMixingFinished": t.opt(t.func("void")),
|
|
20
|
+
"onAudioEffectFinished": t.opt(t.func("void", t.param("soundId", "number"))),
|
|
21
|
+
"onVideoDeviceStateChanged": t.opt(t.func("void", t.param("deviceId", "string"), t.param("deviceType", "MediaDeviceType"), t.param("deviceState", "MediaDeviceStateType"))),
|
|
22
|
+
"onNetworkQuality": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("txQuality", "QualityType"), t.param("rxQuality", "QualityType"))),
|
|
23
|
+
"onIntraRequestReceived": t.opt(t.func("void", t.param("connection", "RtcConnection"))),
|
|
24
|
+
"onUplinkNetworkInfoUpdated": t.opt(t.func("void", t.param("info", "UplinkNetworkInfo"))),
|
|
25
|
+
"onDownlinkNetworkInfoUpdated": t.opt(t.func("void", t.param("info", "DownlinkNetworkInfo"))),
|
|
26
|
+
"onLastmileQuality": t.opt(t.func("void", t.param("quality", "QualityType"))),
|
|
27
|
+
"onFirstLocalVideoFrame": t.opt(t.func("void", t.param("source", "VideoSourceType"), t.param("width", "number"), t.param("height", "number"), t.param("elapsed", "number"))),
|
|
28
|
+
"onFirstLocalVideoFramePublished": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("elapsed", "number"))),
|
|
29
|
+
"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"))),
|
|
30
|
+
"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"))),
|
|
31
|
+
"onLocalVideoStateChanged": t.opt(t.func("void", t.param("source", "VideoSourceType"), t.param("state", "LocalVideoStreamState"), t.param("reason", "LocalVideoStreamReason"))),
|
|
32
|
+
"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"))),
|
|
33
|
+
"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"))),
|
|
34
|
+
"onUserJoined": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("elapsed", "number"))),
|
|
35
|
+
"onUserOffline": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("reason", "UserOfflineReasonType"))),
|
|
36
|
+
"onUserMuteAudio": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("muted", "boolean"))),
|
|
37
|
+
"onUserMuteVideo": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("muted", "boolean"))),
|
|
38
|
+
"onUserEnableVideo": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("enabled", "boolean"))),
|
|
39
|
+
"onUserStateChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("state", "number"))),
|
|
40
|
+
"onUserEnableLocalVideo": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("enabled", "boolean"))),
|
|
41
|
+
"onRemoteAudioStats": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("stats", "RemoteAudioStats"))),
|
|
42
|
+
"onLocalAudioStats": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("stats", "LocalAudioStats"))),
|
|
43
|
+
"onLocalVideoStats": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("stats", "LocalVideoStats"))),
|
|
44
|
+
"onRemoteVideoStats": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("stats", "RemoteVideoStats"))),
|
|
45
|
+
"onCameraReady": t.opt(t.func("void")),
|
|
46
|
+
"onCameraFocusAreaChanged": t.opt(t.func("void", t.param("x", "number"), t.param("y", "number"), t.param("width", "number"), t.param("height", "number"))),
|
|
47
|
+
"onCameraExposureAreaChanged": t.opt(t.func("void", t.param("x", "number"), t.param("y", "number"), t.param("width", "number"), t.param("height", "number"))),
|
|
48
|
+
"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"))),
|
|
49
|
+
"onVideoStopped": t.opt(t.func("void")),
|
|
50
|
+
"onAudioMixingStateChanged": t.opt(t.func("void", t.param("state", "AudioMixingStateType"), t.param("reason", "AudioMixingReasonType"))),
|
|
51
|
+
"onRhythmPlayerStateChanged": t.opt(t.func("void", t.param("state", "RhythmPlayerStateType"), t.param("reason", "RhythmPlayerReason"))),
|
|
52
|
+
"onConnectionLost": t.opt(t.func("void", t.param("connection", "RtcConnection"))),
|
|
53
|
+
"onConnectionInterrupted": t.opt(t.func("void", t.param("connection", "RtcConnection"))),
|
|
54
|
+
"onConnectionBanned": t.opt(t.func("void", t.param("connection", "RtcConnection"))),
|
|
55
|
+
"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"))),
|
|
56
|
+
"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"))),
|
|
57
|
+
"onRequestToken": t.opt(t.func("void", t.param("connection", "RtcConnection"))),
|
|
58
|
+
"onTokenPrivilegeWillExpire": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("token", "string"))),
|
|
59
|
+
"onLicenseValidationFailure": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("reason", "LicenseErrorType"))),
|
|
60
|
+
"onFirstLocalAudioFramePublished": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("elapsed", "number"))),
|
|
61
|
+
"onFirstRemoteAudioDecoded": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("uid", "number"), t.param("elapsed", "number"))),
|
|
62
|
+
"onFirstRemoteAudioFrame": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("userId", "number"), t.param("elapsed", "number"))),
|
|
63
|
+
"onLocalAudioStateChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("state", "LocalAudioStreamState"), t.param("reason", "LocalAudioStreamReason"))),
|
|
64
|
+
"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"))),
|
|
65
|
+
"onActiveSpeaker": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("uid", "number"))),
|
|
66
|
+
"onContentInspectResult": t.opt(t.func("void", t.param("result", "ContentInspectResult"))),
|
|
67
|
+
"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"))),
|
|
68
|
+
"onClientRoleChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("oldRole", "ClientRoleType"), t.param("newRole", "ClientRoleType"), t.param("newRoleOptions", "ClientRoleOptions"))),
|
|
69
|
+
"onClientRoleChangeFailed": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("reason", "ClientRoleChangeFailedReason"), t.param("currentRole", "ClientRoleType"))),
|
|
70
|
+
"onAudioDeviceVolumeChanged": t.opt(t.func("void", t.param("deviceType", "MediaDeviceType"), t.param("volume", "number"), t.param("muted", "boolean"))),
|
|
71
|
+
"onRtmpStreamingStateChanged": t.opt(t.func("void", t.param("url", "string"), t.param("state", "RtmpStreamPublishState"), t.param("reason", "RtmpStreamPublishReason"))),
|
|
72
|
+
"onRtmpStreamingEvent": t.opt(t.func("void", t.param("url", "string"), t.param("eventCode", "RtmpStreamingEvent"))),
|
|
73
|
+
"onTranscodingUpdated": t.opt(t.func("void")),
|
|
74
|
+
"onAudioRoutingChanged": t.opt(t.func("void", t.param("routing", "number"))),
|
|
75
|
+
"onChannelMediaRelayStateChanged": t.opt(t.func("void", t.param("state", "ChannelMediaRelayState"), t.param("code", "ChannelMediaRelayError"))),
|
|
76
|
+
"onLocalPublishFallbackToAudioOnly": t.opt(t.func("void", t.param("isFallbackOrRecover", "boolean"))),
|
|
77
|
+
"onRemoteSubscribeFallbackToAudioOnly": t.opt(t.func("void", t.param("uid", "number"), t.param("isFallbackOrRecover", "boolean"))),
|
|
78
|
+
"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"))),
|
|
79
|
+
"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"))),
|
|
80
|
+
"onConnectionStateChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("state", "ConnectionStateType"), t.param("reason", "ConnectionChangedReasonType"))),
|
|
81
|
+
"onWlAccMessage": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("reason", "WlaccMessageReason"), t.param("action", "WlaccSuggestAction"), t.param("wlAccMsg", "string"))),
|
|
82
|
+
"onWlAccStats": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("currentStats", "WlAccStats"), t.param("averageStats", "WlAccStats"))),
|
|
83
|
+
"onNetworkTypeChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("type", "NetworkType"))),
|
|
84
|
+
"onEncryptionError": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("errorType", "EncryptionErrorType"))),
|
|
85
|
+
"onPermissionError": t.opt(t.func("void", t.param("permissionType", "PermissionType"))),
|
|
86
|
+
"onLocalUserRegistered": t.opt(t.func("void", t.param("uid", "number"), t.param("userAccount", "string"))),
|
|
87
|
+
"onUserInfoUpdated": t.opt(t.func("void", t.param("uid", "number"), t.param("info", "UserInfo"))),
|
|
88
|
+
"onUserAccountUpdated": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("remoteUserAccount", "string"))),
|
|
89
|
+
"onVideoRenderingTracingResult": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("uid", "number"), t.param("currentEvent", "MediaTraceEvent"), t.param("tracingInfo", "VideoRenderingTracingInfo"))),
|
|
90
|
+
"onLocalVideoTranscoderError": t.opt(t.func("void", t.param("stream", "TranscodingVideoStream"), t.param("error", "VideoTranscoderError"))),
|
|
91
|
+
"onUploadLogResult": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("requestId", "string"), t.param("success", "boolean"), t.param("reason", "UploadErrorReason"))),
|
|
92
|
+
"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"))),
|
|
93
|
+
"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"))),
|
|
94
|
+
"onAudioPublishStateChanged": t.opt(t.func("void", t.param("channel", "string"), t.param("oldState", "StreamPublishState"), t.param("newState", "StreamPublishState"), t.param("elapseSinceLastState", "number"))),
|
|
95
|
+
"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"))),
|
|
96
|
+
"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")))),
|
|
97
|
+
"onAudioMetadataReceived": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("uid", "number"), t.param("metadata", "string"), t.param("length", "number"))),
|
|
98
|
+
"onExtensionEventWithContext": t.opt(t.func("void", t.param("context", "ExtensionContext"), t.param("key", "string"), t.param("value", "string"))),
|
|
99
|
+
"onExtensionStartedWithContext": t.opt(t.func("void", t.param("context", "ExtensionContext"))),
|
|
100
|
+
"onExtensionStoppedWithContext": t.opt(t.func("void", t.param("context", "ExtensionContext"))),
|
|
101
|
+
"onExtensionErrorWithContext": t.opt(t.func("void", t.param("context", "ExtensionContext"), t.param("error", "number"), t.param("message", "string"))),
|
|
102
|
+
"onSetRtmFlagResult": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("code", "number"))),
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
export const IMetadataObserver = t.iface([], {
|
|
106
|
+
"onMetadataReceived": t.opt(t.func("void", t.param("metadata", "Metadata"))),
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
export const IDirectCdnStreamingEventHandler = t.iface([], {
|
|
110
|
+
"onDirectCdnStreamingStateChanged": t.opt(t.func("void", t.param("state", "DirectCdnStreamingState"), t.param("reason", "DirectCdnStreamingReason"), t.param("message", "string"))),
|
|
111
|
+
"onDirectCdnStreamingStats": t.opt(t.func("void", t.param("stats", "DirectCdnStreamingStats"))),
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
const exportedTypeSuite: t.ITypeSuite = {
|
|
115
|
+
IRtcEngineEventHandler,
|
|
116
|
+
IMetadataObserver,
|
|
117
|
+
IDirectCdnStreamingEventHandler,
|
|
118
|
+
};
|
|
119
|
+
export default exportedTypeSuite;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
3
|
+
*/
|
|
4
|
+
import * as t from "ts-interface-checker";
|
|
5
|
+
// tslint:disable:object-literal-key-quotes
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const exportedTypeSuite: t.ITypeSuite = {
|
|
10
|
+
};
|
|
11
|
+
export default exportedTypeSuite;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
3
|
+
*/
|
|
4
|
+
import * as t from "ts-interface-checker";
|
|
5
|
+
// tslint:disable:object-literal-key-quotes
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const exportedTypeSuite: t.ITypeSuite = {
|
|
10
|
+
};
|
|
11
|
+
export default exportedTypeSuite;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module was automatically generated by `ts-interface-builder`
|
|
3
|
+
*/
|
|
4
|
+
import * as t from "ts-interface-checker";
|
|
5
|
+
// tslint:disable:object-literal-key-quotes
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const exportedTypeSuite: t.ITypeSuite = {
|
|
10
|
+
};
|
|
11
|
+
export default exportedTypeSuite;
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { VideoMirrorModeType, VideoViewSetupMode } from '../Private/AgoraBase';
|
|
2
|
+
import {
|
|
3
|
+
RenderModeType,
|
|
4
|
+
VideoModulePosition,
|
|
5
|
+
VideoSourceType,
|
|
6
|
+
} from '../Private/AgoraMediaBase';
|
|
7
|
+
import { AgoraEnv } from '../Utils';
|
|
8
|
+
|
|
9
|
+
const VIDEO_SOURCE_TYPE_STRING = 'video-source-type';
|
|
10
|
+
const UID_STRING = 'uid';
|
|
11
|
+
const CHANNEL_ID_STRING = 'channel-id';
|
|
12
|
+
const POSITION_STRING = 'position';
|
|
13
|
+
const RENDERER_CONTENT_MODE_STRING = 'renderer-content-mode';
|
|
14
|
+
const RENDERER_MIRROR_STRING = 'renderer-mirror';
|
|
15
|
+
|
|
16
|
+
const observedAttributes = [
|
|
17
|
+
VIDEO_SOURCE_TYPE_STRING,
|
|
18
|
+
UID_STRING,
|
|
19
|
+
CHANNEL_ID_STRING,
|
|
20
|
+
POSITION_STRING,
|
|
21
|
+
RENDERER_CONTENT_MODE_STRING,
|
|
22
|
+
RENDERER_MIRROR_STRING,
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
declare global {
|
|
26
|
+
/**
|
|
27
|
+
* Attributes of the Agora custom element.
|
|
28
|
+
* You can use this custom element as follows:<agora-view video-source-type="{VideoSourceType.VideoSourceCamera}" channel-id="" uid="{0}" position="{VideoModulePosition.PositionPreRenderer}"></agora-view>
|
|
29
|
+
*/
|
|
30
|
+
interface AgoraView {
|
|
31
|
+
/**
|
|
32
|
+
* The type of the video source. See VideoSourceType .
|
|
33
|
+
*/
|
|
34
|
+
'video-source-type': VideoSourceType;
|
|
35
|
+
/**
|
|
36
|
+
* The ID of the remote user.
|
|
37
|
+
*/
|
|
38
|
+
'uid': number;
|
|
39
|
+
/**
|
|
40
|
+
* The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters:
|
|
41
|
+
* All lowercase English letters: a to z.
|
|
42
|
+
* All uppercase English letters: A to Z.
|
|
43
|
+
* All numeric characters: 0 to 9.
|
|
44
|
+
* Space
|
|
45
|
+
* "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
|
|
46
|
+
*/
|
|
47
|
+
'channel-id': string;
|
|
48
|
+
/**
|
|
49
|
+
* The frame position of the video observer.
|
|
50
|
+
*/
|
|
51
|
+
'position': VideoModulePosition;
|
|
52
|
+
/**
|
|
53
|
+
* The video display mode.
|
|
54
|
+
*/
|
|
55
|
+
'renderer-content-mode': RenderModeType;
|
|
56
|
+
/**
|
|
57
|
+
* Whether to enable mirror mode when rendering video: true: Enable mirror mode.false: Do not enable mirror mode.
|
|
58
|
+
*/
|
|
59
|
+
'renderer-mirror': boolean;
|
|
60
|
+
/**
|
|
61
|
+
* The inline style of elements. See style .
|
|
62
|
+
*/
|
|
63
|
+
'style': any;
|
|
64
|
+
}
|
|
65
|
+
namespace JSX {
|
|
66
|
+
/**
|
|
67
|
+
* The custom HTML elements defined by Agora.
|
|
68
|
+
*/
|
|
69
|
+
interface IntrinsicElements {
|
|
70
|
+
/**
|
|
71
|
+
* The name of the custom element, which supports rendering an AgoraView or HTMLElement object.
|
|
72
|
+
*/
|
|
73
|
+
'agora-view': AgoraView | HTMLElement;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export default class AgoraView extends HTMLElement {
|
|
79
|
+
isConnectedCallback = false;
|
|
80
|
+
static get observedAttributes() {
|
|
81
|
+
return observedAttributes;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
get sourceType(): VideoSourceType {
|
|
85
|
+
const number = Number(this.getAttribute(VIDEO_SOURCE_TYPE_STRING));
|
|
86
|
+
return isNaN(number) ? 0 : number;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
set sourceType(val) {
|
|
90
|
+
if (val) {
|
|
91
|
+
this.setAttribute(VIDEO_SOURCE_TYPE_STRING, String(val));
|
|
92
|
+
} else {
|
|
93
|
+
this.removeAttribute(VIDEO_SOURCE_TYPE_STRING);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
get uid(): number {
|
|
98
|
+
const number = Number(this.getAttribute(UID_STRING));
|
|
99
|
+
return isNaN(number) ? 0 : number;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
set uid(val) {
|
|
103
|
+
if (val) {
|
|
104
|
+
this.setAttribute(UID_STRING, String(val));
|
|
105
|
+
} else {
|
|
106
|
+
this.removeAttribute(UID_STRING);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
get channelId(): string {
|
|
111
|
+
return this.getAttribute(CHANNEL_ID_STRING) || '';
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
set channelId(val) {
|
|
115
|
+
if (val) {
|
|
116
|
+
this.setAttribute(CHANNEL_ID_STRING, val);
|
|
117
|
+
} else {
|
|
118
|
+
this.removeAttribute(CHANNEL_ID_STRING);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
get position(): VideoModulePosition {
|
|
123
|
+
const number = Number(this.getAttribute(POSITION_STRING));
|
|
124
|
+
return isNaN(number)
|
|
125
|
+
? VideoModulePosition.PositionPreEncoder |
|
|
126
|
+
VideoModulePosition.PositionPreRenderer
|
|
127
|
+
: number;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
set position(val) {
|
|
131
|
+
if (val) {
|
|
132
|
+
this.setAttribute(POSITION_STRING, String(val));
|
|
133
|
+
} else {
|
|
134
|
+
this.removeAttribute(POSITION_STRING);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
get renderMode(): RenderModeType {
|
|
139
|
+
const number = Number(
|
|
140
|
+
this.getAttribute(RENDERER_CONTENT_MODE_STRING) ||
|
|
141
|
+
RenderModeType.RenderModeFit
|
|
142
|
+
);
|
|
143
|
+
return isNaN(number) ? RenderModeType.RenderModeFit : number;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
set renderMode(val) {
|
|
147
|
+
if (val) {
|
|
148
|
+
this.setAttribute(RENDERER_CONTENT_MODE_STRING, String(val));
|
|
149
|
+
} else {
|
|
150
|
+
this.removeAttribute(RENDERER_CONTENT_MODE_STRING);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
get renderMirror(): boolean {
|
|
155
|
+
return this.getAttribute(RENDERER_MIRROR_STRING) === 'true';
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
set renderMirror(val) {
|
|
159
|
+
if (val) {
|
|
160
|
+
this.setAttribute(RENDERER_MIRROR_STRING, String(val));
|
|
161
|
+
} else {
|
|
162
|
+
this.removeAttribute(RENDERER_MIRROR_STRING);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
constructor() {
|
|
167
|
+
super();
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
initializeRender = () => {
|
|
171
|
+
const { channelId, uid, sourceType, position, renderMode, renderMirror } =
|
|
172
|
+
this;
|
|
173
|
+
AgoraEnv.AgoraRendererManager?.addOrRemoveRenderer({
|
|
174
|
+
sourceType,
|
|
175
|
+
view: this,
|
|
176
|
+
uid,
|
|
177
|
+
channelId,
|
|
178
|
+
position,
|
|
179
|
+
renderMode,
|
|
180
|
+
mirrorMode: renderMirror
|
|
181
|
+
? VideoMirrorModeType.VideoMirrorModeEnabled
|
|
182
|
+
: VideoMirrorModeType.VideoMirrorModeDisabled,
|
|
183
|
+
setupMode: VideoViewSetupMode.VideoViewSetupReplace,
|
|
184
|
+
});
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
destroyRender = () => {
|
|
188
|
+
const { channelId, uid, sourceType, position } = this;
|
|
189
|
+
AgoraEnv.AgoraRendererManager?.removeRendererFromCache({
|
|
190
|
+
channelId,
|
|
191
|
+
position,
|
|
192
|
+
uid,
|
|
193
|
+
sourceType,
|
|
194
|
+
view: this,
|
|
195
|
+
});
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
connectedCallback() {
|
|
199
|
+
this.isConnectedCallback = true;
|
|
200
|
+
this.initializeRender();
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
attributeChangedCallback(attrName: string, oldVal: any, newVal: any) {
|
|
204
|
+
if (!this.isConnectedCallback) {
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
const isSetRenderOption = [
|
|
208
|
+
RENDERER_CONTENT_MODE_STRING,
|
|
209
|
+
RENDERER_MIRROR_STRING,
|
|
210
|
+
].includes(attrName);
|
|
211
|
+
|
|
212
|
+
if (isSetRenderOption) {
|
|
213
|
+
AgoraEnv.AgoraRendererManager?.setRendererContext({
|
|
214
|
+
view: this,
|
|
215
|
+
renderMode: this.renderMode,
|
|
216
|
+
mirrorMode: this.renderMirror
|
|
217
|
+
? VideoMirrorModeType.VideoMirrorModeEnabled
|
|
218
|
+
: VideoMirrorModeType.VideoMirrorModeDisabled,
|
|
219
|
+
});
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
const isNeedReInitialize = observedAttributes.includes(attrName);
|
|
223
|
+
if (!isNeedReInitialize) {
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
this.initializeRender();
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
disconnectedCallback() {
|
|
230
|
+
this.isConnectedCallback = false;
|
|
231
|
+
this.destroyRender();
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
window.customElements.define('agora-view', AgoraView);
|