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
  • Stream
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 UiUtilsServerStream
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/langgraph-sdkstreamMediaAssemblerOptions
Interface●Since v2.0

MediaAssemblerOptions

Dispatch callbacks receive a freshly-started handle on its first matching content-block-start. Exactly one callback fires per (messageId, blockType) pair.

Copy
interface MediaAssemblerOptions

Bases

MediaAssemblerCallbacks

Properties

property
fetch: (input: URL | RequestInfo, init?: RequestInit) => Promise<Response>

Optional fetch override, forwarded to the SSE transport. Useful for auth proxies, Next.js route handlers, or tests with injected mocks. Ignored when webSocketFactory is also supplied.

property
onAudio: (media: AudioMedia) => void
property
onFile: (media: FileMedia) => void
property
onImage: (media: ImageMedia) => void
property
onMedia: (media: AnyMediaHandle) => void

Invoked for every type; receives the same handle as the typed callback. Useful for writing one "all media" consumer without registering four type-specific callbacks.

property
onVideo: (media: VideoMedia) => void

Inherited fromMediaAssemblerCallbacks

Properties

PonAudio: (media: AudioMedia)PonFile: (media: FileMedia)PonImage: (media: ImageMedia)PonMedia: (media: AnyMediaHandle)
—

Invoked for every type; receives the same handle as the typed

PonVideo: (media: VideoMedia)
View source on GitHub