Skip to content
Function

getFirstEncodableVideoCodec

ts
getFirstEncodableVideoCodec(
	checkedCodecs: VideoCodec[],
	options?: {
		width?: number;
		height?: number;
		quality?: Quality;
		/** @deprecated Use `quality` instead. */
		bitrate?: number | Quality;
	},
): Promise<VideoCodec | null>;

Returns the first video codec from the given list that can be encoded by the browser.

See VideoCodec and Quality.

Released under the Mozilla Public License 2.0.