import { NativeModules } from 'react-native'; import type { Errors } from '../native/ZoomVideoSdk'; const { RNZoomVideoSdkWhiteboardHelper } = NativeModules; /** * Whiteboard helper interface. */ export type ZoomVideoSdkWhiteboardHelperType = { /** * Determines whether the current user can start whiteboard sharing. Only the host can start whiteboard sharing. */ canStartShareWhiteboard: () => Promise; /** * Determines whether the current user can stop whiteboard sharing. */ canStopShareWhiteboard: () => Promise; /** * Starts whiteboard sharing in the session. */ startShareWhiteboard: () => Promise; /** * Stops whiteboard sharing in the session. */ stopShareWhiteboard: () => Promise; /** * Determines whether another user is currently sharing a whiteboard. */ isOtherSharingWhiteboard: () => Promise; /** * Exports the currently shared whiteboard. * @param format The export format. Use "EXPORT_FORMAT_PDF" for PDF format. */ exportWhiteboard: (format: string) => Promise; }; export class ZoomVideoSdkWhiteboardHelper implements ZoomVideoSdkWhiteboardHelperType { async canStartShareWhiteboard() { return await RNZoomVideoSdkWhiteboardHelper.canStartShareWhiteboard(); } async canStopShareWhiteboard() { return await RNZoomVideoSdkWhiteboardHelper.canStopShareWhiteboard(); } async startShareWhiteboard() { return await RNZoomVideoSdkWhiteboardHelper.startShareWhiteboard(); } async stopShareWhiteboard() { return await RNZoomVideoSdkWhiteboardHelper.stopShareWhiteboard(); } async isOtherSharingWhiteboard() { return await RNZoomVideoSdkWhiteboardHelper.isOtherSharingWhiteboard(); } async exportWhiteboard(format: string) { return await RNZoomVideoSdkWhiteboardHelper.exportWhiteboard(format); } }