Skip to content

createDocumentService

function createDocumentService(
track,
document?,
options?
): DocumentService;

Defined in: relay-sdks/ts/src/document-service.ts:199

Serve a state-shaped track whose document the application replaces, such as the msf-01 media timeline: the latest document goes out as a new group on every relay subscription, as createCatalogService does, and again on every update() while the relay is subscribed. Nothing is sent before the first document, and an update without relay demand only replaces it.

Parameter Type
track RelayTrackWriter
document? ArrayBufferView<ArrayBufferLike>
options? CatalogServiceOptions

DocumentService