getDetectedFormatMimeType
Returns the MIME type for a detected container format.
function getDetectedFormatMimeType(format): string;
Defined in: src/utils/audioFormat.ts:421
Returns the MIME type for a detected container format.
Parameters
| Parameter | Type | Description |
|---|---|---|
format | DetectedAudioFormat | A format returned by detectAudioFormat. |
Returns
string
The corresponding MIME type (e.g. 'audio/wav').
Remarks
Complements getAudioMimeType, which maps the SDK’s AudioFormat type. This function maps the wider DetectedAudioFormat set returned by detectAudioFormat.
Example
getDetectedFormatMimeType('mp3'); // => 'audio/mpeg'
getDetectedFormatMimeType('ogg'); // => 'audio/ogg'
See
detectAudioFormat for obtaining the format