UNPKG

kwikid-components

Version:
63 lines (62 loc) 1.82 kB
import { DeviceType } from "./permission-checker.constants"; export declare function detectDeviceType(): DeviceType; /** * Request microphone permission * @returns Promise resolving to an object with success status and optional error */ export declare function requestMicrophonePermission(): Promise<{ granted: boolean; error?: any; }>; /** * Request location permission * @returns Promise resolving to an object with success status and optional error */ export declare function requestLocationPermission(): Promise<{ granted: boolean; error?: any; }>; /** * Checks if the device has both front and back cameras * @returns Promise that resolves to an object containing camera availability info */ export declare function checkCameraAvailability(): Promise<{ isFrontCamera: boolean; isBackCamera: boolean; error?: any; }>; /** * Tests the front camera * @returns Promise resolving to result object with granted status and optional stream/error */ export declare function testFrontCamera(): Promise<{ granted: boolean; stream?: MediaStream; error?: any; }>; /** * Tests the back camera * @returns Promise resolving to result object with granted status and optional stream/error */ export declare function testBackCamera(): Promise<{ granted: boolean; stream?: MediaStream; error?: any; }>; /** * Tests both front and back cameras * @param bothRequired Whether both cameras are required for success * @returns Promise resolving to result object with status of both cameras */ export declare function testBothCamera(bothRequired?: boolean): Promise<{ frontCamera: { granted: boolean; error?: any; }; backCamera: { granted: boolean; error?: any; }; allGranted: boolean; errorMessage?: string; }>;