Skip to content
1 min read · 224 words

Interface: SerializedMedia

Defined in: src/lib/classes/media.ts:192

The plain-object, JSON-safe form of a Media produced by Media.toJSON.

Properties

PropertyTypeDescriptionDefined in
byteLength?numberSize of the underlying bytes in bytes, when known.src/lib/classes/media.ts:210
filenamestringOriginal or suggested file name for the asset.src/lib/classes/media.ts:200
idstringStable identifier for this media asset.src/lib/classes/media.ts:194
kind"document" | "audio" | "image" | "video"High-level modality of the asset (e.g. image, audio, document).src/lib/classes/media.ts:196
mimeTypestringMIME type of the underlying bytes (e.g. image/png).src/lib/classes/media.ts:198
modalityHazard"inert" | "extractable-instructions" | "opaque-perceptual"Whether the modality can carry hidden instructions (extractable-instructions) or is opaque-perceptual.src/lib/classes/media.ts:206
source?stringOptional provenance string (URL, path, or other origin marker).src/lib/classes/media.ts:202
stashRecord<string, MediaStashEntry>Adapter-scoped side-channel data keyed by name (e.g. provider upload handles).src/lib/classes/media.ts:208
trustTier"first-party" | "third-party-public" | "third-party-private"Trust tier governing how the asset's content is framed to the model.src/lib/classes/media.ts:204