import { NativeModules } from 'react-native'; import type { AudioType } from './ZoomVideoSdk'; const { RNZoomVideoSdkAudioStatus } = NativeModules; /** * Audio status of the user. */ export type ZoomVideoSdkAudioStatusType = { /** * Determine whether the audio is muted. */ isMuted: () => Promise; /** * Determine whether the user is talking. */ isTalking: () => Promise; /** * Get the audio type of user. */ getAudioType: () => Promise; }; export class ZoomVideoSdkAudioStatus implements ZoomVideoSdkAudioStatusType { userId: string; constructor(userId: string) { this.userId = userId; } async isMuted() { return await RNZoomVideoSdkAudioStatus.isMuted(this.userId); } async isTalking() { return await RNZoomVideoSdkAudioStatus.isTalking(this.userId); } async getAudioType() { return await RNZoomVideoSdkAudioStatus.getAudioType(this.userId); } }