import { NativeModules, Platform } from 'react-native'; const { RNZoomVideoSdkVideoStatus } = NativeModules; /** * Video status of the user. */ export type ZoomVideoSdkVideoStatusType = { /** * Determine whether the video device is available. */ hasVideoDevice: () => Promise; /** * Determine whether the video is turned on. */ isOn: () => Promise; }; export class ZoomVideoSdkVideoStatus implements ZoomVideoSdkVideoStatusType { userId: string; constructor(userId: string) { this.userId = userId; } async isOn() { return await RNZoomVideoSdkVideoStatus.isOn(this.userId); } async hasVideoDevice() { if (Platform.OS === 'ios') { return true; } return await RNZoomVideoSdkVideoStatus.hasVideoDevice(this.userId); } }