Expand description
Magic-byte sniffing and MIME mapping for supported guest audio containers.
Constants§
- AUDIO_
FORMAT_ FLAC - FLAC lossless.
- AUDIO_
FORMAT_ MP3 - MP3 (MPEG-1/2 Audio Layer III).
- AUDIO_
FORMAT_ OGG - Ogg (Vorbis, Opus, etc.).
- AUDIO_
FORMAT_ UNKNOWN - Unknown or not recognized as a supported Oxide audio format.
- AUDIO_
FORMAT_ WAV - WAV / RIFF WAVE.
- AUDIO_
HTTP_ ACCEPT Acceptheader sent withsuper::capabilitiesURL fetches so servers can pick a codec/container.
Functions§
- is_
likely_ non_ audio_ document - MIME types that usually indicate an HTML/JSON error body rather than a media stream.
- mime_
to_ audio_ format - Map a
Content-Type(or similar) value to anAUDIO_FORMAT_*constant, orAUDIO_FORMAT_UNKNOWN. - sniff_
audio_ format - Inspect leading bytes (and minimal MP3 frame sync after ID3) to guess the container/codec.