/** * Stable, machine-readable codes for clip recording/upload failures. * * These accompany (never replace) the human-readable message so callers * can branch on a value that does not change with browser locale or * wording. Shared by the audio + video clip paths. * * The code SETS below are the single source of truth: the union types * are derived from them, and the `normalize*`/`is*` guards validate any * runtime value against them. This is what makes the codes safe across * every scenario — SDK-emitted, local-fallback, classifier output, or a * value smuggled in by an untyped custom client: anything off-union is * coerced to a defined fallback before it reaches a consumer. */ /** A clip recorded but could not be stored. */ export declare const CLIP_DROP_CODES: readonly ["empty-recording", "rejected", "server-error", "network-error", "timeout"]; /** A recording could not be started or produced no clip at all. */ export declare const CLIP_START_ERROR_CODES: readonly ["permission-denied", "no-device", "device-in-use", "no-audio-track", "no-video-track", "unsupported", "unknown"]; export type ClipDropCode = (typeof CLIP_DROP_CODES)[number]; export type ClipStartErrorCode = (typeof CLIP_START_ERROR_CODES)[number]; export declare function isClipDropCode(value: unknown): value is ClipDropCode; export declare function isClipStartErrorCode(value: unknown): value is ClipStartErrorCode; /** * Coerce any value to a valid {@link ClipDropCode}. In-union values pass * through; anything else (undefined, a stray string from an untyped * client, a future code this build doesn't know) becomes the fallback. */ export declare function normalizeClipDropCode(value: unknown): ClipDropCode; /** Coerce any value to a valid {@link ClipStartErrorCode}. */ export declare function normalizeClipStartErrorCode(value: unknown): ClipStartErrorCode; /** * Classify a thrown recording/acquisition error into a stable code. * Mirrors the name-checks used for SDK telemetry so the two stay in * step. The audio/video no-track distinction comes from the error * message itself, so the kind doesn't need to be passed in. The return * is always a valid {@link ClipStartErrorCode} (worst case "unknown"). */ export declare function classifyClipStartError(err: unknown): ClipStartErrorCode; //# sourceMappingURL=clip-error-codes.d.ts.map