Skip to content

Type Alias: CmcdTransportAdapter ​

ts
type CmcdTransportAdapter = object;

Defined in: CmcdTransportAdapter.ts:27

Pluggable transport-interception contract for CmcdReportRecorder. The default implementations, createXhrTransport and createFetchTransport, patch global XMLHttpRequest and fetch. Custom adapters can wrap other transports, for example undici or a player-internal HTTP client.

Methods ​

attach() ​

ts
attach(deliver): () => void;

Defined in: CmcdTransportAdapter.ts:35

Install interception on the transport. Called once per recorder attach(). The adapter must normalize each outgoing request to HttpRequest (reading the body to a synchronous value if necessary) and invoke deliver. Returns a detach function that restores the original transport.

Parameters ​

deliver ​

CmcdRequestDeliver

Returns ​

() => void

A Streaming Video Technology Alliance project.