import { NativeModules } from 'react-native'; import type { RecordingStatus } from './ZoomVideoSdk'; import type { Errors } from '../native/ZoomVideoSdk'; const { RNZoomVideoSdkRecordingHelper } = NativeModules; /** * Class for using cloud recording in the session. */ export type ZoomVideoSdkRecordingHelperType = { /** * Checks if the current user meets the requirements to start cloud recording. The requirements are a cloud recording add-on plan and the cloud recording feature enabled on the web portal. */ canStartRecording: () => Promise; /** * Start cloud recording. */ startCloudRecording: () => Promise; /** * Stop cloud recording. */ stopCloudRecording: () => Promise; /** * Pause the ongoing cloud recording. */ pauseCloudRecording: () => Promise; /** * Resume the previously paused cloud recording. */ resumeCloudRecording: () => Promise; /** * Get the current status of cloud recording. */ getCloudRecordingStatus: () => Promise; }; export class ZoomVideoSdkRecordingHelper implements ZoomVideoSdkRecordingHelperType { async canStartRecording() { return await RNZoomVideoSdkRecordingHelper.canStartRecording(); } async startCloudRecording() { return await RNZoomVideoSdkRecordingHelper.startCloudRecording(); } async stopCloudRecording() { return await RNZoomVideoSdkRecordingHelper.stopCloudRecording(); } async pauseCloudRecording() { return await RNZoomVideoSdkRecordingHelper.pauseCloudRecording(); } async resumeCloudRecording() { return await RNZoomVideoSdkRecordingHelper.resumeCloudRecording(); } async getCloudRecordingStatus() { return await RNZoomVideoSdkRecordingHelper.getCloudRecordingStatus(); } }