Optionalid: stringOptionalforcedHash: stringOptionalaudioOptionalblobOptionalcustomOptionaldurationOptionalfilmstripThis is an url for a filmstrip placeholder
OptionalfitFit strategy used to refit clips when the loaded media differs from the serialized one.
OptionalhashOptionalheightOptionalmediaMedia payload used by previews, playback, object URLs, and FFmpeg mounts. Preserves File instances when available.
OptionalmetadataOptionalmimeOptionalpermanentOptionalstoreOptionalthumbnailOptionalwidthOptionalduration: numberReturns the fit strategy used when a different media loads behind this media id.
The configured fit strategy, or undefined when the defaults apply.
Returns the media hash computation state.
NONE before any hashing, PARTIAL while a hash is being computed (inline or in the
background), DONE once getHash() is available, ERROR when hashing failed.
The hash processing state.
Returns the stable library media id.
Media id.
Returns the media payload, preserving File identity when available.
Returns the current display name of the media asset.
Media name.
Returns the ids of placeholder clips currently waiting for this media to finish loading.
Read-only placeholder clip id list.
Serialized-project media duration in seconds; see getSerializedWidth.
Serialized-project media height; see getSerializedWidth.
Returns the media width as it was in the serialized project (captured before load()
overwrote it), or undefined for media created in this session or old projects that did not
serialize dimensions.
Builds the normalized storage payload used by storage providers.
The method only succeeds once the media is fully ready and has a content hash plus a source payload.
Storage payload, or null when the media is not ready for persistence.
Indicates whether a content hash may still materialize for this media (still loading, or a background hash is in flight). Used to defer storage removals during sync.
true while the hash is still pending.
Initializes a deserialized media, restoring it from storage or reloading its permanent URL.
Like load, it guarantees the status settles to ERROR on failure so it never stays on a
transient value — see Library::hasLoadingMedia.
A promise that resolves once the media has been initialized.
Loads media from a file, URL or raw bytes.
Guarantees the status always settles: on any failure it lands on ERROR (or stays DESTROYED
when the media was destroyed mid-load) instead of being left on a transient LOADING/
FILMSTRIP value. Callers rely on a settled status — see Library::hasLoadingMedia.
Media source.
OptionalmimeType: stringOptional mime type override.
Optionalfilename: stringOptional filename override.
A promise that resolves once the media has loaded.
Serializes the media record into project-safe data.
Serialized media record payload.
Sets the fit strategy applied to dependent clips when the loaded media turns out to be
different from the media the project was serialized with (see Library.applyMediaFitStrategies).
Fit strategy, or undefined for the defaults (MATCH_SCALE, crop remapped).
Nothing.
StaticdeserializeReconstructs a media record shell from serialized project data.
Runtime-only fields such as thumbnails, FFmpeg paths, and loaded blob URLs are intentionally not restored here.
Serialized media payload.
Deserialized media record.
Staticunlock
Library record representing one imported media asset and all of its derived runtime metadata.
A
MediaDatainstance tracks the original payload, FFmpeg-mountable source, derived previews, placeholder-clip resolution, storage sync, and hash/metadata information needed across the editor.