LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangGraph
  • Web
  • Channels
  • Pregel
  • Prebuilt
  • Remote
React SDK
Vue SDK
Svelte SDK
Angular SDK
LangGraph SDK
  • Ui
  • Client
  • Auth
  • React
  • Logging
  • React Ui
  • Utils
  • Server
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
  • Store
LangGraph Checkpoint Redis
  • Shallow
  • Store
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
  • Cli
LangGraph API
LangGraph CLI
LangGraph CUA
  • Utils
LangGraph Supervisor
LangGraph Swarm
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangGraph
WebChannelsPregelPrebuiltRemote
React SDK
Vue SDK
Svelte SDK
Angular SDK
LangGraph SDK
UiClientAuthReactLoggingReact UiUtilsServer
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
Store
LangGraph Checkpoint Redis
ShallowStore
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
Cli
LangGraph API
LangGraph CLI
LangGraph CUA
Utils
LangGraph Supervisor
LangGraph Swarm
Language
Theme
JavaScript@langchain/svelteVideoMedia
Interfaceā—Since v0.4

VideoMedia

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.
Copy
interface VideoMedia

Bases

MediaBase

Properties

Methods

View source on GitHub
property
blob: Promise<Blob>
property
error: MediaAssemblyError
property
id: string
property
messageId: string
property
mimeType: string
property
monotonic: boolean
property
namespace: string[]
property
node: string
property
objectURL: Promise<string>
property
partialBytes: Uint8Array
property
stream: ReadableStream<Uint8Array<ArrayBufferLike>>
property
type: "video"
property
url: string
method
revoke

Resolves 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.