/** * High-sensitivity camera constraints for live barcode / QR decode. * Prefer rear camera + high ideal resolution so small symbols fill pixels. * * Do not set hard `min` width/height - Android Chrome often rejects those with * OverconstrainedError. Some Android builds also surface soft-constraint failure * as NotAllowedError; the ladder retries NotAllowed only until the final * `video: true` rung (a true user deny there is not retried). */ export declare const SCANNER_VIDEO_CONSTRAINTS: MediaTrackConstraints; /** * Progressive getUserMedia ladder for mobile browsers. * Soften resolution first, then facingMode-only, then any camera. */ export declare const SCANNER_VIDEO_CONSTRAINT_FALLBACKS: ReadonlyArray; /** * Optical zoom policy for scanner tracks: use the device's capability max * (not a hard 2x ceiling). Documented for callers; resolution is via * resolvePreferredOpticalZoom. */ export declare const SCANNER_OPTICAL_ZOOM_POLICY: "max"; /** * Resolve preferred optical zoom from MediaTrackCapabilities.zoom bounds. * Targets device max (G2) - no fixed 2x ceiling. Snaps down to a valid step * when `step` is provided. */ export declare function resolvePreferredOpticalZoom(min: number, max: number, step?: number): number; /** * Midpoint zoom for a stepped ladder toward max (G4 distance lever). * Snaps to step when provided. */ export declare function resolveMidOpticalZoom(min: number, maxTarget: number, step?: number): number; /** * Open a camera stream with progressive constraint fallbacks. * * Overconstrained / NotFound / NotReadable / Abort -> next rung. * NotAllowedError -> next rung only while `video` is not yet the final `true` * (any-camera) rung; on that last rung NotAllowed is a real deny and is rethrown. * Other failures (SecurityError, etc.) are rethrown immediately. */ export declare function openScannerMediaStream(getUserMedia: MediaDevices['getUserMedia']): Promise; /** * Best-effort continuous autofocus + torch after getUserMedia. * Optical zoom is NOT applied here — max zoom on open blurs/crops close barcodes * (camera shows a sharp code but @zxing never locks). The hook applies * {@link applyScannerDistanceZoom} only after multi-pass has already started * (second assist window), never at open and never at the first assist tick. */ export declare function applyScannerTrackEnhancements(track: MediaStreamTrack): Promise; /** * Delayed distance lever (G2/G4): mid → max optical zoom from capabilities. * Hook policy: call only after SCANNER_DISTANCE_ASSIST_DELAY_MS (multi-pass first) * plus SCANNER_DISTANCE_ZOOM_DELAY_MS — never on open and never at the first * assist tick, so close codes with slow AF are not forced into max zoom. */ export declare function applyScannerDistanceZoom(track: MediaStreamTrack): Promise; //# sourceMappingURL=scannerCameraConstraints.d.ts.map