import { PermissionStatus } from "./Permission"; /** Error thrown by CameraManager.open() — carries the classified permission * status alongside the friendly message, so callers can decide whether a * failure is worth retrying without re-deriving it from the raw DOMException. */ export declare class CameraAccessError extends Error { readonly status: PermissionStatus; constructor(message: string, status: PermissionStatus); } export declare class CameraManager { private stream; private onInterrupted; private trackEndedHandlers; /** * Opens the camera via requestCameraAccess(), which maps browser errors * (denied, no device, in-use-by-another-app) to a clean message thrown here. */ open(constraints?: MediaStreamConstraints): Promise; getStream(): MediaStream | null; /** * Adopt an externally-obtained stream (e.g. a pre-warmed getUserMedia * stream) so stop() also releases it. Without this, a stream assigned * directly by a caller instead of via open() is never tracked here and * stop() becomes a no-op for it, leaking the camera. */ setStream(stream: MediaStream): void; /** * Register a callback fired the moment any track in the current stream * ends unexpectedly (OS revokes camera permission mid-session, another * app steals the camera, device sleeps and the driver drops the feed). * Without this, a dead stream is silently invisible — the video element * just freezes on its last frame and face detection quietly fails * forever with no indication anything went wrong. */ onStreamInterrupted(callback: () => void): void; private _watchTracks; stop(): void; } //# sourceMappingURL=CameraManager.d.ts.map