agora-electron-sdk 4.5.2 → 4.5.3-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 +37 -0
- package/README.md +6 -3
- package/js/example/src/renderer/examples/advanced/VideoEffect/videoEffectHelpers.js +308 -0
- package/js/{AgoraSdk.js → ts/AgoraSdk.js} +2 -12
- package/js/{Decoder → ts/Decoder}/index.js +1 -1
- package/js/{Private → ts/Private}/AgoraBase.js +829 -674
- package/js/{Private → ts/Private}/AgoraMediaBase.js +154 -151
- package/js/{Private → ts/Private}/AgoraMediaPlayerTypes.js +58 -54
- package/js/{Private → ts/Private}/IAgoraLog.js +13 -13
- package/js/{Private → ts/Private}/IAgoraMediaEngine.js +4 -4
- package/js/{Private → ts/Private}/IAgoraMediaPlayer.js +2 -2
- package/js/{Private → ts/Private}/IAgoraMusicContentCenter.js +1 -1
- package/js/{Private → ts/Private}/IAgoraRhythmPlayer.js +13 -13
- package/js/{Private → ts/Private}/IAgoraRtcEngine.js +150 -94
- package/js/{Private → ts/Private}/IAgoraRtcEngineEx.js +3 -3
- package/js/{Private → ts/Private}/IAgoraSpatialAudio.js +4 -4
- package/js/{Private → ts/Private}/IAudioDeviceManager.js +2 -2
- package/js/{Private → ts/Private}/impl/IAgoraMediaPlayerImpl.js +10 -0
- package/js/{Private → ts/Private}/impl/IAgoraRtcEngineExImpl.js +74 -0
- package/js/{Private → ts/Private}/impl/IAgoraRtcEngineImpl.js +233 -1
- package/js/{Private → ts/Private}/internal/IrisApiEngine.js +45 -0
- package/js/{Private → ts/Private}/internal/RtcEngineExInternal.js +74 -4
- package/js/ts/Private/internal/VideoEffectObjectInternal.js +14 -0
- package/js/{Private → ts/Private}/ti/IAgoraRtcEngine-ti.js +2 -0
- package/js/{Renderer → ts/Renderer}/AgoraView.js +19 -2
- package/js/{Renderer → ts/Renderer}/IRenderer.js +7 -4
- package/js/{Renderer → ts/Renderer}/IRendererCache.js +17 -1
- package/js/ts/Renderer/RendererCache.js +252 -0
- package/js/{Renderer → ts/Renderer}/RendererManager.js +13 -64
- package/js/{Renderer → ts/Renderer}/WebCodecsRenderer/index.js +5 -5
- package/js/{Renderer → ts/Renderer}/WebCodecsRendererCache.js +13 -1
- package/js/{Renderer → ts/Renderer}/WebGLRenderer/index.js +179 -26
- package/js/{Renderer → ts/Renderer}/YUVCanvasRenderer/index.js +12 -5
- package/js/{Utils.js → ts/Utils.js} +7 -7
- package/package.json +25 -12
- package/scripts/checkElectron.js +4 -2
- package/scripts/download.js +102 -0
- package/scripts/downloadPrebuild.js +2 -1
- package/scripts/synclib.js +2 -2
- package/ts/AgoraSdk.ts +2 -12
- package/ts/Decoder/index.ts +5 -1
- package/ts/Private/AgoraBase.ts +1259 -1060
- package/ts/Private/AgoraMediaBase.ts +351 -324
- package/ts/Private/AgoraMediaPlayerTypes.ts +94 -91
- package/ts/Private/IAgoraLog.ts +20 -18
- package/ts/Private/IAgoraMediaEngine.ts +86 -81
- package/ts/Private/IAgoraMediaPlayer.ts +196 -181
- package/ts/Private/IAgoraMediaPlayerSource.ts +40 -40
- package/ts/Private/IAgoraMusicContentCenter.ts +3 -3
- package/ts/Private/IAgoraRhythmPlayer.ts +15 -15
- package/ts/Private/IAgoraRtcEngine.ts +2492 -2047
- package/ts/Private/IAgoraRtcEngineEx.ts +434 -335
- package/ts/Private/IAgoraSpatialAudio.ts +43 -45
- package/ts/Private/IAudioDeviceManager.ts +106 -97
- package/ts/Private/impl/IAgoraMediaPlayerImpl.ts +12 -0
- package/ts/Private/impl/IAgoraRtcEngineExImpl.ts +138 -0
- package/ts/Private/impl/IAgoraRtcEngineImpl.ts +331 -0
- package/ts/Private/internal/IrisApiEngine.ts +47 -0
- package/ts/Private/internal/RtcEngineExInternal.ts +106 -9
- package/ts/Private/internal/VideoEffectObjectInternal.ts +14 -0
- package/ts/Private/ti/IAgoraRtcEngine-ti.ts +2 -0
- package/ts/Renderer/AgoraView.ts +32 -3
- package/ts/Renderer/IRenderer.ts +8 -3
- package/ts/Renderer/IRendererCache.ts +33 -0
- package/ts/Renderer/RendererCache.ts +211 -12
- package/ts/Renderer/RendererManager.ts +21 -99
- package/ts/Renderer/WebCodecsRenderer/index.ts +9 -6
- package/ts/Renderer/WebCodecsRendererCache.ts +17 -1
- package/ts/Renderer/WebGLRenderer/index.ts +246 -40
- package/ts/Renderer/YUVCanvasRenderer/index.ts +29 -16
- package/ts/Types.ts +14 -9
- package/ts/Utils.ts +8 -7
- package/types/example/src/renderer/examples/advanced/VideoEffect/videoEffectHelpers.d.ts +130 -0
- package/types/example/src/renderer/examples/advanced/VideoEffect/videoEffectHelpers.d.ts.map +1 -0
- package/types/{AgoraSdk.d.ts → ts/AgoraSdk.d.ts} +2 -12
- package/types/ts/AgoraSdk.d.ts.map +1 -0
- package/types/ts/Decoder/gpu-utils.d.ts.map +1 -0
- package/types/ts/Decoder/index.d.ts.map +1 -0
- package/types/ts/Private/AgoraBase.d.ts +5504 -0
- package/types/ts/Private/AgoraBase.d.ts.map +1 -0
- package/types/ts/Private/AgoraMediaBase.d.ts +1695 -0
- package/types/ts/Private/AgoraMediaBase.d.ts.map +1 -0
- package/types/ts/Private/AgoraMediaPlayerTypes.d.ts +456 -0
- package/types/ts/Private/AgoraMediaPlayerTypes.d.ts.map +1 -0
- package/types/ts/Private/IAgoraH265Transcoder.d.ts.map +1 -0
- package/types/ts/Private/IAgoraLog.d.ts +91 -0
- package/types/ts/Private/IAgoraLog.d.ts.map +1 -0
- package/types/ts/Private/IAgoraMediaEngine.d.ts +255 -0
- package/types/ts/Private/IAgoraMediaEngine.d.ts.map +1 -0
- package/types/ts/Private/IAgoraMediaPlayer.d.ts +662 -0
- package/types/ts/Private/IAgoraMediaPlayer.d.ts.map +1 -0
- package/types/ts/Private/IAgoraMediaPlayerSource.d.ts +109 -0
- package/types/ts/Private/IAgoraMediaPlayerSource.d.ts.map +1 -0
- package/types/ts/Private/IAgoraMediaRecorder.d.ts.map +1 -0
- package/types/ts/Private/IAgoraMediaStreamingSource.d.ts.map +1 -0
- package/types/{Private → ts/Private}/IAgoraMusicContentCenter.d.ts +3 -3
- package/types/ts/Private/IAgoraMusicContentCenter.d.ts.map +1 -0
- package/types/ts/Private/IAgoraRhythmPlayer.d.ts +65 -0
- package/types/ts/Private/IAgoraRhythmPlayer.d.ts.map +1 -0
- package/types/ts/Private/IAgoraRtcEngine.d.ts +6504 -0
- package/types/ts/Private/IAgoraRtcEngine.d.ts.map +1 -0
- package/types/ts/Private/IAgoraRtcEngineEx.d.ts +817 -0
- package/types/ts/Private/IAgoraRtcEngineEx.d.ts.map +1 -0
- package/types/ts/Private/IAgoraSpatialAudio.d.ts +194 -0
- package/types/ts/Private/IAgoraSpatialAudio.d.ts.map +1 -0
- package/types/ts/Private/IAudioDeviceManager.d.ts +321 -0
- package/types/ts/Private/IAudioDeviceManager.d.ts.map +1 -0
- package/types/ts/Private/extension/AgoraBaseExtension.d.ts.map +1 -0
- package/types/ts/Private/extension/AgoraMediaBaseExtension.d.ts.map +1 -0
- package/types/ts/Private/extension/AgoraMediaPlayerTypesExtension.d.ts.map +1 -0
- package/types/ts/Private/extension/IAgoraH265TranscoderExtension.d.ts.map +1 -0
- package/types/ts/Private/extension/IAgoraLogExtension.d.ts.map +1 -0
- package/types/ts/Private/extension/IAgoraMediaEngineExtension.d.ts.map +1 -0
- package/types/ts/Private/extension/IAgoraMediaPlayerExtension.d.ts.map +1 -0
- package/types/ts/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts.map +1 -0
- package/types/ts/Private/extension/IAgoraMediaRecorderExtension.d.ts.map +1 -0
- package/types/ts/Private/extension/IAgoraMusicContentCenterExtension.d.ts.map +1 -0
- package/types/ts/Private/extension/IAgoraRhythmPlayerExtension.d.ts.map +1 -0
- package/types/ts/Private/extension/IAgoraRtcEngineExExtension.d.ts.map +1 -0
- package/types/ts/Private/extension/IAgoraRtcEngineExtension.d.ts.map +1 -0
- package/types/ts/Private/extension/IAgoraSpatialAudioExtension.d.ts.map +1 -0
- package/types/ts/Private/extension/IAudioDeviceManagerExtension.d.ts.map +1 -0
- package/types/ts/Private/impl/AgoraBaseImpl.d.ts.map +1 -0
- package/types/ts/Private/impl/AgoraMediaBaseImpl.d.ts.map +1 -0
- package/types/ts/Private/impl/IAgoraH265TranscoderImpl.d.ts.map +1 -0
- package/types/ts/Private/impl/IAgoraMediaEngineImpl.d.ts.map +1 -0
- package/types/{Private → ts/Private}/impl/IAgoraMediaPlayerImpl.d.ts +2 -0
- package/types/ts/Private/impl/IAgoraMediaPlayerImpl.d.ts.map +1 -0
- package/types/ts/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts.map +1 -0
- package/types/ts/Private/impl/IAgoraMediaRecorderImpl.d.ts.map +1 -0
- package/types/ts/Private/impl/IAgoraMusicContentCenterImpl.d.ts.map +1 -0
- package/types/{Private → ts/Private}/impl/IAgoraRtcEngineExImpl.d.ts +7 -1
- package/types/ts/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -0
- package/types/{Private → ts/Private}/impl/IAgoraRtcEngineImpl.d.ts +27 -1
- package/types/ts/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -0
- package/types/ts/Private/impl/IAgoraSpatialAudioImpl.d.ts.map +1 -0
- package/types/ts/Private/impl/IAudioDeviceManagerImpl.d.ts.map +1 -0
- package/types/ts/Private/internal/AgoraH265TranscoderInternal.d.ts.map +1 -0
- package/types/ts/Private/internal/AgoraMediaBaseInternal.d.ts.map +1 -0
- package/types/ts/Private/internal/AudioDeviceManagerInternal.d.ts.map +1 -0
- package/types/ts/Private/internal/IrisApiEngine.d.ts.map +1 -0
- package/types/ts/Private/internal/LocalSpatialAudioEngineInternal.d.ts.map +1 -0
- package/types/ts/Private/internal/MediaEngineInternal.d.ts.map +1 -0
- package/types/ts/Private/internal/MediaPlayerInternal.d.ts.map +1 -0
- package/types/ts/Private/internal/MediaRecorderInternal.d.ts.map +1 -0
- package/types/ts/Private/internal/MusicContentCenterInternal.d.ts.map +1 -0
- package/types/{Private → ts/Private}/internal/RtcEngineExInternal.d.ts +10 -4
- package/types/ts/Private/internal/RtcEngineExInternal.d.ts.map +1 -0
- package/types/ts/Private/internal/VideoEffectObjectInternal.d.ts +7 -0
- package/types/ts/Private/internal/VideoEffectObjectInternal.d.ts.map +1 -0
- package/types/{Private → ts/Private}/ipc/main.d.ts.map +1 -1
- package/types/ts/Private/ipc/renderer.d.ts.map +1 -0
- package/types/ts/Private/ti/AgoraBase-ti.d.ts.map +1 -0
- package/types/ts/Private/ti/AgoraMediaBase-ti.d.ts.map +1 -0
- package/types/ts/Private/ti/AgoraMediaPlayerTypes-ti.d.ts.map +1 -0
- package/types/ts/Private/ti/IAgoraH265Transcoder-ti.d.ts.map +1 -0
- package/types/ts/Private/ti/IAgoraLog-ti.d.ts.map +1 -0
- package/types/ts/Private/ti/IAgoraMediaEngine-ti.d.ts.map +1 -0
- package/types/ts/Private/ti/IAgoraMediaPlayer-ti.d.ts.map +1 -0
- package/types/ts/Private/ti/IAgoraMediaPlayerSource-ti.d.ts.map +1 -0
- package/types/ts/Private/ti/IAgoraMediaRecorder-ti.d.ts.map +1 -0
- package/types/ts/Private/ti/IAgoraMediaStreamingSource-ti.d.ts.map +1 -0
- package/types/ts/Private/ti/IAgoraMusicContentCenter-ti.d.ts.map +1 -0
- package/types/ts/Private/ti/IAgoraRhythmPlayer-ti.d.ts.map +1 -0
- package/types/ts/Private/ti/IAgoraRtcEngine-ti.d.ts.map +1 -0
- package/types/ts/Private/ti/IAgoraRtcEngineEx-ti.d.ts.map +1 -0
- package/types/ts/Private/ti/IAgoraSpatialAudio-ti.d.ts.map +1 -0
- package/types/ts/Private/ti/IAudioDeviceManager-ti.d.ts.map +1 -0
- package/types/{Renderer → ts/Renderer}/AgoraView.d.ts +6 -0
- package/types/ts/Renderer/AgoraView.d.ts.map +1 -0
- package/types/ts/Renderer/CapabilityManager.d.ts.map +1 -0
- package/types/{Renderer → ts/Renderer}/IRenderer.d.ts +2 -2
- package/types/ts/Renderer/IRenderer.d.ts.map +1 -0
- package/types/{Renderer → ts/Renderer}/IRendererCache.d.ts +21 -1
- package/types/ts/Renderer/IRendererCache.d.ts.map +1 -0
- package/types/{Renderer → ts/Renderer}/RendererCache.d.ts +27 -0
- package/types/ts/Renderer/RendererCache.d.ts.map +1 -0
- package/types/{Renderer → ts/Renderer}/RendererManager.d.ts +4 -17
- package/types/ts/Renderer/RendererManager.d.ts.map +1 -0
- package/types/{Renderer → ts/Renderer}/WebCodecsRenderer/index.d.ts +3 -3
- package/types/ts/Renderer/WebCodecsRenderer/index.d.ts.map +1 -0
- package/types/{Renderer → ts/Renderer}/WebCodecsRendererCache.d.ts +7 -0
- package/types/ts/Renderer/WebCodecsRendererCache.d.ts.map +1 -0
- package/types/{Renderer → ts/Renderer}/WebGLRenderer/index.d.ts +12 -2
- package/types/ts/Renderer/WebGLRenderer/index.d.ts.map +1 -0
- package/types/ts/Renderer/WebGLRenderer/webgl-utils.d.ts.map +1 -0
- package/types/ts/Renderer/YUVCanvasRenderer/index.d.ts +10 -0
- package/types/ts/Renderer/YUVCanvasRenderer/index.d.ts.map +1 -0
- package/types/ts/Renderer/index.d.ts.map +1 -0
- package/types/{Types.d.ts → ts/Types.d.ts} +11 -6
- package/types/ts/Types.d.ts.map +1 -0
- package/types/{Utils.d.ts → ts/Utils.d.ts} +1 -1
- package/types/ts/Utils.d.ts.map +1 -0
- package/js/Renderer/RendererCache.js +0 -100
- package/types/AgoraSdk.d.ts.map +0 -1
- package/types/Decoder/gpu-utils.d.ts.map +0 -1
- package/types/Decoder/index.d.ts.map +0 -1
- package/types/Private/AgoraBase.d.ts +0 -5310
- package/types/Private/AgoraBase.d.ts.map +0 -1
- package/types/Private/AgoraMediaBase.d.ts +0 -1668
- package/types/Private/AgoraMediaBase.d.ts.map +0 -1
- package/types/Private/AgoraMediaPlayerTypes.d.ts +0 -453
- package/types/Private/AgoraMediaPlayerTypes.d.ts.map +0 -1
- package/types/Private/IAgoraH265Transcoder.d.ts.map +0 -1
- package/types/Private/IAgoraLog.d.ts +0 -89
- package/types/Private/IAgoraLog.d.ts.map +0 -1
- package/types/Private/IAgoraMediaEngine.d.ts +0 -250
- package/types/Private/IAgoraMediaEngine.d.ts.map +0 -1
- package/types/Private/IAgoraMediaPlayer.d.ts +0 -648
- package/types/Private/IAgoraMediaPlayer.d.ts.map +0 -1
- package/types/Private/IAgoraMediaPlayerSource.d.ts +0 -109
- package/types/Private/IAgoraMediaPlayerSource.d.ts.map +0 -1
- package/types/Private/IAgoraMediaRecorder.d.ts.map +0 -1
- package/types/Private/IAgoraMediaStreamingSource.d.ts.map +0 -1
- package/types/Private/IAgoraMusicContentCenter.d.ts.map +0 -1
- package/types/Private/IAgoraRhythmPlayer.d.ts +0 -65
- package/types/Private/IAgoraRhythmPlayer.d.ts.map +0 -1
- package/types/Private/IAgoraRtcEngine.d.ts +0 -6103
- package/types/Private/IAgoraRtcEngine.d.ts.map +0 -1
- package/types/Private/IAgoraRtcEngineEx.d.ts +0 -741
- package/types/Private/IAgoraRtcEngineEx.d.ts.map +0 -1
- package/types/Private/IAgoraSpatialAudio.d.ts +0 -196
- package/types/Private/IAgoraSpatialAudio.d.ts.map +0 -1
- package/types/Private/IAudioDeviceManager.d.ts +0 -312
- package/types/Private/IAudioDeviceManager.d.ts.map +0 -1
- package/types/Private/extension/AgoraBaseExtension.d.ts.map +0 -1
- package/types/Private/extension/AgoraMediaBaseExtension.d.ts.map +0 -1
- package/types/Private/extension/AgoraMediaPlayerTypesExtension.d.ts.map +0 -1
- package/types/Private/extension/IAgoraH265TranscoderExtension.d.ts.map +0 -1
- package/types/Private/extension/IAgoraLogExtension.d.ts.map +0 -1
- package/types/Private/extension/IAgoraMediaEngineExtension.d.ts.map +0 -1
- package/types/Private/extension/IAgoraMediaPlayerExtension.d.ts.map +0 -1
- package/types/Private/extension/IAgoraMediaPlayerSourceExtension.d.ts.map +0 -1
- package/types/Private/extension/IAgoraMediaRecorderExtension.d.ts.map +0 -1
- package/types/Private/extension/IAgoraMusicContentCenterExtension.d.ts.map +0 -1
- package/types/Private/extension/IAgoraRhythmPlayerExtension.d.ts.map +0 -1
- package/types/Private/extension/IAgoraRtcEngineExExtension.d.ts.map +0 -1
- package/types/Private/extension/IAgoraRtcEngineExtension.d.ts.map +0 -1
- package/types/Private/extension/IAgoraSpatialAudioExtension.d.ts.map +0 -1
- package/types/Private/extension/IAudioDeviceManagerExtension.d.ts.map +0 -1
- package/types/Private/impl/AgoraBaseImpl.d.ts.map +0 -1
- package/types/Private/impl/AgoraMediaBaseImpl.d.ts.map +0 -1
- package/types/Private/impl/IAgoraH265TranscoderImpl.d.ts.map +0 -1
- package/types/Private/impl/IAgoraMediaEngineImpl.d.ts.map +0 -1
- package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts.map +0 -1
- package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts.map +0 -1
- package/types/Private/impl/IAgoraMediaRecorderImpl.d.ts.map +0 -1
- package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts.map +0 -1
- package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +0 -1
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +0 -1
- package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts.map +0 -1
- package/types/Private/impl/IAudioDeviceManagerImpl.d.ts.map +0 -1
- package/types/Private/internal/AgoraH265TranscoderInternal.d.ts.map +0 -1
- package/types/Private/internal/AgoraMediaBaseInternal.d.ts.map +0 -1
- package/types/Private/internal/AudioDeviceManagerInternal.d.ts.map +0 -1
- package/types/Private/internal/IrisApiEngine.d.ts.map +0 -1
- package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts.map +0 -1
- package/types/Private/internal/MediaEngineInternal.d.ts.map +0 -1
- package/types/Private/internal/MediaPlayerInternal.d.ts.map +0 -1
- package/types/Private/internal/MediaRecorderInternal.d.ts.map +0 -1
- package/types/Private/internal/MusicContentCenterInternal.d.ts.map +0 -1
- package/types/Private/internal/RtcEngineExInternal.d.ts.map +0 -1
- package/types/Private/ipc/renderer.d.ts.map +0 -1
- package/types/Private/ti/AgoraBase-ti.d.ts.map +0 -1
- package/types/Private/ti/AgoraMediaBase-ti.d.ts.map +0 -1
- package/types/Private/ti/AgoraMediaPlayerTypes-ti.d.ts.map +0 -1
- package/types/Private/ti/IAgoraH265Transcoder-ti.d.ts.map +0 -1
- package/types/Private/ti/IAgoraLog-ti.d.ts.map +0 -1
- package/types/Private/ti/IAgoraMediaEngine-ti.d.ts.map +0 -1
- package/types/Private/ti/IAgoraMediaPlayer-ti.d.ts.map +0 -1
- package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts.map +0 -1
- package/types/Private/ti/IAgoraMediaRecorder-ti.d.ts.map +0 -1
- package/types/Private/ti/IAgoraMediaStreamingSource-ti.d.ts.map +0 -1
- package/types/Private/ti/IAgoraMusicContentCenter-ti.d.ts.map +0 -1
- package/types/Private/ti/IAgoraRhythmPlayer-ti.d.ts.map +0 -1
- package/types/Private/ti/IAgoraRtcEngine-ti.d.ts.map +0 -1
- package/types/Private/ti/IAgoraRtcEngineEx-ti.d.ts.map +0 -1
- package/types/Private/ti/IAgoraSpatialAudio-ti.d.ts.map +0 -1
- package/types/Private/ti/IAudioDeviceManager-ti.d.ts.map +0 -1
- package/types/Renderer/AgoraView.d.ts.map +0 -1
- package/types/Renderer/CapabilityManager.d.ts.map +0 -1
- package/types/Renderer/IRenderer.d.ts.map +0 -1
- package/types/Renderer/IRendererCache.d.ts.map +0 -1
- package/types/Renderer/RendererCache.d.ts.map +0 -1
- package/types/Renderer/RendererManager.d.ts.map +0 -1
- package/types/Renderer/WebCodecsRenderer/index.d.ts.map +0 -1
- package/types/Renderer/WebCodecsRendererCache.d.ts.map +0 -1
- package/types/Renderer/WebGLRenderer/index.d.ts.map +0 -1
- package/types/Renderer/WebGLRenderer/webgl-utils.d.ts.map +0 -1
- package/types/Renderer/YUVCanvasRenderer/index.d.ts +0 -9
- package/types/Renderer/YUVCanvasRenderer/index.d.ts.map +0 -1
- package/types/Renderer/index.d.ts.map +0 -1
- package/types/Types.d.ts.map +0 -1
- package/types/Utils.d.ts.map +0 -1
- /package/js/{Decoder → ts/Decoder}/gpu-utils.js +0 -0
- /package/js/{Private → ts/Private}/IAgoraH265Transcoder.js +0 -0
- /package/js/{Private → ts/Private}/IAgoraMediaPlayerSource.js +0 -0
- /package/js/{Private → ts/Private}/IAgoraMediaRecorder.js +0 -0
- /package/js/{Private → ts/Private}/IAgoraMediaStreamingSource.js +0 -0
- /package/js/{Private → ts/Private}/extension/AgoraBaseExtension.js +0 -0
- /package/js/{Private → ts/Private}/extension/AgoraMediaBaseExtension.js +0 -0
- /package/js/{Private → ts/Private}/extension/AgoraMediaPlayerTypesExtension.js +0 -0
- /package/js/{Private → ts/Private}/extension/IAgoraH265TranscoderExtension.js +0 -0
- /package/js/{Private → ts/Private}/extension/IAgoraLogExtension.js +0 -0
- /package/js/{Private → ts/Private}/extension/IAgoraMediaEngineExtension.js +0 -0
- /package/js/{Private → ts/Private}/extension/IAgoraMediaPlayerExtension.js +0 -0
- /package/js/{Private → ts/Private}/extension/IAgoraMediaPlayerSourceExtension.js +0 -0
- /package/js/{Private → ts/Private}/extension/IAgoraMediaRecorderExtension.js +0 -0
- /package/js/{Private → ts/Private}/extension/IAgoraMusicContentCenterExtension.js +0 -0
- /package/js/{Private → ts/Private}/extension/IAgoraRhythmPlayerExtension.js +0 -0
- /package/js/{Private → ts/Private}/extension/IAgoraRtcEngineExExtension.js +0 -0
- /package/js/{Private → ts/Private}/extension/IAgoraRtcEngineExtension.js +0 -0
- /package/js/{Private → ts/Private}/extension/IAgoraSpatialAudioExtension.js +0 -0
- /package/js/{Private → ts/Private}/extension/IAudioDeviceManagerExtension.js +0 -0
- /package/js/{Private → ts/Private}/impl/AgoraBaseImpl.js +0 -0
- /package/js/{Private → ts/Private}/impl/AgoraMediaBaseImpl.js +0 -0
- /package/js/{Private → ts/Private}/impl/IAgoraH265TranscoderImpl.js +0 -0
- /package/js/{Private → ts/Private}/impl/IAgoraMediaEngineImpl.js +0 -0
- /package/js/{Private → ts/Private}/impl/IAgoraMediaPlayerSourceImpl.js +0 -0
- /package/js/{Private → ts/Private}/impl/IAgoraMediaRecorderImpl.js +0 -0
- /package/js/{Private → ts/Private}/impl/IAgoraMusicContentCenterImpl.js +0 -0
- /package/js/{Private → ts/Private}/impl/IAgoraSpatialAudioImpl.js +0 -0
- /package/js/{Private → ts/Private}/impl/IAudioDeviceManagerImpl.js +0 -0
- /package/js/{Private → ts/Private}/internal/AgoraH265TranscoderInternal.js +0 -0
- /package/js/{Private → ts/Private}/internal/AgoraMediaBaseInternal.js +0 -0
- /package/js/{Private → ts/Private}/internal/AudioDeviceManagerInternal.js +0 -0
- /package/js/{Private → ts/Private}/internal/LocalSpatialAudioEngineInternal.js +0 -0
- /package/js/{Private → ts/Private}/internal/MediaEngineInternal.js +0 -0
- /package/js/{Private → ts/Private}/internal/MediaPlayerInternal.js +0 -0
- /package/js/{Private → ts/Private}/internal/MediaRecorderInternal.js +0 -0
- /package/js/{Private → ts/Private}/internal/MusicContentCenterInternal.js +0 -0
- /package/js/{Private → ts/Private}/ipc/main.js +0 -0
- /package/js/{Private → ts/Private}/ipc/renderer.js +0 -0
- /package/js/{Private → ts/Private}/ti/AgoraBase-ti.js +0 -0
- /package/js/{Private → ts/Private}/ti/AgoraMediaBase-ti.js +0 -0
- /package/js/{Private → ts/Private}/ti/AgoraMediaPlayerTypes-ti.js +0 -0
- /package/js/{Private → ts/Private}/ti/IAgoraH265Transcoder-ti.js +0 -0
- /package/js/{Private → ts/Private}/ti/IAgoraLog-ti.js +0 -0
- /package/js/{Private → ts/Private}/ti/IAgoraMediaEngine-ti.js +0 -0
- /package/js/{Private → ts/Private}/ti/IAgoraMediaPlayer-ti.js +0 -0
- /package/js/{Private → ts/Private}/ti/IAgoraMediaPlayerSource-ti.js +0 -0
- /package/js/{Private → ts/Private}/ti/IAgoraMediaRecorder-ti.js +0 -0
- /package/js/{Private → ts/Private}/ti/IAgoraMediaStreamingSource-ti.js +0 -0
- /package/js/{Private → ts/Private}/ti/IAgoraMusicContentCenter-ti.js +0 -0
- /package/js/{Private → ts/Private}/ti/IAgoraRhythmPlayer-ti.js +0 -0
- /package/js/{Private → ts/Private}/ti/IAgoraRtcEngineEx-ti.js +0 -0
- /package/js/{Private → ts/Private}/ti/IAgoraSpatialAudio-ti.js +0 -0
- /package/js/{Private → ts/Private}/ti/IAudioDeviceManager-ti.js +0 -0
- /package/js/{Renderer → ts/Renderer}/CapabilityManager.js +0 -0
- /package/js/{Renderer → ts/Renderer}/WebGLRenderer/webgl-utils.js +0 -0
- /package/js/{Renderer → ts/Renderer}/index.js +0 -0
- /package/js/{Types.js → ts/Types.js} +0 -0
- /package/types/{Decoder → ts/Decoder}/gpu-utils.d.ts +0 -0
- /package/types/{Decoder → ts/Decoder}/index.d.ts +0 -0
- /package/types/{Private → ts/Private}/IAgoraH265Transcoder.d.ts +0 -0
- /package/types/{Private → ts/Private}/IAgoraMediaRecorder.d.ts +0 -0
- /package/types/{Private → ts/Private}/IAgoraMediaStreamingSource.d.ts +0 -0
- /package/types/{Private → ts/Private}/extension/AgoraBaseExtension.d.ts +0 -0
- /package/types/{Private → ts/Private}/extension/AgoraMediaBaseExtension.d.ts +0 -0
- /package/types/{Private → ts/Private}/extension/AgoraMediaPlayerTypesExtension.d.ts +0 -0
- /package/types/{Private → ts/Private}/extension/IAgoraH265TranscoderExtension.d.ts +0 -0
- /package/types/{Private → ts/Private}/extension/IAgoraLogExtension.d.ts +0 -0
- /package/types/{Private → ts/Private}/extension/IAgoraMediaEngineExtension.d.ts +0 -0
- /package/types/{Private → ts/Private}/extension/IAgoraMediaPlayerExtension.d.ts +0 -0
- /package/types/{Private → ts/Private}/extension/IAgoraMediaPlayerSourceExtension.d.ts +0 -0
- /package/types/{Private → ts/Private}/extension/IAgoraMediaRecorderExtension.d.ts +0 -0
- /package/types/{Private → ts/Private}/extension/IAgoraMusicContentCenterExtension.d.ts +0 -0
- /package/types/{Private → ts/Private}/extension/IAgoraRhythmPlayerExtension.d.ts +0 -0
- /package/types/{Private → ts/Private}/extension/IAgoraRtcEngineExExtension.d.ts +0 -0
- /package/types/{Private → ts/Private}/extension/IAgoraRtcEngineExtension.d.ts +0 -0
- /package/types/{Private → ts/Private}/extension/IAgoraSpatialAudioExtension.d.ts +0 -0
- /package/types/{Private → ts/Private}/extension/IAudioDeviceManagerExtension.d.ts +0 -0
- /package/types/{Private → ts/Private}/impl/AgoraBaseImpl.d.ts +0 -0
- /package/types/{Private → ts/Private}/impl/AgoraMediaBaseImpl.d.ts +0 -0
- /package/types/{Private → ts/Private}/impl/IAgoraH265TranscoderImpl.d.ts +0 -0
- /package/types/{Private → ts/Private}/impl/IAgoraMediaEngineImpl.d.ts +0 -0
- /package/types/{Private → ts/Private}/impl/IAgoraMediaPlayerSourceImpl.d.ts +0 -0
- /package/types/{Private → ts/Private}/impl/IAgoraMediaRecorderImpl.d.ts +0 -0
- /package/types/{Private → ts/Private}/impl/IAgoraMusicContentCenterImpl.d.ts +0 -0
- /package/types/{Private → ts/Private}/impl/IAgoraSpatialAudioImpl.d.ts +0 -0
- /package/types/{Private → ts/Private}/impl/IAudioDeviceManagerImpl.d.ts +0 -0
- /package/types/{Private → ts/Private}/internal/AgoraH265TranscoderInternal.d.ts +0 -0
- /package/types/{Private → ts/Private}/internal/AgoraMediaBaseInternal.d.ts +0 -0
- /package/types/{Private → ts/Private}/internal/AudioDeviceManagerInternal.d.ts +0 -0
- /package/types/{Private → ts/Private}/internal/IrisApiEngine.d.ts +0 -0
- /package/types/{Private → ts/Private}/internal/LocalSpatialAudioEngineInternal.d.ts +0 -0
- /package/types/{Private → ts/Private}/internal/MediaEngineInternal.d.ts +0 -0
- /package/types/{Private → ts/Private}/internal/MediaPlayerInternal.d.ts +0 -0
- /package/types/{Private → ts/Private}/internal/MediaRecorderInternal.d.ts +0 -0
- /package/types/{Private → ts/Private}/internal/MusicContentCenterInternal.d.ts +0 -0
- /package/types/{Private → ts/Private}/ipc/main.d.ts +0 -0
- /package/types/{Private → ts/Private}/ipc/renderer.d.ts +0 -0
- /package/types/{Private → ts/Private}/ti/AgoraBase-ti.d.ts +0 -0
- /package/types/{Private → ts/Private}/ti/AgoraMediaBase-ti.d.ts +0 -0
- /package/types/{Private → ts/Private}/ti/AgoraMediaPlayerTypes-ti.d.ts +0 -0
- /package/types/{Private → ts/Private}/ti/IAgoraH265Transcoder-ti.d.ts +0 -0
- /package/types/{Private → ts/Private}/ti/IAgoraLog-ti.d.ts +0 -0
- /package/types/{Private → ts/Private}/ti/IAgoraMediaEngine-ti.d.ts +0 -0
- /package/types/{Private → ts/Private}/ti/IAgoraMediaPlayer-ti.d.ts +0 -0
- /package/types/{Private → ts/Private}/ti/IAgoraMediaPlayerSource-ti.d.ts +0 -0
- /package/types/{Private → ts/Private}/ti/IAgoraMediaRecorder-ti.d.ts +0 -0
- /package/types/{Private → ts/Private}/ti/IAgoraMediaStreamingSource-ti.d.ts +0 -0
- /package/types/{Private → ts/Private}/ti/IAgoraMusicContentCenter-ti.d.ts +0 -0
- /package/types/{Private → ts/Private}/ti/IAgoraRhythmPlayer-ti.d.ts +0 -0
- /package/types/{Private → ts/Private}/ti/IAgoraRtcEngine-ti.d.ts +0 -0
- /package/types/{Private → ts/Private}/ti/IAgoraRtcEngineEx-ti.d.ts +0 -0
- /package/types/{Private → ts/Private}/ti/IAgoraSpatialAudio-ti.d.ts +0 -0
- /package/types/{Private → ts/Private}/ti/IAudioDeviceManager-ti.d.ts +0 -0
- /package/types/{Renderer → ts/Renderer}/CapabilityManager.d.ts +0 -0
- /package/types/{Renderer → ts/Renderer}/WebGLRenderer/webgl-utils.d.ts +0 -0
- /package/types/{Renderer → ts/Renderer}/index.d.ts +0 -0
|
@@ -2,111 +2,111 @@ import './extension/AgoraMediaBaseExtension';
|
|
|
2
2
|
import { EncodedVideoFrameInfo } from './AgoraBase';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Plugin context information.
|
|
6
6
|
*/
|
|
7
7
|
export class ExtensionContext {
|
|
8
8
|
/**
|
|
9
|
-
* Whether the uid in ExtensionContext is valid: true :
|
|
9
|
+
* Whether the uid reported in ExtensionContext is valid: true : uid is valid. false : uid is invalid.
|
|
10
10
|
*/
|
|
11
11
|
isValid?: boolean;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* User ID. 0 represents the local user, values greater than 0 represent remote users.
|
|
14
14
|
*/
|
|
15
15
|
uid?: number;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Name of the plugin provider.
|
|
18
18
|
*/
|
|
19
19
|
providerName?: string;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Name of the plugin.
|
|
22
22
|
*/
|
|
23
23
|
extensionName?: string;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Type of video source.
|
|
28
28
|
*/
|
|
29
29
|
export enum VideoSourceType {
|
|
30
30
|
/**
|
|
31
|
-
* 0: (Default) The
|
|
31
|
+
* 0: (Default) The video source is the first camera.
|
|
32
32
|
*/
|
|
33
33
|
VideoSourceCameraPrimary = 0,
|
|
34
34
|
/**
|
|
35
|
-
* 0: (Default) The
|
|
35
|
+
* 0: (Default) The video source is the first camera.
|
|
36
36
|
*/
|
|
37
37
|
VideoSourceCamera = 0,
|
|
38
38
|
/**
|
|
39
|
-
* 1: The
|
|
39
|
+
* 1: The video source is the second camera.
|
|
40
40
|
*/
|
|
41
41
|
VideoSourceCameraSecondary = 1,
|
|
42
42
|
/**
|
|
43
|
-
* 2: The
|
|
43
|
+
* 2: The video source is the first screen.
|
|
44
44
|
*/
|
|
45
45
|
VideoSourceScreenPrimary = 2,
|
|
46
46
|
/**
|
|
47
|
-
* 2: The
|
|
47
|
+
* 2: The video source is the first screen.
|
|
48
48
|
*/
|
|
49
49
|
VideoSourceScreen = 2,
|
|
50
50
|
/**
|
|
51
|
-
* 3: The
|
|
51
|
+
* 3: The video source is the second screen.
|
|
52
52
|
*/
|
|
53
53
|
VideoSourceScreenSecondary = 3,
|
|
54
54
|
/**
|
|
55
|
-
* 4:
|
|
55
|
+
* 4: Custom video source.
|
|
56
56
|
*/
|
|
57
57
|
VideoSourceCustom = 4,
|
|
58
58
|
/**
|
|
59
|
-
* 5: The media player.
|
|
59
|
+
* 5: The video source is a media player.
|
|
60
60
|
*/
|
|
61
61
|
VideoSourceMediaPlayer = 5,
|
|
62
62
|
/**
|
|
63
|
-
* 6:
|
|
63
|
+
* 6: The video source is a PNG image.
|
|
64
64
|
*/
|
|
65
65
|
VideoSourceRtcImagePng = 6,
|
|
66
66
|
/**
|
|
67
|
-
* 7:
|
|
67
|
+
* 7: The video source is a JPEG image.
|
|
68
68
|
*/
|
|
69
69
|
VideoSourceRtcImageJpeg = 7,
|
|
70
70
|
/**
|
|
71
|
-
* 8:
|
|
71
|
+
* 8: The video source is a GIF image.
|
|
72
72
|
*/
|
|
73
73
|
VideoSourceRtcImageGif = 8,
|
|
74
74
|
/**
|
|
75
|
-
* 9:
|
|
75
|
+
* 9: The video source is remote video obtained over the network.
|
|
76
76
|
*/
|
|
77
77
|
VideoSourceRemote = 9,
|
|
78
78
|
/**
|
|
79
|
-
* 10:
|
|
79
|
+
* 10: Transcoded video source.
|
|
80
80
|
*/
|
|
81
81
|
VideoSourceTranscoded = 10,
|
|
82
82
|
/**
|
|
83
|
-
* 11: The third camera.
|
|
83
|
+
* 11: The video source is the third camera.
|
|
84
84
|
*/
|
|
85
85
|
VideoSourceCameraThird = 11,
|
|
86
86
|
/**
|
|
87
|
-
* 12: The fourth camera.
|
|
87
|
+
* 12: The video source is the fourth camera.
|
|
88
88
|
*/
|
|
89
89
|
VideoSourceCameraFourth = 12,
|
|
90
90
|
/**
|
|
91
|
-
* 13: The third screen.
|
|
91
|
+
* 13: The video source is the third screen.
|
|
92
92
|
*/
|
|
93
93
|
VideoSourceScreenThird = 13,
|
|
94
94
|
/**
|
|
95
|
-
* 14: The fourth screen.
|
|
95
|
+
* 14: The video source is the fourth screen.
|
|
96
96
|
*/
|
|
97
97
|
VideoSourceScreenFourth = 14,
|
|
98
98
|
/**
|
|
99
|
-
*
|
|
99
|
+
* 15: The video source is video processed by a speech-driven plugin.
|
|
100
100
|
*/
|
|
101
101
|
VideoSourceSpeechDriven = 15,
|
|
102
102
|
/**
|
|
103
|
-
* 100:
|
|
103
|
+
* 100: Unknown video source.
|
|
104
104
|
*/
|
|
105
105
|
VideoSourceUnknown = 100,
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
|
-
*
|
|
109
|
+
* Audio source type.
|
|
110
110
|
*/
|
|
111
111
|
export enum AudioSourceType {
|
|
112
112
|
/**
|
|
@@ -114,7 +114,7 @@ export enum AudioSourceType {
|
|
|
114
114
|
*/
|
|
115
115
|
AudioSourceMicrophone = 0,
|
|
116
116
|
/**
|
|
117
|
-
* 1: Custom audio stream.
|
|
117
|
+
* 1: Custom captured audio stream.
|
|
118
118
|
*/
|
|
119
119
|
AudioSourceCustom = 1,
|
|
120
120
|
/**
|
|
@@ -130,69 +130,69 @@ export enum AudioSourceType {
|
|
|
130
130
|
*/
|
|
131
131
|
AudioSourceMixedStream = 4,
|
|
132
132
|
/**
|
|
133
|
-
* 5: Audio stream
|
|
133
|
+
* 5: Audio stream of a specified remote user.
|
|
134
134
|
*/
|
|
135
135
|
AudioSourceRemoteUser = 5,
|
|
136
136
|
/**
|
|
137
|
-
* 6: Mixed
|
|
137
|
+
* 6: Mixed stream of all audio streams in the current channel.
|
|
138
138
|
*/
|
|
139
139
|
AudioSourceRemoteChannel = 6,
|
|
140
140
|
/**
|
|
141
|
-
* 100:
|
|
141
|
+
* 100: Unknown audio source.
|
|
142
142
|
*/
|
|
143
143
|
AudioSourceUnknown = 100,
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
|
-
*
|
|
147
|
+
* Types of audio routing.
|
|
148
148
|
*/
|
|
149
149
|
export enum AudioRoute {
|
|
150
150
|
/**
|
|
151
|
-
* -1:
|
|
151
|
+
* -1: Use the default audio route.
|
|
152
152
|
*/
|
|
153
153
|
RouteDefault = -1,
|
|
154
154
|
/**
|
|
155
|
-
* 0: Audio
|
|
155
|
+
* 0: Audio routed to headset with microphone.
|
|
156
156
|
*/
|
|
157
157
|
RouteHeadset = 0,
|
|
158
158
|
/**
|
|
159
|
-
* 1:
|
|
159
|
+
* 1: Audio routed to earpiece.
|
|
160
160
|
*/
|
|
161
161
|
RouteEarpiece = 1,
|
|
162
162
|
/**
|
|
163
|
-
* 2:
|
|
163
|
+
* 2: Audio routed to headset without microphone.
|
|
164
164
|
*/
|
|
165
165
|
RouteHeadsetnomic = 2,
|
|
166
166
|
/**
|
|
167
|
-
* 3:
|
|
167
|
+
* 3: Audio routed to built-in speaker.
|
|
168
168
|
*/
|
|
169
169
|
RouteSpeakerphone = 3,
|
|
170
170
|
/**
|
|
171
|
-
* 4:
|
|
171
|
+
* 4: Audio routed to external speaker. (macOS only)
|
|
172
172
|
*/
|
|
173
173
|
RouteLoudspeaker = 4,
|
|
174
174
|
/**
|
|
175
|
-
* 5:
|
|
175
|
+
* 5: Audio routed to Bluetooth device using HFP protocol.
|
|
176
176
|
*/
|
|
177
177
|
RouteBluetoothDeviceHfp = 5,
|
|
178
178
|
/**
|
|
179
|
-
* 6:
|
|
179
|
+
* 6: Audio routed to USB peripheral device. (macOS only)
|
|
180
180
|
*/
|
|
181
181
|
RouteUsb = 6,
|
|
182
182
|
/**
|
|
183
|
-
* 7:
|
|
183
|
+
* 7: Audio routed to HDMI peripheral device. (macOS only)
|
|
184
184
|
*/
|
|
185
185
|
RouteHdmi = 7,
|
|
186
186
|
/**
|
|
187
|
-
* 8:
|
|
187
|
+
* 8: Audio routed to DisplayPort peripheral device. (macOS only)
|
|
188
188
|
*/
|
|
189
189
|
RouteDisplayport = 8,
|
|
190
190
|
/**
|
|
191
|
-
* 9:
|
|
191
|
+
* 9: Audio routed to Apple AirPlay. (macOS only)
|
|
192
192
|
*/
|
|
193
193
|
RouteAirplay = 9,
|
|
194
194
|
/**
|
|
195
|
-
* 10:
|
|
195
|
+
* 10: Audio routed to Bluetooth device using A2DP protocol.
|
|
196
196
|
*/
|
|
197
197
|
RouteBluetoothDeviceA2dp = 10,
|
|
198
198
|
}
|
|
@@ -226,21 +226,21 @@ export class AudioParameters {
|
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
/**
|
|
229
|
-
*
|
|
229
|
+
* Usage mode of audio data.
|
|
230
230
|
*/
|
|
231
231
|
export enum RawAudioFrameOpModeType {
|
|
232
232
|
/**
|
|
233
|
-
* 0: Read-only mode
|
|
233
|
+
* 0: (Default) Read-only mode. You only retrieve the raw data returned by the SDK without making any modifications. For example, if you collect data via the SDK and perform your own CDN streaming, you can use this mode.
|
|
234
234
|
*/
|
|
235
235
|
RawAudioFrameOpModeReadOnly = 0,
|
|
236
236
|
/**
|
|
237
|
-
* 2: Read
|
|
237
|
+
* 2: Read-write mode. You modify the raw audio returned by the SDK and send it back to the SDK for encoding and transmission. For example, if you have your own audio effects module and want to pre-process the data (e.g., voice changing), you can use this mode.
|
|
238
238
|
*/
|
|
239
239
|
RawAudioFrameOpModeReadWrite = 2,
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
/**
|
|
243
|
-
* Media source
|
|
243
|
+
* Media source types.
|
|
244
244
|
*/
|
|
245
245
|
export enum MediaSourceType {
|
|
246
246
|
/**
|
|
@@ -248,15 +248,15 @@ export enum MediaSourceType {
|
|
|
248
248
|
*/
|
|
249
249
|
AudioPlayoutSource = 0,
|
|
250
250
|
/**
|
|
251
|
-
* 1: Audio
|
|
251
|
+
* 1: Audio recording device.
|
|
252
252
|
*/
|
|
253
253
|
AudioRecordingSource = 1,
|
|
254
254
|
/**
|
|
255
|
-
* 2:
|
|
255
|
+
* 2: Primary camera.
|
|
256
256
|
*/
|
|
257
257
|
PrimaryCameraSource = 2,
|
|
258
258
|
/**
|
|
259
|
-
* 3:
|
|
259
|
+
* 3: Secondary camera.
|
|
260
260
|
*/
|
|
261
261
|
SecondaryCameraSource = 3,
|
|
262
262
|
/**
|
|
@@ -296,7 +296,7 @@ export enum MediaSourceType {
|
|
|
296
296
|
*/
|
|
297
297
|
TranscodedVideoSource = 12,
|
|
298
298
|
/**
|
|
299
|
-
*
|
|
299
|
+
* 13: Video source processed by speech-driven plugin.
|
|
300
300
|
*/
|
|
301
301
|
SpeechDrivenVideoSource = 13,
|
|
302
302
|
/**
|
|
@@ -305,82 +305,6 @@ export enum MediaSourceType {
|
|
|
305
305
|
UnknownMediaSource = 100,
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
/**
|
|
309
|
-
* @ignore
|
|
310
|
-
*/
|
|
311
|
-
export enum ContentInspectResult {
|
|
312
|
-
/**
|
|
313
|
-
* @ignore
|
|
314
|
-
*/
|
|
315
|
-
ContentInspectNeutral = 1,
|
|
316
|
-
/**
|
|
317
|
-
* @ignore
|
|
318
|
-
*/
|
|
319
|
-
ContentInspectSexy = 2,
|
|
320
|
-
/**
|
|
321
|
-
* @ignore
|
|
322
|
-
*/
|
|
323
|
-
ContentInspectPorn = 3,
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
/**
|
|
327
|
-
* The type of video content moderation module.
|
|
328
|
-
*/
|
|
329
|
-
export enum ContentInspectType {
|
|
330
|
-
/**
|
|
331
|
-
* 0: (Default) This module has no actual function. Do not set type to this value.
|
|
332
|
-
*/
|
|
333
|
-
ContentInspectInvalid = 0,
|
|
334
|
-
/**
|
|
335
|
-
* @ignore
|
|
336
|
-
*/
|
|
337
|
-
ContentInspectModeration = 1,
|
|
338
|
-
/**
|
|
339
|
-
* 2: Video screenshot and upload via Agora self-developed extension. SDK takes screenshots of the video stream in the channel and uploads them.
|
|
340
|
-
*/
|
|
341
|
-
ContentInspectSupervision = 2,
|
|
342
|
-
/**
|
|
343
|
-
* 3: Video screenshot and upload via extensions from Agora Extensions Marketplace. SDK uses video moderation extensions from Agora Extensions Marketplace to take screenshots of the video stream in the channel and uploads them.
|
|
344
|
-
*/
|
|
345
|
-
ContentInspectImageModeration = 3,
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* ContentInspectModule A structure used to configure the frequency of video screenshot and upload.
|
|
350
|
-
*/
|
|
351
|
-
export class ContentInspectModule {
|
|
352
|
-
/**
|
|
353
|
-
* Types of functional module. See ContentInspectType.
|
|
354
|
-
*/
|
|
355
|
-
type?: ContentInspectType;
|
|
356
|
-
/**
|
|
357
|
-
* The frequency (s) of video screenshot and upload. The value should be set as larger than 0. The default value is 0, the SDK does not take screenshots. Agora recommends that you set the value as 10; you can also adjust it according to your business needs.
|
|
358
|
-
*/
|
|
359
|
-
interval?: number;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
/**
|
|
363
|
-
* Screenshot and upload configuration.
|
|
364
|
-
*/
|
|
365
|
-
export class ContentInspectConfig {
|
|
366
|
-
/**
|
|
367
|
-
* Additional information on the video content (maximum length: 1024 Bytes). The SDK sends the screenshots and additional information on the video content to the Agora server. Once the video screenshot and upload process is completed, the Agora server sends the additional information and the callback notification to your server.
|
|
368
|
-
*/
|
|
369
|
-
extraInfo?: string;
|
|
370
|
-
/**
|
|
371
|
-
* @ignore
|
|
372
|
-
*/
|
|
373
|
-
serverConfig?: string;
|
|
374
|
-
/**
|
|
375
|
-
* Functional module. See ContentInspectModule. A maximum of 32 ContentInspectModule instances can be configured, and the value range of MAX_CONTENT_INSPECT_MODULE_COUNT is an integer in [1,32]. A function module can only be configured with one instance at most. Currently only the video screenshot and upload function is supported.
|
|
376
|
-
*/
|
|
377
|
-
modules?: ContentInspectModule[];
|
|
378
|
-
/**
|
|
379
|
-
* The number of functional modules, that is,the number of configured ContentInspectModule instances, must be the same as the number of instances configured in modules. The maximum number is 32.
|
|
380
|
-
*/
|
|
381
|
-
moduleCount?: number;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
308
|
/**
|
|
385
309
|
* @ignore
|
|
386
310
|
*/
|
|
@@ -410,31 +334,35 @@ export class AudioEncodedFrameInfo {
|
|
|
410
334
|
}
|
|
411
335
|
|
|
412
336
|
/**
|
|
413
|
-
*
|
|
337
|
+
* Information of external PCM format audio frame.
|
|
414
338
|
*/
|
|
415
339
|
export class AudioPcmFrame {
|
|
416
340
|
/**
|
|
417
|
-
*
|
|
341
|
+
* Timestamp of the audio frame (ms).
|
|
418
342
|
*/
|
|
419
343
|
capture_timestamp?: number;
|
|
420
344
|
/**
|
|
421
|
-
*
|
|
345
|
+
* Number of samples per channel.
|
|
422
346
|
*/
|
|
423
347
|
samples_per_channel_?: number;
|
|
424
348
|
/**
|
|
425
|
-
* Audio
|
|
349
|
+
* Audio sampling rate (Hz).
|
|
426
350
|
*/
|
|
427
351
|
sample_rate_hz_?: number;
|
|
428
352
|
/**
|
|
429
|
-
*
|
|
353
|
+
* Number of audio channels.
|
|
430
354
|
*/
|
|
431
355
|
num_channels_?: number;
|
|
432
356
|
/**
|
|
433
|
-
*
|
|
357
|
+
* @ignore
|
|
358
|
+
*/
|
|
359
|
+
audio_track_number_?: number;
|
|
360
|
+
/**
|
|
361
|
+
* Number of bytes per audio sample.
|
|
434
362
|
*/
|
|
435
363
|
bytes_per_sample?: BytesPerSample;
|
|
436
364
|
/**
|
|
437
|
-
*
|
|
365
|
+
* Audio frame data.
|
|
438
366
|
*/
|
|
439
367
|
data_?: number[];
|
|
440
368
|
/**
|
|
@@ -444,7 +372,7 @@ export class AudioPcmFrame {
|
|
|
444
372
|
}
|
|
445
373
|
|
|
446
374
|
/**
|
|
447
|
-
*
|
|
375
|
+
* Channel mode.
|
|
448
376
|
*/
|
|
449
377
|
export enum AudioDualMonoMode {
|
|
450
378
|
/**
|
|
@@ -452,29 +380,29 @@ export enum AudioDualMonoMode {
|
|
|
452
380
|
*/
|
|
453
381
|
AudioDualMonoStereo = 0,
|
|
454
382
|
/**
|
|
455
|
-
* 1: Left channel mode.
|
|
383
|
+
* 1: Left channel mode. Replaces the right channel audio with the left channel audio, so users only hear the left channel.
|
|
456
384
|
*/
|
|
457
385
|
AudioDualMonoL = 1,
|
|
458
386
|
/**
|
|
459
|
-
* 2: Right channel mode.
|
|
387
|
+
* 2: Right channel mode. Replaces the left channel audio with the right channel audio, so users only hear the right channel.
|
|
460
388
|
*/
|
|
461
389
|
AudioDualMonoR = 2,
|
|
462
390
|
/**
|
|
463
|
-
* 3: Mixed
|
|
391
|
+
* 3: Mixed mode. Combines left and right channel audio so users hear both channels simultaneously.
|
|
464
392
|
*/
|
|
465
393
|
AudioDualMonoMix = 3,
|
|
466
394
|
}
|
|
467
395
|
|
|
468
396
|
/**
|
|
469
|
-
*
|
|
397
|
+
* Video pixel format.
|
|
470
398
|
*/
|
|
471
399
|
export enum VideoPixelFormat {
|
|
472
400
|
/**
|
|
473
|
-
* 0:
|
|
401
|
+
* 0: Original video pixel format.
|
|
474
402
|
*/
|
|
475
403
|
VideoPixelDefault = 0,
|
|
476
404
|
/**
|
|
477
|
-
* 1:
|
|
405
|
+
* 1: I420 format.
|
|
478
406
|
*/
|
|
479
407
|
VideoPixelI420 = 1,
|
|
480
408
|
/**
|
|
@@ -486,7 +414,7 @@ export enum VideoPixelFormat {
|
|
|
486
414
|
*/
|
|
487
415
|
VideoPixelNv21 = 3,
|
|
488
416
|
/**
|
|
489
|
-
* 4:
|
|
417
|
+
* 4: RGBA format.
|
|
490
418
|
*/
|
|
491
419
|
VideoPixelRgba = 4,
|
|
492
420
|
/**
|
|
@@ -518,7 +446,7 @@ export enum VideoPixelFormat {
|
|
|
518
446
|
*/
|
|
519
447
|
VideoCvpixelP010 = 15,
|
|
520
448
|
/**
|
|
521
|
-
* 16:
|
|
449
|
+
* 16: I422 format.
|
|
522
450
|
*/
|
|
523
451
|
VideoPixelI422 = 16,
|
|
524
452
|
/**
|
|
@@ -532,15 +460,15 @@ export enum VideoPixelFormat {
|
|
|
532
460
|
}
|
|
533
461
|
|
|
534
462
|
/**
|
|
535
|
-
* Video display
|
|
463
|
+
* Video display mode.
|
|
536
464
|
*/
|
|
537
465
|
export enum RenderModeType {
|
|
538
466
|
/**
|
|
539
|
-
* 1:
|
|
467
|
+
* 1: The video is scaled proportionally. Priority is given to filling the view. Excess video beyond the view due to size mismatch is cropped.
|
|
540
468
|
*/
|
|
541
469
|
RenderModeHidden = 1,
|
|
542
470
|
/**
|
|
543
|
-
* 2:
|
|
471
|
+
* 2: The video is scaled proportionally. Priority is given to displaying the entire video content. Black bars are added to fill the view if the video size does not match the view size.
|
|
544
472
|
*/
|
|
545
473
|
RenderModeFit = 2,
|
|
546
474
|
/**
|
|
@@ -876,11 +804,11 @@ export class Hdr10MetadataInfo {
|
|
|
876
804
|
}
|
|
877
805
|
|
|
878
806
|
/**
|
|
879
|
-
* The relative position of alphaBuffer and video
|
|
807
|
+
* The relative position of alphaBuffer and the video frame.
|
|
880
808
|
*/
|
|
881
809
|
export enum AlphaStitchMode {
|
|
882
810
|
/**
|
|
883
|
-
* 0: (Default) Only video frame
|
|
811
|
+
* 0: (Default) Only the video frame is used, i.e., alphaBuffer is not stitched with the video frame.
|
|
884
812
|
*/
|
|
885
813
|
NoAlphaStitch = 0,
|
|
886
814
|
/**
|
|
@@ -916,77 +844,77 @@ export enum EglContextType {
|
|
|
916
844
|
}
|
|
917
845
|
|
|
918
846
|
/**
|
|
919
|
-
*
|
|
847
|
+
* Video buffer type.
|
|
920
848
|
*/
|
|
921
849
|
export enum VideoBufferType {
|
|
922
850
|
/**
|
|
923
|
-
* 1:
|
|
851
|
+
* 1: Type is raw data.
|
|
924
852
|
*/
|
|
925
853
|
VideoBufferRawData = 1,
|
|
926
854
|
/**
|
|
927
|
-
* 2:
|
|
855
|
+
* 2: Type is raw data.
|
|
928
856
|
*/
|
|
929
857
|
VideoBufferArray = 2,
|
|
930
858
|
/**
|
|
931
|
-
* 3:
|
|
859
|
+
* 3: Type is Texture.
|
|
932
860
|
*/
|
|
933
861
|
VideoBufferTexture = 3,
|
|
934
862
|
}
|
|
935
863
|
|
|
936
864
|
/**
|
|
937
|
-
*
|
|
865
|
+
* External video frame.
|
|
938
866
|
*/
|
|
939
867
|
export class ExternalVideoFrame {
|
|
940
868
|
/**
|
|
941
|
-
*
|
|
869
|
+
* Video type. See VideoBufferType.
|
|
942
870
|
*/
|
|
943
871
|
type?: VideoBufferType;
|
|
944
872
|
/**
|
|
945
|
-
*
|
|
873
|
+
* Pixel format. See VideoPixelFormat.
|
|
946
874
|
*/
|
|
947
875
|
format?: VideoPixelFormat;
|
|
948
876
|
/**
|
|
949
|
-
* Video
|
|
877
|
+
* Video buffer.
|
|
950
878
|
*/
|
|
951
879
|
buffer?: Uint8Array;
|
|
952
880
|
/**
|
|
953
|
-
*
|
|
881
|
+
* Stride of the input video frame in pixels (not bytes). For Texture, this value refers to the width of the Texture.
|
|
954
882
|
*/
|
|
955
883
|
stride?: number;
|
|
956
884
|
/**
|
|
957
|
-
* Height of the
|
|
885
|
+
* Height of the input video frame.
|
|
958
886
|
*/
|
|
959
887
|
height?: number;
|
|
960
888
|
/**
|
|
961
|
-
*
|
|
889
|
+
* This parameter applies only to raw video data.
|
|
962
890
|
*/
|
|
963
891
|
cropLeft?: number;
|
|
964
892
|
/**
|
|
965
|
-
*
|
|
893
|
+
* This parameter applies only to raw video data.
|
|
966
894
|
*/
|
|
967
895
|
cropTop?: number;
|
|
968
896
|
/**
|
|
969
|
-
*
|
|
897
|
+
* This parameter applies only to raw video data.
|
|
970
898
|
*/
|
|
971
899
|
cropRight?: number;
|
|
972
900
|
/**
|
|
973
|
-
*
|
|
901
|
+
* This parameter applies only to raw video data.
|
|
974
902
|
*/
|
|
975
903
|
cropBottom?: number;
|
|
976
904
|
/**
|
|
977
|
-
*
|
|
905
|
+
* Field related to raw data. Specifies whether to rotate the input video group clockwise. Available values: 0, 90, 180, 270. Default is 0.
|
|
978
906
|
*/
|
|
979
907
|
rotation?: number;
|
|
980
908
|
/**
|
|
981
|
-
* Timestamp
|
|
909
|
+
* Timestamp of the input video frame in milliseconds. Incorrect timestamps may cause frame drops or audio-video desynchronization.
|
|
982
910
|
*/
|
|
983
911
|
timestamp?: number;
|
|
984
912
|
/**
|
|
985
|
-
* This parameter only
|
|
913
|
+
* This parameter applies only to video data in Texture format. Refers to the Texture ID of the video frame.
|
|
986
914
|
*/
|
|
987
915
|
eglType?: EglContextType;
|
|
988
916
|
/**
|
|
989
|
-
* This parameter only
|
|
917
|
+
* This parameter applies only to video data in Texture format. Refers to an input 4x4 transformation matrix, typically an identity matrix.
|
|
990
918
|
*/
|
|
991
919
|
textureId?: number;
|
|
992
920
|
/**
|
|
@@ -994,37 +922,38 @@ export class ExternalVideoFrame {
|
|
|
994
922
|
*/
|
|
995
923
|
fenceObject?: number;
|
|
996
924
|
/**
|
|
997
|
-
* This parameter only
|
|
925
|
+
* This parameter applies only to video data in Texture format. Refers to an input 4x4 transformation matrix, typically an identity matrix.
|
|
998
926
|
*/
|
|
999
927
|
matrix?: number[];
|
|
1000
928
|
/**
|
|
1001
|
-
* This parameter only
|
|
929
|
+
* This parameter applies only to video data in Texture format. Refers to the metadata buffer. Default value is NULL.
|
|
1002
930
|
*/
|
|
1003
931
|
metadataBuffer?: Uint8Array;
|
|
1004
932
|
/**
|
|
1005
|
-
* This parameter only
|
|
933
|
+
* This parameter applies only to video data in Texture format. Refers to the size of the metadata. Default value is 0.
|
|
1006
934
|
*/
|
|
1007
935
|
metadataSize?: number;
|
|
1008
936
|
/**
|
|
1009
|
-
*
|
|
937
|
+
* Alpha channel data output by portrait segmentation algorithm. This data matches the size of the video frame, with pixel values ranging from [0,255], where 0 indicates background and 255 indicates foreground (portrait).
|
|
938
|
+
* You can use this parameter to render the video background into various effects such as transparent, solid color, image, video, etc. In custom video rendering scenarios, ensure that both the input video frame and alphaBuffer are of Full Range type; other types may cause incorrect rendering of alpha data.
|
|
1010
939
|
*/
|
|
1011
940
|
alphaBuffer?: Uint8Array;
|
|
1012
941
|
/**
|
|
1013
|
-
*
|
|
1014
|
-
* Automatically by setting this parameter to true.
|
|
1015
|
-
*
|
|
942
|
+
* For video data in BGRA or RGBA format, you can set the alpha channel data in either of the following ways:
|
|
943
|
+
* Automatically fill by setting this parameter to true.
|
|
944
|
+
* Set via the alphaBuffer parameter. This parameter applies only to video data in BGRA or RGBA format. Specifies whether to extract the alpha channel data from the video frame and automatically fill it into alphaBuffer : true : Extract and fill alpha channel data. false : (Default) Do not extract and fill alpha channel data.
|
|
1016
945
|
*/
|
|
1017
946
|
fillAlphaBuffer?: boolean;
|
|
1018
947
|
/**
|
|
1019
|
-
* When the video frame contains alpha channel data,
|
|
948
|
+
* When the video frame contains alpha channel data, sets the relative position of alphaBuffer and the video frame. See AlphaStitchMode.
|
|
1020
949
|
*/
|
|
1021
950
|
alphaStitchMode?: AlphaStitchMode;
|
|
1022
951
|
/**
|
|
1023
|
-
* This parameter only
|
|
952
|
+
* This parameter applies only to video data in Windows Texture format. Refers to a pointer to an object of type ID3D11Texture2D used by the video frame.
|
|
1024
953
|
*/
|
|
1025
954
|
d3d11Texture2d?: any;
|
|
1026
955
|
/**
|
|
1027
|
-
* This parameter only
|
|
956
|
+
* This parameter applies only to video data in Windows Texture format. Refers to the index of the ID3D11Texture2D texture object used by the video frame in the ID3D11Texture2D array.
|
|
1028
957
|
*/
|
|
1029
958
|
textureSliceIndex?: number;
|
|
1030
959
|
/**
|
|
@@ -1032,89 +961,90 @@ export class ExternalVideoFrame {
|
|
|
1032
961
|
*/
|
|
1033
962
|
hdr10MetadataInfo?: Hdr10MetadataInfo;
|
|
1034
963
|
/**
|
|
1035
|
-
*
|
|
964
|
+
* Color space properties of the video frame. By default, Full Range and BT.709 standard configurations are applied. You can customize the settings based on your requirements for custom capture and rendering. See [VideoColorSpace](https://developer.mozilla.org/en-US/docs/Web/API/VideoColorSpace).
|
|
1036
965
|
*/
|
|
1037
966
|
colorSpace?: ColorSpace;
|
|
1038
967
|
}
|
|
1039
968
|
|
|
1040
969
|
/**
|
|
1041
|
-
*
|
|
970
|
+
* Video frame property settings.
|
|
1042
971
|
*
|
|
1043
|
-
*
|
|
972
|
+
* The buffer is provided as a pointer to a pointer. This interface cannot modify the buffer pointer, only the buffer content.
|
|
1044
973
|
*/
|
|
1045
974
|
export class VideoFrame {
|
|
1046
975
|
/**
|
|
1047
|
-
*
|
|
976
|
+
* Pixel format. See VideoPixelFormat.
|
|
1048
977
|
*/
|
|
1049
978
|
type?: VideoPixelFormat;
|
|
1050
979
|
/**
|
|
1051
|
-
*
|
|
980
|
+
* Video pixel width.
|
|
1052
981
|
*/
|
|
1053
982
|
width?: number;
|
|
1054
983
|
/**
|
|
1055
|
-
*
|
|
984
|
+
* Video pixel height.
|
|
1056
985
|
*/
|
|
1057
986
|
height?: number;
|
|
1058
987
|
/**
|
|
1059
|
-
* For YUV data, the
|
|
988
|
+
* For YUV data, indicates the row stride of the Y buffer; for RGBA data, indicates the total data length. When processing video data, you need to handle the offset between rows of pixel data according to this parameter, otherwise image distortion may occur.
|
|
1060
989
|
*/
|
|
1061
990
|
yStride?: number;
|
|
1062
991
|
/**
|
|
1063
|
-
* For YUV data, the
|
|
992
|
+
* For YUV data, indicates the row stride of the U buffer; for RGBA data, the value is 0. When processing video data, you need to handle the offset between rows of pixel data according to this parameter, otherwise image distortion may occur.
|
|
1064
993
|
*/
|
|
1065
994
|
uStride?: number;
|
|
1066
995
|
/**
|
|
1067
|
-
* For YUV data, the
|
|
996
|
+
* For YUV data, indicates the row stride of the V buffer; for RGBA data, the value is 0. When processing video data, you need to handle the offset between rows of pixel data according to this parameter, otherwise image distortion may occur.
|
|
1068
997
|
*/
|
|
1069
998
|
vStride?: number;
|
|
1070
999
|
/**
|
|
1071
|
-
* For YUV data, the pointer to the Y buffer; for RGBA data, the data buffer.
|
|
1000
|
+
* For YUV data, indicates the pointer to the Y buffer; for RGBA data, indicates the data buffer.
|
|
1072
1001
|
*/
|
|
1073
1002
|
yBuffer?: Uint8Array;
|
|
1074
1003
|
/**
|
|
1075
|
-
* For YUV data, the pointer to the U buffer; for RGBA data, the value is
|
|
1004
|
+
* For YUV data, indicates the pointer to the U buffer; for RGBA data, the value is empty.
|
|
1076
1005
|
*/
|
|
1077
1006
|
uBuffer?: Uint8Array;
|
|
1078
1007
|
/**
|
|
1079
|
-
* For YUV data, the pointer to the V buffer; for RGBA data, the value is
|
|
1008
|
+
* For YUV data, indicates the pointer to the V buffer; for RGBA data, the value is empty.
|
|
1080
1009
|
*/
|
|
1081
1010
|
vBuffer?: Uint8Array;
|
|
1082
1011
|
/**
|
|
1083
|
-
*
|
|
1012
|
+
* Sets the clockwise rotation angle of the frame before rendering the video. Currently supports 0, 90, 180, and 270 degrees.
|
|
1084
1013
|
*/
|
|
1085
1014
|
rotation?: number;
|
|
1086
1015
|
/**
|
|
1087
|
-
* The Unix timestamp (
|
|
1016
|
+
* The Unix timestamp (in milliseconds) when the video frame is rendered. This timestamp can be used to guide video frame rendering. This parameter is required.
|
|
1088
1017
|
*/
|
|
1089
1018
|
renderTimeMs?: number;
|
|
1090
1019
|
/**
|
|
1091
|
-
* Reserved
|
|
1020
|
+
* Reserved parameter.
|
|
1092
1021
|
*/
|
|
1093
1022
|
avsync_type?: number;
|
|
1094
1023
|
/**
|
|
1095
|
-
* This parameter only
|
|
1024
|
+
* This parameter applies only to video data in Texture format. Indicates the data buffer of MetaData. Default is NULL.
|
|
1096
1025
|
*/
|
|
1097
1026
|
metadata_buffer?: Uint8Array;
|
|
1098
1027
|
/**
|
|
1099
|
-
* This parameter only
|
|
1028
|
+
* This parameter applies only to video data in Texture format. Indicates the size of MetaData. Default is 0.
|
|
1100
1029
|
*/
|
|
1101
1030
|
metadata_size?: number;
|
|
1102
1031
|
/**
|
|
1103
|
-
* This parameter only
|
|
1032
|
+
* This parameter applies only to video data in Texture format. Texture ID.
|
|
1104
1033
|
*/
|
|
1105
1034
|
textureId?: number;
|
|
1106
1035
|
/**
|
|
1107
|
-
* This parameter only
|
|
1036
|
+
* This parameter applies only to video data in Texture format. A 4x4 transformation matrix input, typically an identity matrix.
|
|
1108
1037
|
*/
|
|
1109
1038
|
matrix?: number[];
|
|
1110
1039
|
/**
|
|
1111
|
-
*
|
|
1112
|
-
*
|
|
1113
|
-
*
|
|
1040
|
+
* Alpha channel data output by the portrait segmentation algorithm. This data matches the size of the video frame. Each pixel value ranges from [0, 255], where 0 represents the background and 255 represents the foreground (portrait).
|
|
1041
|
+
* You can use this parameter to render the video background with various effects, such as transparency, solid color, image, video, etc.
|
|
1042
|
+
* In custom video rendering scenarios, ensure that both the video frame and alphaBuffer are of Full Range type; other types may cause abnormal Alpha data rendering.
|
|
1043
|
+
* Make sure that alphaBuffer matches the video frame size (width × height) exactly, otherwise the app may crash.
|
|
1114
1044
|
*/
|
|
1115
1045
|
alphaBuffer?: Uint8Array;
|
|
1116
1046
|
/**
|
|
1117
|
-
* When the video frame contains
|
|
1047
|
+
* When the video frame contains Alpha channel data, sets the relative position between alphaBuffer and the video frame. See AlphaStitchMode.
|
|
1118
1048
|
*/
|
|
1119
1049
|
alphaStitchMode?: AlphaStitchMode;
|
|
1120
1050
|
/**
|
|
@@ -1122,7 +1052,7 @@ export class VideoFrame {
|
|
|
1122
1052
|
*/
|
|
1123
1053
|
pixelBuffer?: Uint8Array;
|
|
1124
1054
|
/**
|
|
1125
|
-
*
|
|
1055
|
+
* Metadata in the video frame. This parameter requires [contacting technical support](https://www.agora.io/cn/contact/) to use.
|
|
1126
1056
|
*/
|
|
1127
1057
|
metaInfo?: IVideoFrameMetaInfo;
|
|
1128
1058
|
/**
|
|
@@ -1130,7 +1060,7 @@ export class VideoFrame {
|
|
|
1130
1060
|
*/
|
|
1131
1061
|
hdr10MetadataInfo?: Hdr10MetadataInfo;
|
|
1132
1062
|
/**
|
|
1133
|
-
*
|
|
1063
|
+
* The color space property of the video frame. By default, Full Range and BT.709 standard configuration is applied. You can customize this setting based on your custom capture and rendering needs. See [VideoColorSpace](https://developer.mozilla.org/en-US/docs/Web/API/VideoColorSpace).
|
|
1134
1064
|
*/
|
|
1135
1065
|
colorSpace?: ColorSpace;
|
|
1136
1066
|
}
|
|
@@ -1154,57 +1084,139 @@ export enum MediaPlayerSourceType {
|
|
|
1154
1084
|
}
|
|
1155
1085
|
|
|
1156
1086
|
/**
|
|
1157
|
-
*
|
|
1087
|
+
* Video observation position.
|
|
1158
1088
|
*/
|
|
1159
1089
|
export enum VideoModulePosition {
|
|
1160
1090
|
/**
|
|
1161
|
-
* 1:
|
|
1091
|
+
* 1: Position after local video capture and preprocessing, corresponding to the onCaptureVideoFrame callback. The video observed here includes video preprocessing effects, which can be verified by enabling beauty effects, virtual background, or watermark.
|
|
1162
1092
|
*/
|
|
1163
1093
|
PositionPostCapturer = 1 << 0,
|
|
1164
1094
|
/**
|
|
1165
|
-
* 2:
|
|
1095
|
+
* 2: Position before rendering of received remote video, corresponding to the onRenderVideoFrame callback.
|
|
1166
1096
|
*/
|
|
1167
1097
|
PositionPreRenderer = 1 << 1,
|
|
1168
1098
|
/**
|
|
1169
|
-
* 4:
|
|
1170
|
-
*
|
|
1171
|
-
*
|
|
1099
|
+
* 4: Position before local video encoding, corresponding to the onPreEncodeVideoFrame callback. The video observed here includes preprocessing and pre-encoding effects:
|
|
1100
|
+
* For preprocessing effects, you can verify by enabling beauty effects, virtual background, or watermark.
|
|
1101
|
+
* For pre-encoding effects, you can verify by setting a low frame rate (e.g., 5 fps).
|
|
1172
1102
|
*/
|
|
1173
1103
|
PositionPreEncoder = 1 << 2,
|
|
1174
1104
|
/**
|
|
1175
|
-
* 8:
|
|
1105
|
+
* 8: Position after local video capture and before preprocessing. The video observed here does not include preprocessing effects, which can be verified by enabling beauty effects, virtual background, or watermark.
|
|
1176
1106
|
*/
|
|
1177
1107
|
PositionPostCapturerOrigin = 1 << 3,
|
|
1178
1108
|
}
|
|
1179
1109
|
|
|
1180
1110
|
/**
|
|
1181
|
-
*
|
|
1111
|
+
* @ignore
|
|
1112
|
+
*/
|
|
1113
|
+
export enum ContentInspectResult {
|
|
1114
|
+
/**
|
|
1115
|
+
* @ignore
|
|
1116
|
+
*/
|
|
1117
|
+
ContentInspectNeutral = 1,
|
|
1118
|
+
/**
|
|
1119
|
+
* @ignore
|
|
1120
|
+
*/
|
|
1121
|
+
ContentInspectSexy = 2,
|
|
1122
|
+
/**
|
|
1123
|
+
* @ignore
|
|
1124
|
+
*/
|
|
1125
|
+
ContentInspectPorn = 3,
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
/**
|
|
1129
|
+
* The type of video content moderation module.
|
|
1130
|
+
*/
|
|
1131
|
+
export enum ContentInspectType {
|
|
1132
|
+
/**
|
|
1133
|
+
* 0: (Default) This module has no actual function. Do not set type to this value.
|
|
1134
|
+
*/
|
|
1135
|
+
ContentInspectInvalid = 0,
|
|
1136
|
+
/**
|
|
1137
|
+
* @ignore
|
|
1138
|
+
*/
|
|
1139
|
+
ContentInspectModeration = 1,
|
|
1140
|
+
/**
|
|
1141
|
+
* 2: Uses Agora's self-developed plugin to capture and upload screenshots. The SDK captures and uploads screenshots of the video stream.
|
|
1142
|
+
*/
|
|
1143
|
+
ContentInspectSupervision = 2,
|
|
1144
|
+
/**
|
|
1145
|
+
* 3: Uses a Marketplace plugin to capture and upload screenshots. The SDK uses a Marketplace video moderation plugin to capture and upload screenshots of the video stream.
|
|
1146
|
+
*/
|
|
1147
|
+
ContentInspectImageModeration = 3,
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* ContentInspectModule structure used to configure the frequency of local screenshot uploads.
|
|
1152
|
+
*/
|
|
1153
|
+
export class ContentInspectModule {
|
|
1154
|
+
/**
|
|
1155
|
+
* Type of function module. See ContentInspectType.
|
|
1156
|
+
*/
|
|
1157
|
+
type?: ContentInspectType;
|
|
1158
|
+
/**
|
|
1159
|
+
* Interval for local screenshot uploads in seconds. The value must be greater than 0. Default is 0, which means no screenshot upload. Recommended value is 10 seconds, but you can adjust it based on your business needs.
|
|
1160
|
+
*/
|
|
1161
|
+
interval?: number;
|
|
1162
|
+
/**
|
|
1163
|
+
* Position of the video observer. See VideoModulePosition.
|
|
1164
|
+
*/
|
|
1165
|
+
position?: VideoModulePosition;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
/**
|
|
1169
|
+
* Local screenshot upload configuration.
|
|
1170
|
+
*/
|
|
1171
|
+
export class ContentInspectConfig {
|
|
1172
|
+
/**
|
|
1173
|
+
* Additional information, maximum length is 1024 bytes.
|
|
1174
|
+
* The SDK uploads this information along with the screenshot to the Agora server; after the screenshot is complete, the Agora server sends the additional information to your server along with the callback notification.
|
|
1175
|
+
*/
|
|
1176
|
+
extraInfo?: string;
|
|
1177
|
+
/**
|
|
1178
|
+
* @ignore
|
|
1179
|
+
*/
|
|
1180
|
+
serverConfig?: string;
|
|
1181
|
+
/**
|
|
1182
|
+
* Function modules. See ContentInspectModule.
|
|
1183
|
+
* You can configure up to 32 ContentInspectModule instances. The value range of MAX_CONTENT_INSPECT_MODULE_COUNT is an integer in [1,32]. Only one instance can be configured per function module. Currently, only screenshot upload is supported.
|
|
1184
|
+
*/
|
|
1185
|
+
modules?: ContentInspectModule[];
|
|
1186
|
+
/**
|
|
1187
|
+
* Number of function modules, i.e., the number of configured ContentInspectModule instances. Must match the number of instances configured in modules. Maximum value is 32.
|
|
1188
|
+
*/
|
|
1189
|
+
moduleCount?: number;
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
/**
|
|
1193
|
+
* Video snapshot settings.
|
|
1182
1194
|
*/
|
|
1183
1195
|
export class SnapshotConfig {
|
|
1184
1196
|
/**
|
|
1185
|
-
*
|
|
1197
|
+
* Make sure the directory exists and is writable. Local path to save the snapshot, including file name and format. For example:
|
|
1186
1198
|
* Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\example.jpg
|
|
1187
|
-
* macOS: ~/Library/Logs/example.jpg
|
|
1199
|
+
* macOS: ~/Library/Logs/example.jpg
|
|
1188
1200
|
*/
|
|
1189
1201
|
filePath?: string;
|
|
1190
1202
|
/**
|
|
1191
|
-
* The position of the
|
|
1203
|
+
* The position of the video frame in the video pipeline for the snapshot. See VideoModulePosition.
|
|
1192
1204
|
*/
|
|
1193
1205
|
position?: VideoModulePosition;
|
|
1194
1206
|
}
|
|
1195
1207
|
|
|
1196
1208
|
/**
|
|
1197
|
-
* This class is used to
|
|
1209
|
+
* This class is used to obtain raw PCM audio data.
|
|
1198
1210
|
*
|
|
1199
|
-
* You can inherit this class and implement the onFrame callback to get
|
|
1211
|
+
* You can inherit this class and implement the onFrame callback to get PCM audio data.
|
|
1200
1212
|
*/
|
|
1201
1213
|
export interface IAudioPcmFrameSink {
|
|
1202
1214
|
/**
|
|
1203
|
-
*
|
|
1215
|
+
* Callback when an audio frame is received.
|
|
1204
1216
|
*
|
|
1205
|
-
* After registering the audio
|
|
1217
|
+
* After registering the audio data observer, this callback is triggered each time an audio frame is received to report the audio frame information.
|
|
1206
1218
|
*
|
|
1207
|
-
* @param frame
|
|
1219
|
+
* @param frame Audio frame information. See AudioPcmFrame.
|
|
1208
1220
|
*/
|
|
1209
1221
|
onFrame?(frame: AudioPcmFrame): void;
|
|
1210
1222
|
}
|
|
@@ -1224,37 +1236,39 @@ export enum AudioFrameType {
|
|
|
1224
1236
|
*/
|
|
1225
1237
|
export class AudioFrame {
|
|
1226
1238
|
/**
|
|
1227
|
-
*
|
|
1239
|
+
* Audio frame type. See AudioFrameType.
|
|
1228
1240
|
*/
|
|
1229
1241
|
type?: AudioFrameType;
|
|
1230
1242
|
/**
|
|
1231
|
-
*
|
|
1243
|
+
* Number of samples per channel.
|
|
1232
1244
|
*/
|
|
1233
1245
|
samplesPerChannel?: number;
|
|
1234
1246
|
/**
|
|
1235
|
-
*
|
|
1247
|
+
* Number of bytes per sample. For PCM, 16-bit (2 bytes) is typically used.
|
|
1236
1248
|
*/
|
|
1237
1249
|
bytesPerSample?: BytesPerSample;
|
|
1238
1250
|
/**
|
|
1239
|
-
*
|
|
1240
|
-
* 1: Mono
|
|
1241
|
-
* 2: Stereo
|
|
1251
|
+
* Number of channels (if stereo, the data is interleaved).
|
|
1252
|
+
* 1: Mono
|
|
1253
|
+
* 2: Stereo
|
|
1242
1254
|
*/
|
|
1243
1255
|
channels?: number;
|
|
1244
1256
|
/**
|
|
1245
|
-
*
|
|
1257
|
+
* Number of samples per second per channel.
|
|
1246
1258
|
*/
|
|
1247
1259
|
samplesPerSec?: number;
|
|
1248
1260
|
/**
|
|
1249
|
-
*
|
|
1261
|
+
* Audio data buffer (if stereo, the data is interleaved).
|
|
1262
|
+
* Buffer data size buffer = samples × channels × bytesPerSample.
|
|
1250
1263
|
*/
|
|
1251
1264
|
buffer?: Uint8Array;
|
|
1252
1265
|
/**
|
|
1253
|
-
*
|
|
1266
|
+
* Render timestamp of the external audio frame.
|
|
1267
|
+
* You can use this timestamp to restore the order of audio frames; in scenarios with video (including those using external video sources), this parameter can be used to achieve audio-video synchronization.
|
|
1254
1268
|
*/
|
|
1255
1269
|
renderTimeMs?: number;
|
|
1256
1270
|
/**
|
|
1257
|
-
* Reserved
|
|
1271
|
+
* Reserved parameter.
|
|
1258
1272
|
*/
|
|
1259
1273
|
avsync_type?: number;
|
|
1260
1274
|
/**
|
|
@@ -1304,44 +1318,47 @@ export enum AudioFramePosition {
|
|
|
1304
1318
|
/**
|
|
1305
1319
|
* Audio data format.
|
|
1306
1320
|
*
|
|
1307
|
-
* The SDK sets the audio data format in the following callbacks
|
|
1308
|
-
* The SDK calculates the sampling interval
|
|
1309
|
-
*
|
|
1321
|
+
* The SDK sets the audio data format in the following callbacks based on AudioParams : onRecordAudioFrame onPlaybackAudioFrame onMixedAudioFrame
|
|
1322
|
+
* The SDK calculates the sampling interval using the samplesPerCall, sampleRate, and channel parameters in AudioParams, and triggers the onRecordAudioFrame, onPlaybackAudioFrame, onMixedAudioFrame, and onEarMonitoringAudioFrame callbacks based on that interval.
|
|
1323
|
+
* Sampling interval = samplesPerCall / (sampleRate × channel).
|
|
1324
|
+
* Ensure the sampling interval is not less than 0.01 (s).
|
|
1310
1325
|
*/
|
|
1311
1326
|
export class AudioParams {
|
|
1312
1327
|
/**
|
|
1313
|
-
*
|
|
1314
|
-
* 8000
|
|
1315
|
-
* (
|
|
1316
|
-
* 32000
|
|
1328
|
+
* Sampling rate of the data in Hz. Supported values:
|
|
1329
|
+
* 8000
|
|
1330
|
+
* 16000 (default)
|
|
1331
|
+
* 32000
|
|
1317
1332
|
* 44100
|
|
1318
1333
|
* 48000
|
|
1319
1334
|
*/
|
|
1320
1335
|
sample_rate?: number;
|
|
1321
1336
|
/**
|
|
1322
|
-
*
|
|
1323
|
-
* 1: (
|
|
1324
|
-
* 2: Stereo
|
|
1337
|
+
* Number of audio channels. Supported values:
|
|
1338
|
+
* 1: Mono (default)
|
|
1339
|
+
* 2: Stereo
|
|
1325
1340
|
*/
|
|
1326
1341
|
channels?: number;
|
|
1327
1342
|
/**
|
|
1328
|
-
*
|
|
1343
|
+
* Usage mode of the data. See RawAudioFrameOpModeType.
|
|
1329
1344
|
*/
|
|
1330
1345
|
mode?: RawAudioFrameOpModeType;
|
|
1331
1346
|
/**
|
|
1332
|
-
*
|
|
1347
|
+
* Number of samples per call, typically 1024 in scenarios like media push.
|
|
1333
1348
|
*/
|
|
1334
1349
|
samples_per_call?: number;
|
|
1335
1350
|
}
|
|
1336
1351
|
|
|
1337
1352
|
/**
|
|
1338
|
-
*
|
|
1353
|
+
* Audio frame observer.
|
|
1354
|
+
*
|
|
1355
|
+
* You can call registerAudioFrameObserver to register or unregister the IAudioFrameObserverBase audio observer.
|
|
1339
1356
|
*/
|
|
1340
1357
|
export interface IAudioFrameObserverBase {
|
|
1341
1358
|
/**
|
|
1342
|
-
*
|
|
1359
|
+
* Receives the raw audio data for recording.
|
|
1343
1360
|
*
|
|
1344
|
-
* To ensure
|
|
1361
|
+
* To ensure the recorded audio data format meets expectations, you can set the format as follows: Call setRecordingAudioFrameParameters to set the audio format, then call registerAudioFrameObserver to register the audio frame observer. The SDK calculates the sampling interval based on the parameters in this method and triggers the onRecordAudioFrame callback accordingly.
|
|
1345
1362
|
*
|
|
1346
1363
|
* @param channelId The channel ID.
|
|
1347
1364
|
* @param audioFrame The raw audio data. See AudioFrame.
|
|
@@ -1349,9 +1366,9 @@ export interface IAudioFrameObserverBase {
|
|
|
1349
1366
|
onRecordAudioFrame?(channelId: string, audioFrame: AudioFrame): void;
|
|
1350
1367
|
|
|
1351
1368
|
/**
|
|
1352
|
-
*
|
|
1369
|
+
* Receives the raw audio data for playback.
|
|
1353
1370
|
*
|
|
1354
|
-
* To ensure
|
|
1371
|
+
* To ensure the playback audio data format meets expectations, you can set the format as follows: Call setPlaybackAudioFrameParameters to set the audio format, then call registerAudioFrameObserver to register the audio frame observer. The SDK calculates the sampling interval based on the parameters in this method and triggers the onPlaybackAudioFrame callback accordingly.
|
|
1355
1372
|
*
|
|
1356
1373
|
* @param channelId The channel ID.
|
|
1357
1374
|
* @param audioFrame The raw audio data. See AudioFrame.
|
|
@@ -1359,19 +1376,19 @@ export interface IAudioFrameObserverBase {
|
|
|
1359
1376
|
onPlaybackAudioFrame?(channelId: string, audioFrame: AudioFrame): void;
|
|
1360
1377
|
|
|
1361
1378
|
/**
|
|
1362
|
-
* Retrieves the
|
|
1379
|
+
* Retrieves the audio data after mixing the captured and playback audio.
|
|
1363
1380
|
*
|
|
1364
|
-
* To ensure that the
|
|
1381
|
+
* To ensure that the format of the mixed audio data from capture and playback meets expectations, you can set the audio data format using the following method: After calling setMixedAudioFrameParameters to set the audio data format, call registerAudioFrameObserver to register the audio observer object. The SDK calculates the sampling interval based on the parameters in this method and triggers the onMixedAudioFrame callback accordingly.
|
|
1365
1382
|
*
|
|
1366
|
-
* @param channelId
|
|
1367
|
-
* @param audioFrame
|
|
1383
|
+
* @param channelId Channel ID.
|
|
1384
|
+
* @param audioFrame Raw audio data. See AudioFrame.
|
|
1368
1385
|
*/
|
|
1369
1386
|
onMixedAudioFrame?(channelId: string, audioFrame: AudioFrame): void;
|
|
1370
1387
|
|
|
1371
1388
|
/**
|
|
1372
|
-
*
|
|
1389
|
+
* Receives the raw audio data for ear monitoring.
|
|
1373
1390
|
*
|
|
1374
|
-
*
|
|
1391
|
+
* To ensure the ear monitoring audio data format meets expectations, you can set it as follows: Call setEarMonitoringAudioFrameParameters to set the audio format, then call registerAudioFrameObserver to register the audio frame observer. The SDK calculates the sampling interval based on the parameters in this method and triggers the onEarMonitoringAudioFrame callback accordingly.
|
|
1375
1392
|
*
|
|
1376
1393
|
* @param audioFrame The raw audio data. See AudioFrame.
|
|
1377
1394
|
*/
|
|
@@ -1379,16 +1396,18 @@ export interface IAudioFrameObserverBase {
|
|
|
1379
1396
|
}
|
|
1380
1397
|
|
|
1381
1398
|
/**
|
|
1382
|
-
*
|
|
1399
|
+
* Audio frame observer.
|
|
1400
|
+
*
|
|
1401
|
+
* You can call registerAudioFrameObserver to register or unregister the IAudioFrameObserver.
|
|
1383
1402
|
*/
|
|
1384
1403
|
export interface IAudioFrameObserver extends IAudioFrameObserverBase {
|
|
1385
1404
|
/**
|
|
1386
|
-
*
|
|
1405
|
+
* Receives the audio of subscribed remote users before mixing.
|
|
1387
1406
|
*
|
|
1388
1407
|
* Due to framework limitations, this callback does not support sending processed audio data back to the SDK.
|
|
1389
1408
|
*
|
|
1390
1409
|
* @param channelId The channel ID.
|
|
1391
|
-
* @param uid The ID of subscribed remote
|
|
1410
|
+
* @param uid The ID of the subscribed remote user.
|
|
1392
1411
|
* @param audioFrame The raw audio data. See AudioFrame.
|
|
1393
1412
|
*/
|
|
1394
1413
|
onPlaybackAudioFrameBeforeMixing?(
|
|
@@ -1399,52 +1418,52 @@ export interface IAudioFrameObserver extends IAudioFrameObserverBase {
|
|
|
1399
1418
|
}
|
|
1400
1419
|
|
|
1401
1420
|
/**
|
|
1402
|
-
*
|
|
1421
|
+
* Audio spectrum data.
|
|
1403
1422
|
*/
|
|
1404
1423
|
export class AudioSpectrumData {
|
|
1405
1424
|
/**
|
|
1406
|
-
*
|
|
1425
|
+
* Audio spectrum data. The SDK divides the sound frequency into 256 bands and reports the energy value of each band through this parameter. Each energy value ranges from [-300, 1], in dBFS.
|
|
1407
1426
|
*/
|
|
1408
1427
|
audioSpectrumData?: number[];
|
|
1409
1428
|
/**
|
|
1410
|
-
* The audio spectrum data
|
|
1429
|
+
* The length of the audio spectrum data is 256.
|
|
1411
1430
|
*/
|
|
1412
1431
|
dataLength?: number;
|
|
1413
1432
|
}
|
|
1414
1433
|
|
|
1415
1434
|
/**
|
|
1416
|
-
* Audio spectrum information of
|
|
1435
|
+
* Audio spectrum information of a remote user.
|
|
1417
1436
|
*/
|
|
1418
1437
|
export class UserAudioSpectrumInfo {
|
|
1419
1438
|
/**
|
|
1420
|
-
*
|
|
1439
|
+
* Remote user ID.
|
|
1421
1440
|
*/
|
|
1422
1441
|
uid?: number;
|
|
1423
1442
|
/**
|
|
1424
|
-
* Audio spectrum
|
|
1443
|
+
* Audio spectrum data of the remote user. See AudioSpectrumData.
|
|
1425
1444
|
*/
|
|
1426
1445
|
spectrumData?: AudioSpectrumData;
|
|
1427
1446
|
}
|
|
1428
1447
|
|
|
1429
1448
|
/**
|
|
1430
|
-
*
|
|
1449
|
+
* Audio spectrum observer.
|
|
1431
1450
|
*/
|
|
1432
1451
|
export interface IAudioSpectrumObserver {
|
|
1433
1452
|
/**
|
|
1434
|
-
* Gets the
|
|
1453
|
+
* Gets the local audio spectrum.
|
|
1435
1454
|
*
|
|
1436
|
-
* After successfully calling registerAudioSpectrumObserver to implement the onLocalAudioSpectrum callback in IAudioSpectrumObserver and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK triggers this callback
|
|
1455
|
+
* After successfully calling registerAudioSpectrumObserver to implement the onLocalAudioSpectrum callback in IAudioSpectrumObserver and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK triggers this callback at the interval you set to report the spectrum of local audio data before encoding.
|
|
1437
1456
|
*
|
|
1438
|
-
* @param data The audio spectrum data
|
|
1457
|
+
* @param data The local user's audio spectrum data. See AudioSpectrumData.
|
|
1439
1458
|
*/
|
|
1440
1459
|
onLocalAudioSpectrum?(data: AudioSpectrumData): void;
|
|
1441
1460
|
|
|
1442
1461
|
/**
|
|
1443
1462
|
* Gets the remote audio spectrum.
|
|
1444
1463
|
*
|
|
1445
|
-
* After successfully calling registerAudioSpectrumObserver to implement the onRemoteAudioSpectrum callback in
|
|
1464
|
+
* After successfully calling registerAudioSpectrumObserver to implement the onRemoteAudioSpectrum callback in IAudioSpectrumObserver and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK triggers this callback at the interval you set to report the spectrum of received remote audio data.
|
|
1446
1465
|
*
|
|
1447
|
-
* @param spectrums The audio spectrum information of
|
|
1466
|
+
* @param spectrums The audio spectrum information of remote users. See UserAudioSpectrumInfo. The number of elements in the array equals the number of remote users monitored by the SDK. An empty array indicates no remote user audio spectrum is detected.
|
|
1448
1467
|
* @param spectrumNumber The number of remote users.
|
|
1449
1468
|
*/
|
|
1450
1469
|
onRemoteAudioSpectrum?(
|
|
@@ -1454,18 +1473,19 @@ export interface IAudioSpectrumObserver {
|
|
|
1454
1473
|
}
|
|
1455
1474
|
|
|
1456
1475
|
/**
|
|
1457
|
-
*
|
|
1476
|
+
* Class used to receive encoded video frames.
|
|
1458
1477
|
*/
|
|
1459
1478
|
export interface IVideoEncodedFrameObserver {
|
|
1460
1479
|
/**
|
|
1461
|
-
* Reports that
|
|
1480
|
+
* Reports that a remote encoded video frame has been received.
|
|
1462
1481
|
*
|
|
1463
|
-
*
|
|
1482
|
+
* When you call setRemoteVideoSubscriptionOptions and set encodedFrameOnly to true, the SDK triggers this callback locally to report the received encoded video frame information.
|
|
1464
1483
|
*
|
|
1465
|
-
* @param
|
|
1466
|
-
* @param
|
|
1467
|
-
* @param
|
|
1468
|
-
* @param
|
|
1484
|
+
* @param channelId Channel name.
|
|
1485
|
+
* @param uid Remote user ID.
|
|
1486
|
+
* @param imageBuffer Video image buffer.
|
|
1487
|
+
* @param length Length of the video image data.
|
|
1488
|
+
* @param videoEncodedFrameInfo Encoded video frame information. See EncodedVideoFrameInfo.
|
|
1469
1489
|
*/
|
|
1470
1490
|
onEncodedVideoFrameReceived?(
|
|
1471
1491
|
uid: number,
|
|
@@ -1476,30 +1496,38 @@ export interface IVideoEncodedFrameObserver {
|
|
|
1476
1496
|
}
|
|
1477
1497
|
|
|
1478
1498
|
/**
|
|
1479
|
-
*
|
|
1499
|
+
* Video frame processing mode.
|
|
1480
1500
|
*/
|
|
1481
1501
|
export enum VideoFrameProcessMode {
|
|
1482
1502
|
/**
|
|
1483
|
-
* Read-only mode.
|
|
1503
|
+
* Read-only mode.
|
|
1504
|
+
* In read-only mode, you do not modify the video frame. The video observer acts as a renderer.
|
|
1484
1505
|
*/
|
|
1485
1506
|
ProcessModeReadOnly = 0,
|
|
1486
1507
|
/**
|
|
1487
|
-
* Read
|
|
1508
|
+
* Read-write mode.
|
|
1509
|
+
* In read-write mode, you modify the video frame. The video observer acts as a video filter.
|
|
1488
1510
|
*/
|
|
1489
1511
|
ProcessModeReadWrite = 1,
|
|
1490
1512
|
}
|
|
1491
1513
|
|
|
1492
1514
|
/**
|
|
1493
|
-
*
|
|
1515
|
+
* Video frame observer.
|
|
1516
|
+
*
|
|
1517
|
+
* You can call registerVideoFrameObserver to register or unregister the IVideoFrameObserver video observer.
|
|
1494
1518
|
*/
|
|
1495
1519
|
export interface IVideoFrameObserver {
|
|
1496
1520
|
/**
|
|
1497
|
-
*
|
|
1521
|
+
* Gets the video data captured by the local device.
|
|
1498
1522
|
*
|
|
1499
|
-
* You can get raw video data
|
|
1523
|
+
* You can get the raw video data captured by the local device in this callback.
|
|
1524
|
+
* If the video data format you receive is RGBA, the SDK does not support processing the Alpha channel.
|
|
1525
|
+
* When modifying parameters in videoFrame, ensure they match the actual video frame data in the buffer. Otherwise, unexpected rotation or distortion may occur in the local preview or remote video.
|
|
1526
|
+
* It is recommended to implement this callback using the C++ API.
|
|
1527
|
+
* Due to framework limitations, this callback does not support sending the processed video data back to the SDK.
|
|
1500
1528
|
*
|
|
1501
|
-
* @param sourceType
|
|
1502
|
-
* @param videoFrame
|
|
1529
|
+
* @param sourceType Type of video source, which may include camera, screen, or media player. See VideoSourceType.
|
|
1530
|
+
* @param videoFrame Video frame data. See VideoFrame. The default format of the video frame data obtained through this callback is:
|
|
1503
1531
|
* macOS: I420
|
|
1504
1532
|
* Windows: YUV420
|
|
1505
1533
|
*/
|
|
@@ -1509,16 +1537,17 @@ export interface IVideoFrameObserver {
|
|
|
1509
1537
|
): void;
|
|
1510
1538
|
|
|
1511
1539
|
/**
|
|
1512
|
-
*
|
|
1540
|
+
* Gets the video data before local encoding.
|
|
1513
1541
|
*
|
|
1514
|
-
* After
|
|
1515
|
-
*
|
|
1516
|
-
* It
|
|
1517
|
-
* Due to framework limitations, this callback does not support sending processed video data back to the SDK.
|
|
1518
|
-
* The video data
|
|
1542
|
+
* After successfully registering the video data observer, the SDK triggers this callback when each video frame is captured. You can get the video data before encoding and process it as needed.
|
|
1543
|
+
* After processing, you can pass the processed video data back to the SDK in this callback.
|
|
1544
|
+
* It is recommended to implement this callback using the C++ API.
|
|
1545
|
+
* Due to framework limitations, this callback does not support sending the processed video data back to the SDK.
|
|
1546
|
+
* The video data obtained here has already been pre-processed, such as cropping, rotation, beautification, etc.
|
|
1547
|
+
* When modifying parameters in videoFrame, ensure they match the actual video frame data in the buffer. Otherwise, unexpected rotation or distortion may occur in the local preview or remote video.
|
|
1519
1548
|
*
|
|
1520
|
-
* @param sourceType
|
|
1521
|
-
* @param videoFrame
|
|
1549
|
+
* @param sourceType Type of video source. See VideoSourceType.
|
|
1550
|
+
* @param videoFrame Video frame data. See VideoFrame. The default format of the video frame data obtained through this callback is:
|
|
1522
1551
|
* macOS: I420
|
|
1523
1552
|
* Windows: YUV420
|
|
1524
1553
|
*/
|
|
@@ -1533,17 +1562,17 @@ export interface IVideoFrameObserver {
|
|
|
1533
1562
|
onMediaPlayerVideoFrame?(videoFrame: VideoFrame, mediaPlayerId: number): void;
|
|
1534
1563
|
|
|
1535
1564
|
/**
|
|
1536
|
-
*
|
|
1565
|
+
* Gets the video data sent by the remote user.
|
|
1537
1566
|
*
|
|
1538
|
-
* After
|
|
1539
|
-
*
|
|
1540
|
-
*
|
|
1541
|
-
*
|
|
1542
|
-
*
|
|
1567
|
+
* After successfully registering the video data observer, the SDK triggers this callback when each video frame is captured. You can get the video data sent by the remote user before rendering and process it as needed.
|
|
1568
|
+
* If the video data format you receive is RGBA, the SDK does not support processing the Alpha channel.
|
|
1569
|
+
* It is recommended to implement this callback using the C++ API.
|
|
1570
|
+
* Due to framework limitations, this callback does not support sending the processed video data back to the SDK.
|
|
1571
|
+
* When modifying parameters in videoFrame, ensure they match the actual video frame data in the buffer. Otherwise, unexpected rotation or distortion may occur in the local preview or remote video.
|
|
1543
1572
|
*
|
|
1544
|
-
* @param channelId
|
|
1545
|
-
* @param remoteUid The user ID of the remote user who
|
|
1546
|
-
* @param videoFrame
|
|
1573
|
+
* @param channelId Channel ID.
|
|
1574
|
+
* @param remoteUid The user ID of the remote user who sent the video frame.
|
|
1575
|
+
* @param videoFrame Video frame data. See VideoFrame. The default format of the video frame data obtained through this callback is:
|
|
1547
1576
|
* macOS: I420
|
|
1548
1577
|
* Windows: YUV420
|
|
1549
1578
|
*/
|
|
@@ -1560,15 +1589,15 @@ export interface IVideoFrameObserver {
|
|
|
1560
1589
|
}
|
|
1561
1590
|
|
|
1562
1591
|
/**
|
|
1563
|
-
*
|
|
1592
|
+
* Encoding type of external video frames.
|
|
1564
1593
|
*/
|
|
1565
1594
|
export enum ExternalVideoSourceType {
|
|
1566
1595
|
/**
|
|
1567
|
-
* 0:
|
|
1596
|
+
* 0: Unencoded video frame.
|
|
1568
1597
|
*/
|
|
1569
1598
|
VideoFrame = 0,
|
|
1570
1599
|
/**
|
|
1571
|
-
* 1:
|
|
1600
|
+
* 1: Encoded video frame.
|
|
1572
1601
|
*/
|
|
1573
1602
|
EncodedVideoFrame = 1,
|
|
1574
1603
|
}
|
|
@@ -1584,47 +1613,47 @@ export enum MediaRecorderContainerFormat {
|
|
|
1584
1613
|
}
|
|
1585
1614
|
|
|
1586
1615
|
/**
|
|
1587
|
-
*
|
|
1616
|
+
* @ignore
|
|
1588
1617
|
*/
|
|
1589
1618
|
export enum MediaRecorderStreamType {
|
|
1590
1619
|
/**
|
|
1591
|
-
*
|
|
1620
|
+
* @ignore
|
|
1592
1621
|
*/
|
|
1593
1622
|
StreamTypeAudio = 0x01,
|
|
1594
1623
|
/**
|
|
1595
|
-
*
|
|
1624
|
+
* @ignore
|
|
1596
1625
|
*/
|
|
1597
1626
|
StreamTypeVideo = 0x02,
|
|
1598
1627
|
/**
|
|
1599
|
-
*
|
|
1628
|
+
* @ignore
|
|
1600
1629
|
*/
|
|
1601
1630
|
StreamTypeBoth = 0x01 | 0x02,
|
|
1602
1631
|
}
|
|
1603
1632
|
|
|
1604
1633
|
/**
|
|
1605
|
-
*
|
|
1634
|
+
* Current recording state.
|
|
1606
1635
|
*/
|
|
1607
1636
|
export enum RecorderState {
|
|
1608
1637
|
/**
|
|
1609
|
-
* -1:
|
|
1638
|
+
* -1: Audio/video stream recording error. See RecorderReasonCode for details.
|
|
1610
1639
|
*/
|
|
1611
1640
|
RecorderStateError = -1,
|
|
1612
1641
|
/**
|
|
1613
|
-
* 2:
|
|
1642
|
+
* 2: Audio/video stream recording started.
|
|
1614
1643
|
*/
|
|
1615
1644
|
RecorderStateStart = 2,
|
|
1616
1645
|
/**
|
|
1617
|
-
* 3:
|
|
1646
|
+
* 3: Audio/video stream recording stopped.
|
|
1618
1647
|
*/
|
|
1619
1648
|
RecorderStateStop = 3,
|
|
1620
1649
|
}
|
|
1621
1650
|
|
|
1622
1651
|
/**
|
|
1623
|
-
*
|
|
1652
|
+
* Reason for recording state error.
|
|
1624
1653
|
*/
|
|
1625
1654
|
export enum RecorderReasonCode {
|
|
1626
1655
|
/**
|
|
1627
|
-
* 0:
|
|
1656
|
+
* 0: Everything is normal.
|
|
1628
1657
|
*/
|
|
1629
1658
|
RecorderReasonNone = 0,
|
|
1630
1659
|
/**
|
|
@@ -1696,27 +1725,25 @@ export class MediaRecorderConfiguration {
|
|
|
1696
1725
|
}
|
|
1697
1726
|
|
|
1698
1727
|
/**
|
|
1699
|
-
*
|
|
1728
|
+
* Face information observer.
|
|
1700
1729
|
*
|
|
1701
|
-
* You can call registerFaceInfoObserver to register
|
|
1730
|
+
* You can call registerFaceInfoObserver to register the IFaceInfoObserver observer.
|
|
1702
1731
|
*/
|
|
1703
1732
|
export interface IFaceInfoObserver {
|
|
1704
1733
|
/**
|
|
1705
|
-
*
|
|
1734
|
+
* Reports face information processed by the voice driver plugin.
|
|
1706
1735
|
*
|
|
1707
|
-
* @param outFaceInfo Output parameter
|
|
1708
|
-
* faces:
|
|
1709
|
-
* blendshapes: Object.
|
|
1710
|
-
* rotation:
|
|
1711
|
-
* pitch: Head pitch angle.
|
|
1712
|
-
* yaw: Head yaw angle.
|
|
1713
|
-
* roll: Head roll angle.
|
|
1714
|
-
* timestamp: String. The timestamp of the output result
|
|
1715
|
-
* { "faces":[{ "blendshapes":{ "eyeBlinkLeft":0.9, "eyeLookDownLeft":0.0, "eyeLookInLeft":0.0, "eyeLookOutLeft":0.0, "eyeLookUpLeft":0.0, "eyeSquintLeft":0.0, "eyeWideLeft":0.0, "eyeBlinkRight":0.0, "eyeLookDownRight":0.0, "eyeLookInRight":0.0, "eyeLookOutRight":0.0, "eyeLookUpRight":0.0, "eyeSquintRight":0.0, "eyeWideRight":0.0, "jawForward":0.0, "jawLeft":0.0, "jawRight":0.0, "jawOpen":0.0, "mouthClose":0.0, "mouthFunnel":0.0, "mouthPucker":0.0, "mouthLeft":0.0, "mouthRight":0.0, "mouthSmileLeft":0.0, "mouthSmileRight":0.0, "mouthFrownLeft":0.0, "mouthFrownRight":0.0, "mouthDimpleLeft":0.0, "mouthDimpleRight":0.0, "mouthStretchLeft":0.0, "mouthStretchRight":0.0, "mouthRollLower":0.0, "mouthRollUpper":0.0, "mouthShrugLower":0.0, "mouthShrugUpper":0.0, "mouthPressLeft":0.0, "mouthPressRight":0.0, "mouthLowerDownLeft":0.0, "mouthLowerDownRight":0.0, "mouthUpperUpLeft":0.0, "mouthUpperUpRight":0.0, "browDownLeft":0.0, "browDownRight":0.0, "browInnerUp":0.0, "browOuterUpLeft":0.0, "browOuterUpRight":0.0, "cheekPuff":0.0, "cheekSquintLeft":0.0, "cheekSquintRight":0.0, "noseSneerLeft":0.0, "noseSneerRight":0.0, "tongueOut":0.0 }, "rotation":{"pitch":30.0, "yaw":25.5, "roll":-15.5},
|
|
1716
|
-
* }], "timestamp":"654879876546" }
|
|
1736
|
+
* @param outFaceInfo Output parameter. A JSON string of the face information processed by the voice driver plugin, containing the following fields:
|
|
1737
|
+
* faces: An array of objects. Each object contains information about a detected face.
|
|
1738
|
+
* blendshapes: Object. A set of blendshape coefficients named according to the ARKit standard. Each key-value pair represents a blendshape coefficient. The coefficient is a float in the range [0.0, 1.0].
|
|
1739
|
+
* rotation: An array of objects. Head rotation values, including the following key-value pairs with float values in the range [-180.0, 180.0]:
|
|
1740
|
+
* pitch: Head pitch angle. Positive when looking down, negative when looking up.
|
|
1741
|
+
* yaw: Head yaw angle. Positive when turning left, negative when turning right.
|
|
1742
|
+
* roll: Head roll angle. Positive when tilting right, negative when tilting left.
|
|
1743
|
+
* timestamp: String. The timestamp of the output result in milliseconds. Example JSON: { "faces":[{ "blendshapes":{ "eyeBlinkLeft":0.9, "eyeLookDownLeft":0.0, "eyeLookInLeft":0.0, "eyeLookOutLeft":0.0, "eyeLookUpLeft":0.0, "eyeSquintLeft":0.0, "eyeWideLeft":0.0, "eyeBlinkRight":0.0, "eyeLookDownRight":0.0, "eyeLookInRight":0.0, "eyeLookOutRight":0.0, "eyeLookUpRight":0.0, "eyeSquintRight":0.0, "eyeWideRight":0.0, "jawForward":0.0, "jawLeft":0.0, "jawRight":0.0, "jawOpen":0.0, "mouthClose":0.0, "mouthFunnel":0.0, "mouthPucker":0.0, "mouthLeft":0.0, "mouthRight":0.0, "mouthSmileLeft":0.0, "mouthSmileRight":0.0, "mouthFrownLeft":0.0, "mouthFrownRight":0.0, "mouthDimpleLeft":0.0, "mouthDimpleRight":0.0, "mouthStretchLeft":0.0, "mouthStretchRight":0.0, "mouthRollLower":0.0, "mouthRollUpper":0.0, "mouthShrugLower":0.0, "mouthShrugUpper":0.0, "mouthPressLeft":0.0, "mouthPressRight":0.0, "mouthLowerDownLeft":0.0, "mouthLowerDownRight":0.0, "mouthUpperUpLeft":0.0, "mouthUpperUpRight":0.0, "browDownLeft":0.0, "browDownRight":0.0, "browInnerUp":0.0, "browOuterUpLeft":0.0, "browOuterUpRight":0.0, "cheekPuff":0.0, "cheekSquintLeft":0.0, "cheekSquintRight":0.0, "noseSneerLeft":0.0, "noseSneerRight":0.0, "tongueOut":0.0 }, "rotation":{"pitch":30.0, "yaw":25.5, "roll":-15.5}, }], "timestamp":"654879876546" }
|
|
1717
1744
|
*
|
|
1718
1745
|
* @returns
|
|
1719
|
-
* true :
|
|
1746
|
+
* true : Successfully parsed the face information JSON. false : Failed to parse the face information JSON.
|
|
1720
1747
|
*/
|
|
1721
1748
|
onFaceInfo?(outFaceInfo: string): void;
|
|
1722
1749
|
}
|