Resource Type
A media / binary asset referenced by the document body. To keep the unified document small and portable, binary bytes are NOT inlined. Instead a reader extracts them to local storage (via `IResourceStore`) and records a relative `LocalPath` here; the body references the asset by `Id`. The consumer decides whether and how to load the bytes.
Record fields
| Record Field |
Description
|
Full Usage:
DurationMs
Field type: int option
|
Duration in milliseconds, for audio / video.
|
|
|
|
|
Full Usage:
LocalPath
Field type: string option
|
Relative path to the extracted bytes inside the document bundle (e.g. "resources/img-001.png"). `None` when only `Uri` is known.
|
Full Usage:
MediaType
Field type: string
|
IANA media type, e.g. "image/png", "video/mp4", "font/woff2".
|
Free-form extra metadata (codec, alt-text source, original filename, ...).
|
|
Full Usage:
PixelHeight
Field type: int option
|
Intrinsic pixel height, for images / video.
|
Full Usage:
PixelWidth
Field type: int option
|
Intrinsic pixel width, for images / video.
|
Full Usage:
Sha256
Field type: string option
|
SHA-256 of the bytes (lower-case hex), enabling de-duplication and integrity checks.
|
Full Usage:
Uri
Field type: string option
|
External location, when the asset is referenced rather than extracted.
|
Static members
| Static member |
Description
|
Full Usage:
Resource.Local(id, kind, mediaType, localPath)
Parameters:
string
kind : ResourceKind
mediaType : string
localPath : string
Returns: Resource
|
A locally-extracted resource with no extra intrinsic metadata.
|
Nao