Skip to content
Function

getFirstEncodableAudioCodec

ts
getFirstEncodableAudioCodec(
	checkedCodecs: AudioCodec[],
	options?: {
		numberOfChannels?: number;
		sampleRate?: number;
		quality?: Quality;
		/** @deprecated Use `quality` instead. */
		bitrate?: number | Quality;
	},
): Promise<AudioCodec | null>;

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

See AudioCodec and Quality.

Released under the Mozilla Public License 2.0.