Shared surface across every media handle returned by MediaAssembler.
The handle is live while its parent message is active:
partialBytes is a snapshot of all bytes received so far.stream is a lazy, single-consumer byte stream (see
accessor docstring).blob / objectURL settle on message-finish.error becomes set if the handle terminates in any of the
MediaAssemblyErrorKind failure modes.interface VideoMediaResolves on message-finish with the concatenated Blob.
Set iff the handle settled in an error state.
id from the originating content block, if the provider sent one.
Diagnostic: false if block indices arrived out of order.
Lazy URL.createObjectURL over blob. Cached: first
access creates the URL, subsequent accesses return the same one.
Call revoke to free the URL slot; the next access creates
a fresh URL. ThreadStream.close() auto-revokes as a safety net.
Live view of accumulated bytes. Settles with final bytes on finish.
Live byte stream.
Lazy: not materialised unless accessed. On first access the
stream is seeded with every byte already accumulated
(partialBytes) and then wired to future chunks. For URL-sourced
blocks, first access triggers fetch() and pipes the response
body through.
Repeated access returns the same ReadableStream reference
ā you can safely read it once, release the lock, and re-acquire a
reader later (e.g. React StrictMode effect re-invokes). The
standard ReadableStream.locked semantics prevent concurrent
readers; use stream.tee() when you truly need multiple live
consumers.
Present iff the originating block carried url (not data).
When set, blob / stream / objectURL lazily fetch from here
on first access.
Revoke the currently-cached object URL (if any). Subsequent accesses to objectURL create a fresh URL from the Blob. Idempotent.