getEncodableAudioCodecs()v4.0.403
Part of the @remotion/web-renderer package.
Returns the audio codecs that the current browser can encode for a given container format.
Use this function to dynamically show users which audio codecs are available in their browser.
Example usageimport {getEncodableAudioCodecs } from '@remotion/web-renderer'; constcodecs = awaitgetEncodableAudioCodecs ('mp4');console .log (codecs ); // e.g. ['aac', 'opus']
Arguments
container
string WebRendererContainer - required
The container format: "mp4", "webm", "mkv", "mov", "wav", "mp3", "aac", "ogg" or "flac".
options?
object GetEncodableAudioCodecsOptions
Optional configuration object.
audioBitrate?
number | string WebRendererQuality
A number (bits per second) or quality preset ("very-low", "low", "medium", "high", "very-high").
Return value
Returns a Promise<WebRendererAudioCodec[]> - an array of audio codec identifiers that the browser can encode.
Possible values: "aac", "opus", "mp3", "vorbis", "pcm-s16", "flac"
Compatibility
| Browsers | Environments | |||||
|---|---|---|---|---|---|---|
Chrome | Firefox | Safari | ||||