Audio · const

AUDIO_FORMATS

Audio formats a slot will accept, in preference order.

Explained in Your first game.

const AUDIO_FORMATS: readonly ['opus', 'mp3', 'ogg', 'm4a', 'wav']
import { AUDIO_FORMATS } from '@driftengine/audio';

In depth

Opus first because it is the smallest at equal quality and payload budgets are always tight, but nothing requires it: whatever format a sound was made in can be dropped straight in. Every one of these decodes natively in the browsers a WebGL2 game already requires, so demanding a transcode would buy nothing and cost the person making the sound a round trip every time they wanted to hear it in context.