TrackProcessor
Defined in: client-sdk-js/src/track/processor/types.ts:27
Experimental
A track processor transforms a MediaStreamTrack before publishing.
Implementors must provide at least init, restart, and destroy.
The SDK calls these methods at the appropriate lifecycle moments.
After init (and restart), the processor MUST set processedTrack
to the transformed output track. The SDK will publish this track instead
of the original.
Type Parameters
Section titled “Type Parameters”T extends TrackKind = TrackKind
Properties
Section titled “Properties”destroy
Section titled “destroy”destroy: () => Promise<void>;Defined in: client-sdk-js/src/track/processor/types.ts:48
Experimental
Destroy the processor and release all resources. After calling this,
processedTrack should be undefined.
Returns
Section titled “Returns”Promise<void>
init: (opts) => Promise<void>;Defined in: client-sdk-js/src/track/processor/types.ts:35
Experimental
Initialize the processor with the given options. After this call,
processedTrack must be set.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<void>
name: string;Defined in: client-sdk-js/src/track/processor/types.ts:29
Experimental
Human-readable processor name (for logging/debugging).
processedTrack?
Section titled “processedTrack?”processedTrack?: MediaStreamTrack;Defined in: client-sdk-js/src/track/processor/types.ts:54
Experimental
The transformed output track. Must be set after init / restart.
The SDK publishes this track instead of the original source.
restart
Section titled “restart”restart: (opts) => Promise<void>;Defined in: client-sdk-js/src/track/processor/types.ts:42
Experimental
Restart the processor (e.g. when the source track changes). The implementation should release old resources and re-initialize with the new options.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<void>