/** * Normalize the diagnostic evidence a developer captures from the Roku * SceneGraph `Video` node when playback fails. * * The `Video` node exposes (all READ_ONLY): * - state — "error" once playback has failed * - errorCode — integer in -1..-6 (see ROKU_ERROR_CODES below) * - errorMsg — short human-readable message * - errorInfo — roAssociativeArray: { category, errcode, dbgmsg, drmerrcode, clipId, ignored, source, ... } * * Developers can read these via `roku_get_value` (RTA) or by printing * `formatJSON(m.video.errorInfo)` to the debug console. Either way the text * they paste in is rarely clean JSON, so the parser here is deliberately * tolerant: it accepts a real JSON object, a JSON string, or loose log text * and recovers whatever fields it can find. * * Source: https://developer.roku.com/dev/docs/video */ /** Roku Video-node `errorCode` catalog. */ export declare const ROKU_ERROR_CODES: Record; /** The `category` (a.k.a. `category_name`) values Roku reports in errorInfo. */ export type RokuErrorCategory = 'http' | 'drm' | 'mediaerror' | 'mediaplayer' | string; export interface NormalizedRokuError { /** Top-level Video.errorCode, when present (-1..-6). */ errorCode?: number; /** Plain-English meaning of errorCode, from ROKU_ERROR_CODES. */ errorCodeMeaning?: string; /** Video.errorMsg, when present. */ errorMsg?: string; /** errorInfo.category — http | drm | mediaerror | mediaplayer. */ category?: RokuErrorCategory; /** errorInfo.errcode — the internal Roku code. */ errcode?: number; /** errorInfo.dbgmsg — verbose debug message, often the single most useful field. */ dbgmsg?: string; /** errorInfo.drmerrcode — error code returned by the DRM system. */ drmerrcode?: number; /** errorInfo.clipId — id of the clip that failed. */ clipId?: number; /** Anything else we recognized but don't have a typed slot for. */ extra?: Record; /** True when we could not extract anything meaningful. */ empty: boolean; } /** * Parse and normalize whatever the developer pasted for the Video-node error. * Accepts a JSON object, a JSON string, or loose log text. */ export declare function normalizeRokuError(input: unknown): NormalizedRokuError; //# sourceMappingURL=error-info.d.ts.map