import { NativeModules } from 'react-native'; import type { Errors } from '../native/ZoomVideoSdk'; const { RNZoomVideoSdkAudioSettingHelper } = NativeModules; /** * Audio setting interface. */ export type ZoomVideoSdkAudioSettingHelperType = { /** * Determine whether the original input of the microphone is enabled. */ isMicOriginalInputEnable: () => Promise; /** * Call this method to enable or disable the original input of the microphone. */ enableMicOriginalInput: (enable: boolean) => Promise; /** * Set if it is able to auto-adjust the volume of the mic when joining the meeting. */ enableAutoAdjustMicVolume: (enable: boolean) => Promise; /** * Determine whether the auto adjustment of the microphone volume is enabled. */ isAutoAdjustMicVolumeEnabled: () => Promise; }; export class ZoomVideoSdkAudioSettingHelper implements ZoomVideoSdkAudioSettingHelperType { async isMicOriginalInputEnable() { return await RNZoomVideoSdkAudioSettingHelper.isMicOriginalInputEnable(); } async enableMicOriginalInput(enable: boolean) { return await RNZoomVideoSdkAudioSettingHelper.enableMicOriginalInput( enable ); } async isAutoAdjustMicVolumeEnabled() { return await RNZoomVideoSdkAudioSettingHelper.isAutoAdjustMicVolumeEnabled(); } async enableAutoAdjustMicVolume(enable: boolean) { return await RNZoomVideoSdkAudioSettingHelper.enableAutoAdjustMicVolume( enable ); } }