/** * handlers/mp4.ts — MP4 / MOV / M4A / M4V handler * * ISO Base Media File Format (ISOBMFF) — the container used by MP4, MOV, M4A, M4V. * Structure is a tree of "boxes" (also called "atoms"), each with: * [4B size][4B type][...data/children] * * We embed in the `udta` (user data) box inside `moov`, which is the standard * location for custom metadata in MP4/MOV files. QuickTime and ffmpeg preserve it. * * Strategy: * moov → udta → majk (our custom 4-char type) * * If udta doesn't exist in moov, we create it. * If moov doesn't exist (fragmented MP4), fall through to FallbackHandler. */ import { FormatHandler } from "../../types"; export declare class Mp4Handler implements FormatHandler { readonly name = "MP4/MOV"; readonly supportedMimeTypes: readonly ["video/mp4", "video/quicktime", "audio/mp4", "audio/m4a", "video/x-m4v", "video/m4v"]; canHandle(bytes: Uint8Array, mimeType?: string): boolean; embed(bytes: Uint8Array, signatureJson: string): Promise; extract(bytes: Uint8Array): Promise; strip(bytes: Uint8Array): Promise; private _parseBoxes; private _buildBox; }