getAudioMimeType
Returns the MIME type string corresponding to an AudioFormat.
function getAudioMimeType(format): string;
Defined in: src/utils/audio.ts:215
Returns the MIME type string corresponding to an AudioFormat.
Parameters
| Parameter | Type | Description |
|---|---|---|
format | AudioFormat | The audio format to look up. |
Returns
string
The MIME type string (e.g., 'audio/mpeg' for mp3), or 'application/octet-stream' if the format is not recognized.
Example
getAudioMimeType('mp3'); // 'audio/mpeg'
getAudioMimeType('wav'); // 'audio/wav'
getAudioMimeType('opus'); // 'audio/opus'