Skip to content
Function

registerVideoSampleTransformer

ts
registerVideoSampleTransformer(
	transformer: (
		sample: VideoSample,
		description: VideoSampleTransformationDescription,
	) => MaybePromise<VideoSample | null>,
): void;

Registers a callback to handle the transformation of VideoSample instances. The callback can either return the transformed sample, or null to indicate that it doesn't want to handle the given transformation task.

See VideoSample, VideoSampleTransformationDescription, and MaybePromise.

Released under the Mozilla Public License 2.0.