gravix-rtc-react-native 0.0.0-stage → 0.2.0
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 +134 -0
- package/LICENSE +20 -0
- package/LICENSES/Apache-2.0.txt +175 -0
- package/NOTICE +68 -0
- package/README.md +313 -2
- package/android/build.gradle +137 -0
- package/android/consumer-rules.pro +29 -0
- package/android/src/main/AndroidManifest.xml +9 -0
- package/android/src/main/cpp/CMakeLists.txt +48 -0
- package/android/src/main/cpp/gx_dfn_engine.c +332 -0
- package/android/src/main/cpp/gx_fx_jni.cpp +34 -0
- package/android/src/main/cpp/gx_ns_jni.c +162 -0
- package/android/src/main/cpp/third_party/onnxruntime/LICENSE +21 -0
- package/android/src/main/cpp/third_party/onnxruntime/include/onnxruntime_c_api.h +9227 -0
- package/android/src/main/cpp/third_party/onnxruntime/include/onnxruntime_ep_c_api.h +3315 -0
- package/android/src/main/cpp/third_party/onnxruntime/include/onnxruntime_error_code.h +98 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/GravixAudioHooks.kt +144 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/GravixAudioModule.kt +105 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/GravixNativeAudio.kt +310 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/GravixRtc.kt +134 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/GravixRtcModule.kt +176 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/GravixRtcPackage.kt +39 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/audio/AudioDeviceKind.java +44 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/audio/AudioManagerUtils.kt +120 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/audio/AudioSwitchManager.java +270 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/audio/AudioType.kt +50 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/music/MusicCaptureRouter.kt +375 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/music/MusicDecoder.kt +339 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/music/MusicInterruptionWatcher.kt +82 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/music/MusicMicRelease.kt +117 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/music/MusicMixKernel.kt +191 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/music/MusicMixerEngine.kt +617 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/AudioRoutePolicy.kt +137 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GravixCaptureProcessing.kt +67 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GxCaptureDump.kt +143 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GxCaptureSwitcher.kt +196 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GxNoiseProcessor.kt +795 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GxNsLogic.kt +180 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GxNsNative.kt +83 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GxNsStudio.kt +372 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GxRecordStartGuard.kt +76 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GxRecorderSeam.kt +434 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GxSingerSource.kt +37 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GxVoiceFx.kt +160 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/OtherAppAudioPolicy.kt +143 -0
- package/android/src/main/java/org/webrtc/audio/WebRtcAudioTrackHelper.kt +43 -0
- package/docs/ANDROID_NATIVE_HOOKS.md +102 -0
- package/docs/FEATURE_MATRIX.md +192 -0
- package/docs/IOS_NATIVE_HOOKS.md +190 -0
- package/gravix-rtc-react-native.podspec +49 -0
- package/ios/GravixRtc.h +7 -0
- package/ios/GravixRtc.mm +273 -0
- package/ios/GravixRtcSetup.h +29 -0
- package/ios/GravixRtcSetup.m +52 -0
- package/ios/audio/GravixRtcIosAudio.m +157 -0
- package/ios/audio/GxAudioDevice.h +62 -0
- package/ios/audio/GxAudioDevice.m +857 -0
- package/ios/audio/GxAudioSetup.h +34 -0
- package/ios/audio/GxAudioSetup.m +70 -0
- package/ios/audio/GxCompat.swift +53 -0
- package/ios/audio/GxIosAudio.swift +99 -0
- package/ios/audio/GxMusicController.swift +150 -0
- package/ios/audio/GxMusicPost.swift +362 -0
- package/ios/audio/GxNoiseProcessor.swift +718 -0
- package/ios/audio/GxNsDfn3CoreML.swift +195 -0
- package/ios/audio/GxNsStudioEngine.swift +237 -0
- package/ios/audio/GxNsStudioPack.swift +212 -0
- package/ios/audio/GxVoiceFx.swift +161 -0
- package/ios/audio/gx_adm_state.h +153 -0
- package/ios/gxcore/apple/gx_music_post.c +312 -0
- package/ios/gxcore/apple/gx_pcm.c +30 -0
- package/ios/gxcore/apple/gxns_build.h +19 -0
- package/ios/gxcore/apple/gxns_ios.c +17 -0
- package/ios/gxcore/apple/include/gx_fx.h +3 -0
- package/ios/gxcore/apple/include/gx_music_post.h +88 -0
- package/ios/gxcore/apple/include/gx_ns.h +3 -0
- package/ios/gxcore/apple/include/gx_pcm.h +33 -0
- package/ios/gxcore/apple/include/gxns_ios.h +18 -0
- package/ios/gxcore/apple/include/module.modulemap +10 -0
- package/ios/gxcore/apple/shim/rnnoise.h +2 -0
- package/ios/gxcore/apple/shim/speex_resampler.h +2 -0
- package/ios/gxcore/apple/units/gx_fx_forward.cpp +3 -0
- package/ios/gxcore/apple/units/gx_ns.c +7 -0
- package/ios/gxcore/apple/units/gx_ns_timer.c +7 -0
- package/ios/gxcore/apple/units/rnnoise_celt_lpc.c +7 -0
- package/ios/gxcore/apple/units/rnnoise_denoise.c +7 -0
- package/ios/gxcore/apple/units/rnnoise_kiss_fft.c +7 -0
- package/ios/gxcore/apple/units/rnnoise_pitch.c +7 -0
- package/ios/gxcore/apple/units/rnnoise_rnn.c +7 -0
- package/ios/gxcore/apple/units/rnnoise_rnn_data.c +7 -0
- package/ios/gxcore/apple/units/speexdsp_resample.c +7 -0
- package/ios/resources/ns/DFN3-NOTICE.txt +10 -0
- package/ios/resources/ns/DeepFilterNet-LICENSE-APACHE +201 -0
- package/ios/resources/ns/DeepFilterNet-LICENSE-MIT +19 -0
- package/ios/resources/ns/gxns_dfn3.mlmodelc/analytics/coremldata.bin +0 -0
- package/ios/resources/ns/gxns_dfn3.mlmodelc/coremldata.bin +0 -0
- package/ios/resources/ns/gxns_dfn3.mlmodelc/metadata.json +338 -0
- package/ios/resources/ns/gxns_dfn3.mlmodelc/model.mil +927 -0
- package/ios/resources/ns/gxns_dfn3.mlmodelc/weights/weight.bin +0 -0
- package/lib/module/android/bindings.js +49 -0
- package/lib/module/android/bindings.js.map +1 -0
- package/lib/module/android/index.js +13 -0
- package/lib/module/android/index.js.map +1 -0
- package/lib/module/android/micMute.js +341 -0
- package/lib/module/android/micMute.js.map +1 -0
- package/lib/module/android/nativeAudio.js +47 -0
- package/lib/module/android/nativeAudio.js.map +1 -0
- package/lib/module/android/noiseSuppression.js +170 -0
- package/lib/module/android/noiseSuppression.js.map +1 -0
- package/lib/module/android/roomMusic.js +142 -0
- package/lib/module/android/roomMusic.js.map +1 -0
- package/lib/module/android/singerMode.js +31 -0
- package/lib/module/android/singerMode.js.map +1 -0
- package/lib/module/android/voiceEffects.js +65 -0
- package/lib/module/android/voiceEffects.js.map +1 -0
- package/lib/module/audio/AudioManager.js +79 -0
- package/lib/module/audio/AudioManager.js.map +1 -0
- package/lib/module/audio/AudioSession.js +90 -0
- package/lib/module/audio/AudioSession.js.map +1 -0
- package/lib/module/audio/remoteVolume.js +54 -0
- package/lib/module/audio/remoteVolume.js.map +1 -0
- package/lib/module/components/VideoView.js +109 -0
- package/lib/module/components/VideoView.js.map +1 -0
- package/lib/module/features/audioScenario.js +53 -0
- package/lib/module/features/audioScenario.js.map +1 -0
- package/lib/module/features/beauty.js +828 -0
- package/lib/module/features/beauty.js.map +1 -0
- package/lib/module/features/micRelease.js +89 -0
- package/lib/module/features/micRelease.js.map +1 -0
- package/lib/module/features/noiseSuppression.js +213 -0
- package/lib/module/features/noiseSuppression.js.map +1 -0
- package/lib/module/features/roomMusic.js +90 -0
- package/lib/module/features/roomMusic.js.map +1 -0
- package/lib/module/features/roomMusicAndroid.js +294 -0
- package/lib/module/features/roomMusicAndroid.js.map +1 -0
- package/lib/module/features/roomMusicIos.js +250 -0
- package/lib/module/features/roomMusicIos.js.map +1 -0
- package/lib/module/features/roomMusicTypes.js +53 -0
- package/lib/module/features/roomMusicTypes.js.map +1 -0
- package/lib/module/features/screenShare.js +22 -0
- package/lib/module/features/screenShare.js.map +1 -0
- package/lib/module/features/singerMode.js +73 -0
- package/lib/module/features/singerMode.js.map +1 -0
- package/lib/module/features/voiceEffects.js +148 -0
- package/lib/module/features/voiceEffects.js.map +1 -0
- package/lib/module/hooks/context.js +34 -0
- package/lib/module/hooks/context.js.map +1 -0
- package/lib/module/hooks/hooks.js +145 -0
- package/lib/module/hooks/hooks.js.map +1 -0
- package/lib/module/hooks/types.js +4 -0
- package/lib/module/hooks/types.js.map +1 -0
- package/lib/module/hooks/useRoomEvents.js +30 -0
- package/lib/module/hooks/useRoomEvents.js.map +1 -0
- package/lib/module/index.js +43 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/ios/autoAttach.js +14 -0
- package/lib/module/ios/autoAttach.js.map +1 -0
- package/lib/module/ios/iosAudio.js +149 -0
- package/lib/module/ios/iosAudio.js.map +1 -0
- package/lib/module/join/appStateLifecycle.js +54 -0
- package/lib/module/join/appStateLifecycle.js.map +1 -0
- package/lib/module/micPolicy.js +249 -0
- package/lib/module/micPolicy.js.map +1 -0
- package/lib/module/native/NativeGravixAudio.js +18 -0
- package/lib/module/native/NativeGravixAudio.js.map +1 -0
- package/lib/module/native/NativeGravixRtc.js +13 -0
- package/lib/module/native/NativeGravixRtc.js.map +1 -0
- package/lib/module/native/module.js +23 -0
- package/lib/module/native/module.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/polyfills/DOMException.js +22 -0
- package/lib/module/polyfills/DOMException.js.map +1 -0
- package/lib/module/polyfills/early.js +18 -0
- package/lib/module/polyfills/early.js.map +1 -0
- package/lib/module/polyfills/event.js +71 -0
- package/lib/module/polyfills/event.js.map +1 -0
- package/lib/module/polyfills/sha256.js +92 -0
- package/lib/module/polyfills/sha256.js.map +1 -0
- package/lib/module/polyfills/subtleHmac.js +91 -0
- package/lib/module/polyfills/subtleHmac.js.map +1 -0
- package/lib/module/polyfills/textCoding.js +164 -0
- package/lib/module/polyfills/textCoding.js.map +1 -0
- package/lib/module/registerGlobals.js +135 -0
- package/lib/module/registerGlobals.js.map +1 -0
- package/lib/module/unsupported.js +90 -0
- package/lib/module/unsupported.js.map +1 -0
- package/lib/module/version.js +7 -0
- package/lib/module/version.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/android/bindings.d.ts +14 -0
- package/lib/typescript/src/android/bindings.d.ts.map +1 -0
- package/lib/typescript/src/android/index.d.ts +9 -0
- package/lib/typescript/src/android/index.d.ts.map +1 -0
- package/lib/typescript/src/android/micMute.d.ts +124 -0
- package/lib/typescript/src/android/micMute.d.ts.map +1 -0
- package/lib/typescript/src/android/nativeAudio.d.ts +40 -0
- package/lib/typescript/src/android/nativeAudio.d.ts.map +1 -0
- package/lib/typescript/src/android/noiseSuppression.d.ts +48 -0
- package/lib/typescript/src/android/noiseSuppression.d.ts.map +1 -0
- package/lib/typescript/src/android/roomMusic.d.ts +80 -0
- package/lib/typescript/src/android/roomMusic.d.ts.map +1 -0
- package/lib/typescript/src/android/singerMode.d.ts +27 -0
- package/lib/typescript/src/android/singerMode.d.ts.map +1 -0
- package/lib/typescript/src/android/voiceEffects.d.ts +30 -0
- package/lib/typescript/src/android/voiceEffects.d.ts.map +1 -0
- package/lib/typescript/src/audio/AudioManager.d.ts +32 -0
- package/lib/typescript/src/audio/AudioManager.d.ts.map +1 -0
- package/lib/typescript/src/audio/AudioSession.d.ts +70 -0
- package/lib/typescript/src/audio/AudioSession.d.ts.map +1 -0
- package/lib/typescript/src/audio/remoteVolume.d.ts +8 -0
- package/lib/typescript/src/audio/remoteVolume.d.ts.map +1 -0
- package/lib/typescript/src/components/VideoView.d.ts +44 -0
- package/lib/typescript/src/components/VideoView.d.ts.map +1 -0
- package/lib/typescript/src/features/audioScenario.d.ts +24 -0
- package/lib/typescript/src/features/audioScenario.d.ts.map +1 -0
- package/lib/typescript/src/features/beauty.d.ts +377 -0
- package/lib/typescript/src/features/beauty.d.ts.map +1 -0
- package/lib/typescript/src/features/micRelease.d.ts +28 -0
- package/lib/typescript/src/features/micRelease.d.ts.map +1 -0
- package/lib/typescript/src/features/noiseSuppression.d.ts +64 -0
- package/lib/typescript/src/features/noiseSuppression.d.ts.map +1 -0
- package/lib/typescript/src/features/roomMusic.d.ts +41 -0
- package/lib/typescript/src/features/roomMusic.d.ts.map +1 -0
- package/lib/typescript/src/features/roomMusicAndroid.d.ts +60 -0
- package/lib/typescript/src/features/roomMusicAndroid.d.ts.map +1 -0
- package/lib/typescript/src/features/roomMusicIos.d.ts +56 -0
- package/lib/typescript/src/features/roomMusicIos.d.ts.map +1 -0
- package/lib/typescript/src/features/roomMusicTypes.d.ts +76 -0
- package/lib/typescript/src/features/roomMusicTypes.d.ts.map +1 -0
- package/lib/typescript/src/features/screenShare.d.ts +12 -0
- package/lib/typescript/src/features/screenShare.d.ts.map +1 -0
- package/lib/typescript/src/features/singerMode.d.ts +20 -0
- package/lib/typescript/src/features/singerMode.d.ts.map +1 -0
- package/lib/typescript/src/features/voiceEffects.d.ts +46 -0
- package/lib/typescript/src/features/voiceEffects.d.ts.map +1 -0
- package/lib/typescript/src/hooks/context.d.ts +12 -0
- package/lib/typescript/src/hooks/context.d.ts.map +1 -0
- package/lib/typescript/src/hooks/hooks.d.ts +54 -0
- package/lib/typescript/src/hooks/hooks.d.ts.map +1 -0
- package/lib/typescript/src/hooks/types.d.ts +8 -0
- package/lib/typescript/src/hooks/types.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useRoomEvents.d.ts +13 -0
- package/lib/typescript/src/hooks/useRoomEvents.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +37 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/ios/autoAttach.d.ts +2 -0
- package/lib/typescript/src/ios/autoAttach.d.ts.map +1 -0
- package/lib/typescript/src/ios/iosAudio.d.ts +96 -0
- package/lib/typescript/src/ios/iosAudio.d.ts.map +1 -0
- package/lib/typescript/src/join/appStateLifecycle.d.ts +14 -0
- package/lib/typescript/src/join/appStateLifecycle.d.ts.map +1 -0
- package/lib/typescript/src/micPolicy.d.ts +104 -0
- package/lib/typescript/src/micPolicy.d.ts.map +1 -0
- package/lib/typescript/src/native/NativeGravixAudio.d.ts +21 -0
- package/lib/typescript/src/native/NativeGravixAudio.d.ts.map +1 -0
- package/lib/typescript/src/native/NativeGravixRtc.d.ts +31 -0
- package/lib/typescript/src/native/NativeGravixRtc.d.ts.map +1 -0
- package/lib/typescript/src/native/module.d.ts +7 -0
- package/lib/typescript/src/native/module.d.ts.map +1 -0
- package/lib/typescript/src/polyfills/DOMException.d.ts +3 -0
- package/lib/typescript/src/polyfills/DOMException.d.ts.map +1 -0
- package/lib/typescript/src/polyfills/early.d.ts +2 -0
- package/lib/typescript/src/polyfills/early.d.ts.map +1 -0
- package/lib/typescript/src/polyfills/event.d.ts +2 -0
- package/lib/typescript/src/polyfills/event.d.ts.map +1 -0
- package/lib/typescript/src/polyfills/sha256.d.ts +3 -0
- package/lib/typescript/src/polyfills/sha256.d.ts.map +1 -0
- package/lib/typescript/src/polyfills/subtleHmac.d.ts +37 -0
- package/lib/typescript/src/polyfills/subtleHmac.d.ts.map +1 -0
- package/lib/typescript/src/polyfills/textCoding.d.ts +36 -0
- package/lib/typescript/src/polyfills/textCoding.d.ts.map +1 -0
- package/lib/typescript/src/registerGlobals.d.ts +42 -0
- package/lib/typescript/src/registerGlobals.d.ts.map +1 -0
- package/lib/typescript/src/unsupported.d.ts +42 -0
- package/lib/typescript/src/unsupported.d.ts.map +1 -0
- package/lib/typescript/src/version.d.ts +3 -0
- package/lib/typescript/src/version.d.ts.map +1 -0
- package/metro/index.js +39 -0
- package/metro/noise-stub.js +10 -0
- package/native/gxfx/include/gx_fx.h +82 -0
- package/native/gxfx/src/gx_fx.cpp +527 -0
- package/native/gxfx/third_party/README.md +4 -0
- package/native/gxfx/third_party/signalsmith-linear/LICENSE.txt +21 -0
- package/native/gxfx/third_party/signalsmith-linear/approx.h +191 -0
- package/native/gxfx/third_party/signalsmith-linear/fft.h +1386 -0
- package/native/gxfx/third_party/signalsmith-linear/linear.h +1129 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/approx-cmsisdsp.h +40 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/basic-fill-warnings.h +61 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/fft-accelerate.h +340 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/fft-cmsisdsp.h +307 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/fft-ipp.h +532 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/fft-linear.h +213 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/fft-pffft-double.h +221 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/fft-pffft.h +221 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/linear-accelerate.h +593 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/linear-cmsisdsp.h +713 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/linear-xsimd-dispatch.cpp +6 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/linear-xsimd.h +818 -0
- package/native/gxfx/third_party/signalsmith-linear/stft.h +700 -0
- package/native/gxfx/third_party/signalsmith-stretch-LICENSE.txt +21 -0
- package/native/gxfx/third_party/signalsmith-stretch.h +1060 -0
- package/native/gxns/CMakeLists.txt +67 -0
- package/native/gxns/include/gx_ns.h +285 -0
- package/native/gxns/src/gx_ns.c +1518 -0
- package/native/gxns/src/gx_ns_timer.c +84 -0
- package/native/gxns/src/gx_ns_timer.h +29 -0
- package/native/gxns/third_party/VENDOR.md +43 -0
- package/native/gxns/third_party/rnnoise/AUTHORS +1 -0
- package/native/gxns/third_party/rnnoise/COPYING +31 -0
- package/native/gxns/third_party/rnnoise/include/rnnoise.h +117 -0
- package/native/gxns/third_party/rnnoise/src/_kiss_fft_guts.h +182 -0
- package/native/gxns/third_party/rnnoise/src/arch.h +261 -0
- package/native/gxns/third_party/rnnoise/src/celt_lpc.c +172 -0
- package/native/gxns/third_party/rnnoise/src/celt_lpc.h +45 -0
- package/native/gxns/third_party/rnnoise/src/common.h +48 -0
- package/native/gxns/third_party/rnnoise/src/denoise.c +664 -0
- package/native/gxns/third_party/rnnoise/src/kiss_fft.c +601 -0
- package/native/gxns/third_party/rnnoise/src/kiss_fft.h +203 -0
- package/native/gxns/third_party/rnnoise/src/opus_types.h +159 -0
- package/native/gxns/third_party/rnnoise/src/pitch.c +523 -0
- package/native/gxns/third_party/rnnoise/src/pitch.h +149 -0
- package/native/gxns/third_party/rnnoise/src/rnn.c +178 -0
- package/native/gxns/third_party/rnnoise/src/rnn.h +65 -0
- package/native/gxns/third_party/rnnoise/src/rnn_data.c +11051 -0
- package/native/gxns/third_party/rnnoise/src/rnn_data.h +34 -0
- package/native/gxns/third_party/rnnoise/src/tansig_table.h +45 -0
- package/native/gxns/third_party/speexdsp/AUTHORS +18 -0
- package/native/gxns/third_party/speexdsp/COPYING +35 -0
- package/native/gxns/third_party/speexdsp/arch.h +232 -0
- package/native/gxns/third_party/speexdsp/resample.c +1239 -0
- package/native/gxns/third_party/speexdsp/resample_neon.h +339 -0
- package/native/gxns/third_party/speexdsp/resample_sse.h +128 -0
- package/native/gxns/third_party/speexdsp/speex_resampler.h +343 -0
- package/package.json +186 -4
- package/src/android/bindings.ts +61 -0
- package/src/android/index.ts +10 -0
- package/src/android/micMute.ts +422 -0
- package/src/android/nativeAudio.ts +94 -0
- package/src/android/noiseSuppression.ts +209 -0
- package/src/android/roomMusic.ts +193 -0
- package/src/android/singerMode.ts +53 -0
- package/src/android/voiceEffects.ts +126 -0
- package/src/audio/AudioManager.ts +111 -0
- package/src/audio/AudioSession.ts +190 -0
- package/src/audio/remoteVolume.ts +58 -0
- package/src/components/VideoView.tsx +152 -0
- package/src/features/audioScenario.ts +58 -0
- package/src/features/beauty.ts +1057 -0
- package/src/features/micRelease.ts +108 -0
- package/src/features/noiseSuppression.ts +251 -0
- package/src/features/roomMusic.ts +106 -0
- package/src/features/roomMusicAndroid.ts +310 -0
- package/src/features/roomMusicIos.ts +300 -0
- package/src/features/roomMusicTypes.ts +97 -0
- package/src/features/screenShare.ts +19 -0
- package/src/features/singerMode.ts +70 -0
- package/src/features/voiceEffects.ts +245 -0
- package/src/hooks/context.tsx +38 -0
- package/src/hooks/hooks.ts +247 -0
- package/src/hooks/types.ts +10 -0
- package/src/hooks/useRoomEvents.ts +35 -0
- package/src/index.tsx +134 -0
- package/src/ios/autoAttach.ts +11 -0
- package/src/ios/iosAudio.ts +202 -0
- package/src/join/appStateLifecycle.ts +55 -0
- package/src/micPolicy.ts +312 -0
- package/src/native/NativeGravixAudio.ts +30 -0
- package/src/native/NativeGravixRtc.ts +38 -0
- package/src/native/module.ts +22 -0
- package/src/polyfills/DOMException.ts +20 -0
- package/src/polyfills/early.ts +16 -0
- package/src/polyfills/event.ts +88 -0
- package/src/polyfills/sha256.ts +112 -0
- package/src/polyfills/subtleHmac.ts +124 -0
- package/src/polyfills/textCoding.ts +197 -0
- package/src/registerGlobals.ts +201 -0
- package/src/unsupported.ts +139 -0
- package/src/version.ts +4 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/** Android playback/routing configuration; see {@link AndroidAudioTypePresets}. */
|
|
2
|
+
export type AndroidAudioTypeOptions = {
|
|
3
|
+
/** Whether the SDK requests audio focus. Default true. */
|
|
4
|
+
manageAudioFocus?: boolean;
|
|
5
|
+
audioMode?: 'normal' | 'callScreening' | 'inCall' | 'inCommunication' | 'ringtone';
|
|
6
|
+
audioFocusMode?: 'gain' | 'gainTransient' | 'gainTransientExclusive' | 'gainTransientMayDuck';
|
|
7
|
+
audioAttributesUsageType?: 'alarm' | 'assistanceAccessibility' | 'assistanceNavigationGuidance' | 'assistanceSonification' | 'assistant' | 'game' | 'media' | 'notification' | 'notificationEvent' | 'notificationRingtone' | 'unknown' | 'voiceCommunication' | 'voiceCommunicationSignalling';
|
|
8
|
+
audioAttributesContentType?: 'movie' | 'music' | 'sonification' | 'speech' | 'unknown';
|
|
9
|
+
audioStreamType?: 'accessibility' | 'alarm' | 'dtmf' | 'music' | 'notification' | 'ring' | 'system' | 'voiceCall';
|
|
10
|
+
/** Route audio even in `normal` mode (normally left to the system). */
|
|
11
|
+
forceHandleAudioRouting?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type AndroidAudioOutput = 'speaker' | 'earpiece' | 'headset' | 'bluetooth';
|
|
14
|
+
export type AudioConfiguration = {
|
|
15
|
+
android?: {
|
|
16
|
+
/** Output preference order when several are connected. Default bluetooth, headset, speaker, earpiece. */
|
|
17
|
+
preferredOutputList?: AndroidAudioOutput[];
|
|
18
|
+
audioTypeOptions?: AndroidAudioTypeOptions;
|
|
19
|
+
};
|
|
20
|
+
ios?: {
|
|
21
|
+
/** Default output while publishing. Default 'speaker'. */
|
|
22
|
+
defaultOutput?: 'speaker' | 'earpiece';
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare const AndroidAudioTypePresets: {
|
|
26
|
+
/** Calls / voice rooms where the user publishes the mic (MODE_IN_COMMUNICATION, AEC on). */
|
|
27
|
+
communication: AndroidAudioTypeOptions;
|
|
28
|
+
/** Listener-only / live viewers (MODE_NORMAL, media volume). */
|
|
29
|
+
media: AndroidAudioTypeOptions;
|
|
30
|
+
};
|
|
31
|
+
export type AppleAudioMode = 'default' | 'gameChat' | 'measurement' | 'moviePlayback' | 'spokenAudio' | 'videoChat' | 'videoRecording' | 'voiceChat' | 'voicePrompt';
|
|
32
|
+
export type AppleAudioCategory = 'ambient' | 'soloAmbient' | 'playback' | 'record' | 'playAndRecord' | 'multiRoute';
|
|
33
|
+
export type AppleAudioCategoryOption = 'mixWithOthers' | 'duckOthers' | 'interruptSpokenAudioAndMixWithOthers' | 'allowBluetooth' | 'allowBluetoothA2DP' | 'allowAirPlay' | 'defaultToSpeaker' | 'overrideMutedMicrophoneInterruption';
|
|
34
|
+
export type AppleAudioConfiguration = {
|
|
35
|
+
audioCategory?: AppleAudioCategory;
|
|
36
|
+
audioCategoryOptions?: AppleAudioCategoryOption[];
|
|
37
|
+
audioMode?: AppleAudioMode;
|
|
38
|
+
};
|
|
39
|
+
/** iOS outputs: 'default' (system route) and 'force_speaker'. Android: see {@link AndroidAudioOutput}. */
|
|
40
|
+
export type AudioOutputId = AndroidAudioOutput | 'default' | 'force_speaker';
|
|
41
|
+
/**
|
|
42
|
+
* The platform audio session: Android audio mode / focus / output routing
|
|
43
|
+
* (AudioSwitch) and the iOS AVAudioSession.
|
|
44
|
+
*
|
|
45
|
+
* Typical use: `configureAudio` once, `startAudioSession()` before
|
|
46
|
+
* `room.connect`, `stopAudioSession()` after `room.disconnect()`.
|
|
47
|
+
*/
|
|
48
|
+
export default class AudioSession {
|
|
49
|
+
static configureAudio: (config: AudioConfiguration) => Promise<void>;
|
|
50
|
+
static startAudioSession: () => Promise<void>;
|
|
51
|
+
static stopAudioSession: () => Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Volume for remote audio tracks subscribed after this call (0..10, 1 =
|
|
54
|
+
* unchanged). Applied per track by `registerGlobals()`'s room hook.
|
|
55
|
+
*/
|
|
56
|
+
static setDefaultRemoteAudioTrackVolume: (volume: number) => Promise<void>;
|
|
57
|
+
static getAudioOutputs: () => Promise<AudioOutputId[]>;
|
|
58
|
+
static selectAudioOutput: (deviceId: AudioOutputId) => Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Speakerphone on/off, the common case of {@link selectAudioOutput}
|
|
61
|
+
* (Flutter: `GravixRoomService.setSpeakerphoneOn`). Off picks the earpiece on
|
|
62
|
+
* Android and the system route (receiver, or a connected headset) on iOS.
|
|
63
|
+
*/
|
|
64
|
+
static setSpeakerphoneOn: (on: boolean) => Promise<void>;
|
|
65
|
+
/** iOS: opens the system route picker (AirPlay / Bluetooth). No-op elsewhere. */
|
|
66
|
+
static showAudioRoutePicker: () => Promise<void>;
|
|
67
|
+
/** iOS: sets the AVAudioSession category / options / mode. No-op elsewhere. */
|
|
68
|
+
static setAppleAudioConfiguration: (config: AppleAudioConfiguration) => Promise<void>;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=AudioSession.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AudioSession.d.ts","sourceRoot":"","sources":["../../../../src/audio/AudioSession.ts"],"names":[],"mappings":"AAQA,mFAAmF;AACnF,MAAM,MAAM,uBAAuB,GAAG;IACpC,0DAA0D;IAC1D,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EACR,QAAQ,GAAG,eAAe,GAAG,QAAQ,GAAG,iBAAiB,GAAG,UAAU,CAAC;IACzE,cAAc,CAAC,EACX,MAAM,GACN,eAAe,GACf,wBAAwB,GACxB,sBAAsB,CAAC;IAC3B,wBAAwB,CAAC,EACrB,OAAO,GACP,yBAAyB,GACzB,8BAA8B,GAC9B,wBAAwB,GACxB,WAAW,GACX,MAAM,GACN,OAAO,GACP,cAAc,GACd,mBAAmB,GACnB,sBAAsB,GACtB,SAAS,GACT,oBAAoB,GACpB,8BAA8B,CAAC;IACnC,0BAA0B,CAAC,EACzB,OAAO,GAAG,OAAO,GAAG,cAAc,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC5D,eAAe,CAAC,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AAM,MAAM,aAAa,GAAG,kBAAkB,GAAG,SAAS,GAAG,eAAe,CAAC;AAE7E;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,MAAM,CAAC,cAAc,GAAU,QAAQ,kBAAkB,KAAG,OAAO,CAAC,IAAI,CAAC,CAEvE;IAEF,MAAM,CAAC,iBAAiB,QAAa,OAAO,CAAC,IAAI,CAAC,CAEhD;IAEF,MAAM,CAAC,gBAAgB,QAAa,OAAO,CAAC,IAAI,CAAC,CAE/C;IAEF;;;OAGG;IACH,MAAM,CAAC,gCAAgC,GACrC,QAAQ,MAAM,KACb,OAAO,CAAC,IAAI,CAAC,CAEd;IAEF,MAAM,CAAC,eAAe,QAAa,OAAO,CAAC,aAAa,EAAE,CAAC,CAGzD;IAEF,MAAM,CAAC,iBAAiB,GAAU,UAAU,aAAa,KAAG,OAAO,CAAC,IAAI,CAAC,CAEvE;IAEF;;;;OAIG;IACH,MAAM,CAAC,iBAAiB,GAAU,IAAI,OAAO,KAAG,OAAO,CAAC,IAAI,CAAC,CAM3D;IAEF,iFAAiF;IACjF,MAAM,CAAC,oBAAoB,QAAa,OAAO,CAAC,IAAI,CAAC,CAEnD;IAEF,+EAA+E;IAC/E,MAAM,CAAC,0BAA0B,GAC/B,QAAQ,uBAAuB,KAC9B,OAAO,CAAC,IAAI,CAAC,CAGd;CACH"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Sets the volume (0..10) for remote audio tracks subscribed after this call. */
|
|
2
|
+
export declare function setDefaultRemoteVolume(volume: number): void;
|
|
3
|
+
export declare function getDefaultRemoteVolume(): number;
|
|
4
|
+
/** Applies the default volume to one subscribed track. Never throws. */
|
|
5
|
+
export declare function applyDefaultRemoteVolume(track: unknown): void;
|
|
6
|
+
/** Taps [RoomClass]'s `emit` for `trackSubscribed`. Idempotent; the original emit always runs. */
|
|
7
|
+
export declare function installRemoteVolumeHook(RoomClass: unknown): boolean;
|
|
8
|
+
//# sourceMappingURL=remoteVolume.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remoteVolume.d.ts","sourceRoot":"","sources":["../../../../src/audio/remoteVolume.ts"],"names":[],"mappings":"AAiBA,kFAAkF;AAClF,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAG3D;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED,wEAAwE;AACxE,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAU7D;AAID,kGAAkG;AAClG,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,OAAO,GAAG,OAAO,CAcnE"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type ElementInfo, type VideoTrack } from 'gravix-rtc';
|
|
2
|
+
import { type LayoutChangeEvent, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import type { TrackReference } from '../hooks/types.js';
|
|
4
|
+
export type VideoViewProps = {
|
|
5
|
+
/** The track to show: a track reference (from `useTracks`) or a video track. */
|
|
6
|
+
trackRef?: TrackReference;
|
|
7
|
+
videoTrack?: VideoTrack;
|
|
8
|
+
style?: StyleProp<ViewStyle>;
|
|
9
|
+
objectFit?: 'cover' | 'contain';
|
|
10
|
+
/** Mirror horizontally (front camera self-view). */
|
|
11
|
+
mirror?: boolean;
|
|
12
|
+
zOrder?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the view is on screen. With adaptive stream on (the gravix-rtc
|
|
15
|
+
* default for remote video), a hidden view lets the server pause that video;
|
|
16
|
+
* pass false from list viewability callbacks. Default true.
|
|
17
|
+
*/
|
|
18
|
+
visible?: boolean;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Renders a local or remote video track with `RTCView`, and reports its size
|
|
22
|
+
* and visibility to the track so adaptive stream picks the right layer.
|
|
23
|
+
*/
|
|
24
|
+
export declare function VideoView({ trackRef, videoTrack: videoTrackProp, style, objectFit, mirror, zOrder, visible, }: VideoViewProps): import("react").JSX.Element;
|
|
25
|
+
/** The adaptive-stream "element" of a native view (size + visibility). @internal */
|
|
26
|
+
export declare class VideoViewElementInfo implements ElementInfo {
|
|
27
|
+
element: object;
|
|
28
|
+
id?: string;
|
|
29
|
+
private _width;
|
|
30
|
+
private _height;
|
|
31
|
+
private _observing;
|
|
32
|
+
visible: boolean;
|
|
33
|
+
visibilityChangedAt: number | undefined;
|
|
34
|
+
pictureInPicture: boolean;
|
|
35
|
+
handleResize?: () => void;
|
|
36
|
+
handleVisibilityChanged?: () => void;
|
|
37
|
+
width: () => number;
|
|
38
|
+
height: () => number;
|
|
39
|
+
observe(): void;
|
|
40
|
+
stopObserving(): void;
|
|
41
|
+
onLayout(event: LayoutChangeEvent): void;
|
|
42
|
+
onVisibility(isVisible: boolean): void;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=VideoView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VideoView.d.ts","sourceRoot":"","sources":["../../../../src/components/VideoView.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,WAAW,EAKhB,KAAK,UAAU,EAChB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAGd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAgB,CAAC;AAErD,MAAM,MAAM,cAAc,GAAG;IAC3B,gFAAgF;IAChF,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,oDAAoD;IACpD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,UAAU,EAAE,cAAc,EAC1B,KAAK,EACL,SAAmB,EACnB,MAAM,EACN,MAAM,EACN,OAAc,GACf,EAAE,cAAc,+BAuDhB;AAOD,oFAAoF;AACpF,qBAAa,oBAAqB,YAAW,WAAW;IACtD,OAAO,EAAE,MAAM,CAAM;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,MAAM,CAAK;IACnB,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,UAAQ;IACf,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,gBAAgB,UAAS;IACzB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC,KAAK,eAAqB;IAC1B,MAAM,eAAsB;IAE5B,OAAO,IAAI,IAAI;IAIf,aAAa,IAAI,IAAI;IAIrB,QAAQ,CAAC,KAAK,EAAE,iBAAiB;IAOjC,YAAY,CAAC,SAAS,EAAE,OAAO;CAOhC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Audio scenario (Flutter `GravixAudioScenario`, Agora parity): `chatRoom`
|
|
3
|
+
* tunes the audio device module and echo canceller for voice rooms with gifts
|
|
4
|
+
* and music. Native-only. Basic routing/mode is `AudioSession.configureAudio`.
|
|
5
|
+
*
|
|
6
|
+
* iOS: as in Flutter, the scenario does not change the audio session (that is
|
|
7
|
+
* `AudioSession.configureAudio`); it is recorded so noise suppression runs
|
|
8
|
+
* without its AGC under `chatRoom` (Agora ChatRoom parity).
|
|
9
|
+
*/
|
|
10
|
+
export type GravixAudioScenario = 'standard' | 'chatRoom';
|
|
11
|
+
/** The scenario chosen by {@link gravixUseAudioScenario} (iOS) / latched at setup (Android). */
|
|
12
|
+
export declare function currentAudioScenario(): GravixAudioScenario;
|
|
13
|
+
/**
|
|
14
|
+
* Android: the scenario is latched when the audio device module is built,
|
|
15
|
+
* natively in `Application.onCreate`:
|
|
16
|
+
* `GravixRtc.setup(this, audioScenario = "chatRoom")` (like Flutter's
|
|
17
|
+
* `WebRTC.initialize`). This call checks it: it resolves when the module
|
|
18
|
+
* runs [scenario] and rejects otherwise (a rebuild at run time would drop a
|
|
19
|
+
* live capture).
|
|
20
|
+
*
|
|
21
|
+
* iOS: records the scenario (no session change).
|
|
22
|
+
*/
|
|
23
|
+
export declare function gravixUseAudioScenario(scenario: GravixAudioScenario): Promise<void>;
|
|
24
|
+
//# sourceMappingURL=audioScenario.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audioScenario.d.ts","sourceRoot":"","sources":["../../../../src/features/audioScenario.ts"],"names":[],"mappings":"AAMA;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,UAAU,CAAC;AAI1D,gGAAgG;AAChG,wBAAgB,oBAAoB,IAAI,mBAAmB,CAE1D;AAED;;;;;;;;;GASG;AACH,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,mBAAmB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAqBf"}
|
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Beauty / camera video effects: the React Native twin of Flutter gravix_rtc's
|
|
3
|
+
* `GravixVideoEffect` / `GravixCameraEffect` / `GravixBeautyEffect` and the
|
|
4
|
+
* camera part of `GravixRoomService` (reference: gravix_rtc 0.12.2, 5c4d44c).
|
|
5
|
+
*
|
|
6
|
+
* Thin wiring over the OPTIONAL peer packages `react-native-gravix-effects` +
|
|
7
|
+
* `react-native-gravix-effects-webrtc` (Android). They are loaded lazily; an
|
|
8
|
+
* app without them builds and runs, `GravixBeautyEffect.canOwnCamera()` answers
|
|
9
|
+
* false and {@link GravixRoomCamera} opens the normal camera instead (Flutter:
|
|
10
|
+
* a stripped native SDK).
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* const beauty = new GravixBeautyEffect({ licenseToken });
|
|
14
|
+
* const camera = new GravixRoomCamera(room, { videoEffect: beauty });
|
|
15
|
+
* await camera.setCameraEnabled(true); // opens the Gravix camera, publishes its track
|
|
16
|
+
* await camera.setVideoEffectParams({ look: 'glow' });
|
|
17
|
+
* await camera.setVideoEffectEnabled(false); // bypass, the camera keeps running
|
|
18
|
+
* await camera.switchCamera(); // same track, no republish
|
|
19
|
+
* await camera.setCameraEnabled(false); // unpublish + close the camera; on again replays enabled/params
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
import type { Room } from 'gravix-rtc';
|
|
23
|
+
type RoomConnectOptions = NonNullable<Parameters<Room['connect']>[2]>;
|
|
24
|
+
type CameraPublishOptions = NonNullable<Parameters<Room['localParticipant']['publishTrack']>[1]>;
|
|
25
|
+
import { LocalVideoTrack } from 'gravix-rtc';
|
|
26
|
+
import type { MediaStreamTrack } from 'react-native-webrtc';
|
|
27
|
+
/**
|
|
28
|
+
* Flutter GravixRoomService's camera publish options: 800 kbps / 24 fps top
|
|
29
|
+
* layer, one 180p rung at 160 kbps / 24 fps, balanced degradation. Only these
|
|
30
|
+
* keys: codec, backup codec etc. stay the Room's publishDefaults.
|
|
31
|
+
*/
|
|
32
|
+
export declare const GRAVIX_CAMERA_PUBLISH_OPTIONS: CameraPublishOptions;
|
|
33
|
+
/** The part of `react-native-gravix-effects`' `GravixPackAvailability` this SDK reads. */
|
|
34
|
+
export interface GravixPackAvailabilityLike {
|
|
35
|
+
readonly state: string;
|
|
36
|
+
readonly progress: number;
|
|
37
|
+
readonly code: string | null;
|
|
38
|
+
readonly isReady: boolean;
|
|
39
|
+
}
|
|
40
|
+
/** The part of `react-native-gravix-effects`' running `GravixCamera` this SDK drives. */
|
|
41
|
+
export interface GravixEffectsCameraLike {
|
|
42
|
+
readonly lens: 'front' | 'back';
|
|
43
|
+
readonly streamSize: {
|
|
44
|
+
readonly width: number;
|
|
45
|
+
readonly height: number;
|
|
46
|
+
};
|
|
47
|
+
switchCamera(): Promise<'front' | 'back'>;
|
|
48
|
+
setEnabled(enabled: boolean): Promise<void>;
|
|
49
|
+
setBuiltinLook(name: string): Promise<void>;
|
|
50
|
+
setLookBytes(bytes: string): Promise<string | null>;
|
|
51
|
+
setAdjustments(adjustments: {
|
|
52
|
+
tone?: Record<string, number | null>;
|
|
53
|
+
region?: Record<string, number | null>;
|
|
54
|
+
reshape?: Record<string, number | null>;
|
|
55
|
+
}): Promise<string[]>;
|
|
56
|
+
setLut?(name: string): Promise<void>;
|
|
57
|
+
setLutBytes?(png: string): Promise<void>;
|
|
58
|
+
resetLut?(): Promise<void>;
|
|
59
|
+
clearAdjustments?(): Promise<void>;
|
|
60
|
+
currentValues?(): Promise<unknown>;
|
|
61
|
+
stats(): Promise<Record<string, unknown> | null>;
|
|
62
|
+
stop(): Promise<void>;
|
|
63
|
+
/** The rest of the package's GravixCamera API (overlays, stickers, …). */
|
|
64
|
+
readonly [extra: string]: unknown;
|
|
65
|
+
}
|
|
66
|
+
/** The part of `react-native-gravix-effects-webrtc`' output this SDK publishes. */
|
|
67
|
+
export interface GravixEffectsOutputLike {
|
|
68
|
+
readonly stream: unknown;
|
|
69
|
+
readonly videoTrack: MediaStreamTrack;
|
|
70
|
+
detach(): Promise<void>;
|
|
71
|
+
}
|
|
72
|
+
/** The module surface of `react-native-gravix-effects-webrtc` (it re-exports the core package). */
|
|
73
|
+
export interface GravixEffectsModuleLike {
|
|
74
|
+
GravixCamera: {
|
|
75
|
+
readonly isSupported: boolean;
|
|
76
|
+
start(options?: Record<string, unknown>): Promise<GravixEffectsCameraLike>;
|
|
77
|
+
setLicense(token: string | null): Promise<string>;
|
|
78
|
+
licenseStatus(): Promise<string>;
|
|
79
|
+
hasPermission(): Promise<boolean>;
|
|
80
|
+
requestPermission(): Promise<boolean>;
|
|
81
|
+
preload(): Promise<boolean>;
|
|
82
|
+
};
|
|
83
|
+
GravixEffects: {
|
|
84
|
+
availability(): Promise<GravixPackAvailabilityLike>;
|
|
85
|
+
download(options?: {
|
|
86
|
+
onProgress?: (progress: number) => void;
|
|
87
|
+
}): Promise<GravixPackAvailabilityLike>;
|
|
88
|
+
};
|
|
89
|
+
GravixWebRtc: {
|
|
90
|
+
attach(camera: GravixEffectsCameraLike, options?: {
|
|
91
|
+
textureFrames?: boolean;
|
|
92
|
+
}): Promise<GravixEffectsOutputLike>;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* The `react-native-gravix-effects-webrtc` module (it re-exports the whole
|
|
97
|
+
* `react-native-gravix-effects` API: `GravixCamera`, `GravixPreview`,
|
|
98
|
+
* `GravixLooks`, `GravixEffects` …), or null when the app does not have it.
|
|
99
|
+
* Flutter re-exports these from `gravix_rtc`; an optional peer cannot be
|
|
100
|
+
* re-exported statically, so React Native apps reach it here (or import the
|
|
101
|
+
* package directly).
|
|
102
|
+
*/
|
|
103
|
+
export declare function gravixEffects(): GravixEffectsModuleLike | null;
|
|
104
|
+
/** Test seam: replaces the optional package (null = not installed; undefined = back to the real one). */
|
|
105
|
+
export declare function setGravixEffectsModuleForTesting(m: GravixEffectsModuleLike | null | undefined): void;
|
|
106
|
+
export type GravixCameraPosition = 'front' | 'back';
|
|
107
|
+
/** The local camera track an effect is asked to process. */
|
|
108
|
+
export interface GravixVideoEffectTarget {
|
|
109
|
+
readonly track: LocalVideoTrack;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* A real-time effect on the LOCAL camera. Flutter `GravixVideoEffect`.
|
|
113
|
+
* {@link attach} answers true only when frames of that track really go
|
|
114
|
+
* through the effect (no silent fake success).
|
|
115
|
+
*/
|
|
116
|
+
export interface GravixVideoEffect {
|
|
117
|
+
readonly name: string;
|
|
118
|
+
/** The lowest capture frame rate the effect wants (a hint), or undefined. */
|
|
119
|
+
readonly minFps?: number;
|
|
120
|
+
attach(target: GravixVideoEffectTarget): Promise<boolean>;
|
|
121
|
+
detach(): Promise<void>;
|
|
122
|
+
setEnabled(enabled: boolean): Promise<void>;
|
|
123
|
+
setParams(params: Record<string, unknown>): Promise<void>;
|
|
124
|
+
}
|
|
125
|
+
export interface GravixCameraOpenOptions {
|
|
126
|
+
position: GravixCameraPosition;
|
|
127
|
+
/** Capture frame rate. */
|
|
128
|
+
fps: number;
|
|
129
|
+
/** Short side of the sent picture, px (540 = 540x960). */
|
|
130
|
+
shortSide: number;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* An effect that OWNS the camera and hands the SDK the finished picture as a
|
|
134
|
+
* track (Flutter `GravixCameraEffect`). {@link GravixBeautyEffect} is one.
|
|
135
|
+
*/
|
|
136
|
+
export interface GravixCameraEffect extends GravixVideoEffect {
|
|
137
|
+
canOwnCamera(): Promise<boolean>;
|
|
138
|
+
/** Opens the camera with the effect applied; resolves to the WebRTC track to publish. */
|
|
139
|
+
openCamera(options: GravixCameraOpenOptions): Promise<MediaStreamTrack>;
|
|
140
|
+
switchCamera(): Promise<GravixCameraPosition>;
|
|
141
|
+
}
|
|
142
|
+
export interface GravixBeautyEffectOptions {
|
|
143
|
+
/** The App ID's effects license token (null = watermarked). */
|
|
144
|
+
licenseToken?: string | null;
|
|
145
|
+
/** Engine frame rate when the room asks for none. Default 30. */
|
|
146
|
+
fps?: number;
|
|
147
|
+
/** See `GravixWebRtc.attach`: true only with a known hardware encoder. Default false (I420). */
|
|
148
|
+
textureFrames?: boolean;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Real-time beauty effects from Gravix Effects (looks, reshape, makeup,
|
|
152
|
+
* stickers, 3D) as a camera-owning effect. Android only; elsewhere, or when
|
|
153
|
+
* the effects packages are not installed, {@link canOwnCamera} is false and the
|
|
154
|
+
* room opens its normal camera.
|
|
155
|
+
*
|
|
156
|
+
* Parameters ({@link GravixRoomCamera.setVideoEffectParams}): `look` (built-in
|
|
157
|
+
* look name), `lookBytes` (base64 `.gfx`), `tone` / `region` / `reshape`
|
|
158
|
+
* (`Record<string, number | null>`, as `GravixCamera.setAdjustments`).
|
|
159
|
+
*/
|
|
160
|
+
export declare class GravixBeautyEffect implements GravixCameraEffect {
|
|
161
|
+
readonly name = "gravix-beauty";
|
|
162
|
+
readonly minFps = 24;
|
|
163
|
+
readonly licenseToken: string | null;
|
|
164
|
+
readonly fps: number;
|
|
165
|
+
readonly textureFrames: boolean;
|
|
166
|
+
private _camera;
|
|
167
|
+
private _output;
|
|
168
|
+
private _licensed;
|
|
169
|
+
constructor(options?: GravixBeautyEffectOptions);
|
|
170
|
+
/** The running Gravix camera while the room's camera is on (for `<GravixPreview camera={...}>`, looks, stats). */
|
|
171
|
+
get camera(): GravixEffectsCameraLike | null;
|
|
172
|
+
/** The published WebRTC track while the camera is on. */
|
|
173
|
+
get track(): MediaStreamTrack | null;
|
|
174
|
+
/** Whether the effects packages are installed and can run on this platform. */
|
|
175
|
+
static isAvailable(): boolean;
|
|
176
|
+
/** The effects pack state (face models; `gravixEffectsPack=models` downloads them on first use). */
|
|
177
|
+
static availability(): Promise<GravixPackAvailabilityLike | null>;
|
|
178
|
+
/**
|
|
179
|
+
* Downloads the effects pack if it is not ready (Flutter README: "download the
|
|
180
|
+
* pack when the user opens beauty"). Resolves to the final state; null when
|
|
181
|
+
* the effects packages are not installed.
|
|
182
|
+
*/
|
|
183
|
+
static ensurePack(onProgress?: (progress: number) => void): Promise<GravixPackAvailabilityLike | null>;
|
|
184
|
+
/**
|
|
185
|
+
* The effects licence status now (`OK`, `MISSING`, `INVALID_SIGNATURE`,
|
|
186
|
+
* `MALFORMED`, `WRONG_PACKAGE`, `WRONG_CERT`, `EXPIRED`, and after an
|
|
187
|
+
* online check `LIMIT`, `REVOKED`, `UNKNOWN_APP`), or null when the effects
|
|
188
|
+
* packages are not installed. Anything but `OK` draws the watermark; the
|
|
189
|
+
* native SDK renews the token online by itself.
|
|
190
|
+
*/
|
|
191
|
+
static licenseStatus(): Promise<string | null>;
|
|
192
|
+
/**
|
|
193
|
+
* Loads the face model and the engine ahead of the first camera open
|
|
194
|
+
* (Flutter `preload`). Safe to call more than once; false where the effect
|
|
195
|
+
* cannot run.
|
|
196
|
+
*/
|
|
197
|
+
preload(): Promise<boolean>;
|
|
198
|
+
canOwnCamera(): Promise<boolean>;
|
|
199
|
+
openCamera(options: GravixCameraOpenOptions): Promise<MediaStreamTrack>;
|
|
200
|
+
attach(target: GravixVideoEffectTarget): Promise<boolean>;
|
|
201
|
+
detach(): Promise<void>;
|
|
202
|
+
switchCamera(): Promise<GravixCameraPosition>;
|
|
203
|
+
setEnabled(enabled: boolean): Promise<void>;
|
|
204
|
+
/**
|
|
205
|
+
* Applies `look` / `lookBytes` (base64 .gfx), then the adjustment groups
|
|
206
|
+
* `tone` / `region` / `reshape` (values absolute, null removes one), then
|
|
207
|
+
* `lut` (built-in name) / `lutBytes` (base64 PNG; null for either resets the
|
|
208
|
+
* LUT). That is the replay order a new camera session needs. Each step runs
|
|
209
|
+
* even if an earlier one fails; the first error is rethrown at the end.
|
|
210
|
+
*/
|
|
211
|
+
setParams(params: Record<string, unknown>): Promise<void>;
|
|
212
|
+
private close;
|
|
213
|
+
}
|
|
214
|
+
/** Merges effect params: later keys win; the adjustment groups merge name by name. @internal */
|
|
215
|
+
export declare function mergeEffectParams(prev: Readonly<Record<string, unknown>> | undefined, next: Readonly<Record<string, unknown>>): Record<string, unknown>;
|
|
216
|
+
/**
|
|
217
|
+
* Drives a {@link GravixVideoEffect} from the camera lifecycle and remembers
|
|
218
|
+
* the app's enabled / params so they are replayed after every attach.
|
|
219
|
+
* @internal exported for tests.
|
|
220
|
+
*/
|
|
221
|
+
export declare class GravixVideoEffectBinding {
|
|
222
|
+
readonly effect: GravixVideoEffect | undefined;
|
|
223
|
+
private _active;
|
|
224
|
+
private _enabled;
|
|
225
|
+
private _params;
|
|
226
|
+
private _target;
|
|
227
|
+
private _disposed;
|
|
228
|
+
onActiveChanged?: (active: boolean) => void;
|
|
229
|
+
/** Merge successive setParams maps for the replay (default true); false = Flutter's replace. */
|
|
230
|
+
readonly mergeParams: boolean;
|
|
231
|
+
constructor(effect?: GravixVideoEffect, options?: {
|
|
232
|
+
mergeParams?: boolean;
|
|
233
|
+
});
|
|
234
|
+
get active(): boolean;
|
|
235
|
+
get enabled(): boolean;
|
|
236
|
+
get params(): Readonly<Record<string, unknown>> | undefined;
|
|
237
|
+
get target(): GravixVideoEffectTarget | undefined;
|
|
238
|
+
get cameraOwner(): GravixCameraEffect | undefined;
|
|
239
|
+
/** The capture frame rate: `base`, raised to the effect's minFps. */
|
|
240
|
+
captureFps(base: number): number;
|
|
241
|
+
private setActive;
|
|
242
|
+
/** The camera track is live (first start or after a flip). Never throws. */
|
|
243
|
+
onCameraTrack(target: GravixVideoEffectTarget): Promise<boolean>;
|
|
244
|
+
/** The camera stopped / the room went away. Never throws. */
|
|
245
|
+
onCameraStopped(): Promise<void>;
|
|
246
|
+
setEnabled(enabled: boolean): Promise<void>;
|
|
247
|
+
/**
|
|
248
|
+
* Remembers `params` for the replay after the next attach and applies them
|
|
249
|
+
* now when the effect is active. With [mergeParams] (default) the replay map
|
|
250
|
+
* is the MERGE of every call (top-level keys; the `tone` / `region` /
|
|
251
|
+
* `reshape` groups name by name), so a look set by one call and sliders set
|
|
252
|
+
* by a later one both come back after a camera off/on. Flutter 0.12.2
|
|
253
|
+
* replaces the map instead (its baseline finding 3); `mergeParams: false`
|
|
254
|
+
* restores that behaviour. Live, only this call's params are applied.
|
|
255
|
+
*/
|
|
256
|
+
setParams(params: Record<string, unknown>): Promise<void>;
|
|
257
|
+
dispose(): Promise<void>;
|
|
258
|
+
}
|
|
259
|
+
export interface GravixRoomCameraOptions {
|
|
260
|
+
/** An optional effect; none = the normal camera and no effect code runs. */
|
|
261
|
+
videoEffect?: GravixVideoEffect;
|
|
262
|
+
/** Capture frame rate before the effect's minFps hint. Default 24 (Flutter room). */
|
|
263
|
+
captureFps?: number;
|
|
264
|
+
/** Short side of the captured / sent picture. Default 540 (Flutter `h540_169`). */
|
|
265
|
+
shortSide?: number;
|
|
266
|
+
/** Initial lens. Default front. */
|
|
267
|
+
cameraPosition?: GravixCameraPosition;
|
|
268
|
+
/**
|
|
269
|
+
* Rollback flag. true (default): the params replayed after a camera reopen
|
|
270
|
+
* are the merge of every setVideoEffectParams call. false: only the last
|
|
271
|
+
* call's map (Flutter gravix_rtc 0.12.2 behaviour).
|
|
272
|
+
*/
|
|
273
|
+
mergeEffectParams?: boolean;
|
|
274
|
+
/**
|
|
275
|
+
* Rollback flag for {@link GravixRoomCamera.connect}. true (default): the
|
|
276
|
+
* effect opens its camera while the room connects and publishes it as soon
|
|
277
|
+
* as the room is up (Flutter `connect(enableVideo: true)`). false: connect
|
|
278
|
+
* first, then `setCameraEnabled(true)` (the 2026-12-01 morning behaviour).
|
|
279
|
+
*/
|
|
280
|
+
openCameraDuringConnect?: boolean;
|
|
281
|
+
/**
|
|
282
|
+
* Publish options for the camera track. Default
|
|
283
|
+
* {@link GRAVIX_CAMERA_PUBLISH_OPTIONS} (Flutter's). Rollback: `{}` = the
|
|
284
|
+
* room's own publishDefaults (the 2026-12-01 morning behaviour, ~950 kbps).
|
|
285
|
+
*/
|
|
286
|
+
publishOptions?: CameraPublishOptions;
|
|
287
|
+
}
|
|
288
|
+
export interface GravixRoomCameraState {
|
|
289
|
+
cameraEnabled: boolean;
|
|
290
|
+
videoEffectActive: boolean;
|
|
291
|
+
cameraPosition: GravixCameraPosition;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* The room's camera with an optional video effect: Flutter
|
|
295
|
+
* `GravixRoomService.setCameraEnabled / switchCamera / setVideoEffectEnabled /
|
|
296
|
+
* setVideoEffectParams / videoEffectActive / cameraPosition`.
|
|
297
|
+
*
|
|
298
|
+
* With a camera-owning effect ({@link GravixBeautyEffect}) the effect opens the
|
|
299
|
+
* camera and this class publishes its track as the room's camera; off =
|
|
300
|
+
* unpublish + the effect closes the camera; on again = a fresh camera with the
|
|
301
|
+
* remembered enabled / params replayed. Without one (or when it cannot own the
|
|
302
|
+
* camera) the core's `localParticipant.setCameraEnabled` runs.
|
|
303
|
+
*
|
|
304
|
+
* Use this instead of `localParticipant.setCameraEnabled` for the camera:
|
|
305
|
+
* calling both opens two cameras.
|
|
306
|
+
*/
|
|
307
|
+
export declare class GravixRoomCamera {
|
|
308
|
+
readonly room: Room;
|
|
309
|
+
private readonly binding;
|
|
310
|
+
private readonly baseFps;
|
|
311
|
+
private readonly shortSide;
|
|
312
|
+
private readonly openDuringConnect;
|
|
313
|
+
private readonly publishOptions;
|
|
314
|
+
private _cameraEnabled;
|
|
315
|
+
private _position;
|
|
316
|
+
private _ownedTrack;
|
|
317
|
+
private _queue;
|
|
318
|
+
private _wanted;
|
|
319
|
+
private _disposed;
|
|
320
|
+
private readonly listeners;
|
|
321
|
+
private readonly onDisconnected;
|
|
322
|
+
/**
|
|
323
|
+
* The room could not republish the camera after a full reconnect / region
|
|
324
|
+
* move (Flutter LocalTrackRepublishFailedEvent): the camera is off. An
|
|
325
|
+
* unpublish during the reconnect itself is not a loss (the same track is
|
|
326
|
+
* republished), so only this event counts.
|
|
327
|
+
*/
|
|
328
|
+
private readonly onRepublishFailed;
|
|
329
|
+
constructor(room: Room, options?: GravixRoomCameraOptions);
|
|
330
|
+
get videoEffect(): GravixVideoEffect | undefined;
|
|
331
|
+
/** True while the effect reports it processes the live camera track. */
|
|
332
|
+
get videoEffectActive(): boolean;
|
|
333
|
+
get isCameraEnabled(): boolean;
|
|
334
|
+
get cameraPosition(): GravixCameraPosition;
|
|
335
|
+
/** The published camera track (effect-owned or normal), if any. */
|
|
336
|
+
get localVideoTrack(): LocalVideoTrack | undefined;
|
|
337
|
+
get state(): GravixRoomCameraState;
|
|
338
|
+
/** Subscribe to state changes; returns the unsubscribe function. */
|
|
339
|
+
addListener(listener: (s: GravixRoomCameraState) => void): () => void;
|
|
340
|
+
private emit;
|
|
341
|
+
/** Calls run one after another; each waits for the one before it. */
|
|
342
|
+
private serial;
|
|
343
|
+
/** Turn [videoEffect] on/off (a bypass; the camera keeps running). Remembered across camera off/on. */
|
|
344
|
+
setVideoEffectEnabled(enabled: boolean): Promise<void>;
|
|
345
|
+
/** Effect parameters; remembered and replayed after every camera open. */
|
|
346
|
+
setVideoEffectParams(params: Record<string, unknown>): Promise<void>;
|
|
347
|
+
/**
|
|
348
|
+
* Camera on/off. Resolves true when the camera ended up as asked. The newest
|
|
349
|
+
* call decides: a call overtaken by a later one returns without touching the camera.
|
|
350
|
+
*/
|
|
351
|
+
setCameraEnabled(enabled: boolean): Promise<boolean>;
|
|
352
|
+
/**
|
|
353
|
+
* Joins the room with the camera on (Flutter `connect(enableVideo: true)`).
|
|
354
|
+
* With an effect that owns the camera, the camera opens while the room
|
|
355
|
+
* connects and is published as soon as it is up; with the normal camera it
|
|
356
|
+
* is turned on right after the connect. The join declares `media: 'video'`
|
|
357
|
+
* unless `options.media` is set, so it never lands on an audio-only region.
|
|
358
|
+
* Rejects when the room does not connect (the camera opened for it is
|
|
359
|
+
* closed); otherwise resolves with the camera result, like
|
|
360
|
+
* {@link setCameraEnabled}.
|
|
361
|
+
*/
|
|
362
|
+
connect(url: string, token: string, options?: RoomConnectOptions): Promise<boolean>;
|
|
363
|
+
private applyCamera;
|
|
364
|
+
private openOwned;
|
|
365
|
+
/** Opens the effect's camera; null when it could not. */
|
|
366
|
+
private openOwnedTrack;
|
|
367
|
+
private publishOwned;
|
|
368
|
+
private closeOwned;
|
|
369
|
+
private openNormal;
|
|
370
|
+
/** Front <-> back. With the effect owning the camera it flips its own lens (same track, no republish). */
|
|
371
|
+
switchCamera(): Promise<void>;
|
|
372
|
+
private closeAfterLeave;
|
|
373
|
+
/** Closes the camera (effect or normal) and stops listening to the room. Call when the screen goes away. */
|
|
374
|
+
dispose(): Promise<void>;
|
|
375
|
+
}
|
|
376
|
+
export {};
|
|
377
|
+
//# sourceMappingURL=beauty.d.ts.map
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AAI,CAAC;CAkB/B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Room } from 'gravix-rtc';
|
|
2
|
+
import { type GravixRecorderState } from '../ios/iosAudio.js';
|
|
3
|
+
export type { GravixRecorderState } from '../ios/iosAudio.js';
|
|
4
|
+
export declare const GravixMicRelease: {
|
|
5
|
+
/**
|
|
6
|
+
* Android: with this on, a mute through `GravixRoomMusic.setMicMuted(true)`
|
|
7
|
+
* while music plays zeroes only the voice and releases the recorder
|
|
8
|
+
* (`continueWhileMicReleased`), and the song keeps reaching the room. Off
|
|
9
|
+
* gives a released recorder back. iOS: a mute closes the mic in the Gravix
|
|
10
|
+
* audio device.
|
|
11
|
+
*/
|
|
12
|
+
setMuteReleasesMic(on: boolean): Promise<void>;
|
|
13
|
+
/** Whether a mute releases the mic (default true, as Flutter 0.12.1+). */
|
|
14
|
+
readonly muteReleasesMic: boolean;
|
|
15
|
+
/** The local mic is muted: the core mute or an Android voice-only music mute. */
|
|
16
|
+
isMicMuted(room: Room): boolean;
|
|
17
|
+
/** Voice-only mute changes (pair with the core's TrackMuted / TrackUnmuted). */
|
|
18
|
+
onMicMuteChanged(fn: () => void): () => void;
|
|
19
|
+
/**
|
|
20
|
+
* Applies the setting to the room's published microphone (`stopOnMute`) now.
|
|
21
|
+
* Not needed for new publishes (the room hook does it); kept for a mic
|
|
22
|
+
* published before `setMuteReleasesMic` changed. Returns the count.
|
|
23
|
+
*/
|
|
24
|
+
attach(room: Room): number;
|
|
25
|
+
/** iOS: the recorder as WebRTC's audio engine sees it. */
|
|
26
|
+
getRecorderState(): Promise<GravixRecorderState>;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=micRelease.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"micRelease.d.ts","sourceRoot":"","sources":["../../../../src/features/micRelease.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAKvC,OAAO,EAEL,KAAK,mBAAmB,EAEzB,MAAM,oBAAiB,CAAC;AAEzB,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAiB,CAAC;AAiC3D,eAAO,MAAM,gBAAgB;IAC3B;;;;;;OAMG;2BAC0B,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAWpD,0EAA0E;8BACnD,OAAO;IAI9B,iFAAiF;qBAChE,IAAI,GAAG,OAAO;IAI/B,gFAAgF;yBAC3D,MAAM,IAAI,GAAG,MAAM,IAAI;IAI5C;;;;OAIG;iBACU,IAAI,GAAG,MAAM;IAgB1B,0DAA0D;wBACtC,OAAO,CAAC,mBAAmB,CAAC;CAKjD,CAAC"}
|