I'm looking into implementing adaptive and progressive audio streaming in the browser, with no plugins. MSE is the HTML5 API I was waiting for, available in FF 42, but it seems that the audio format support in Firefox is not there?... mp3 audio is not working when using the MSE APIs.
Here's a code snippet:
var mediaSource = new window.MediaSource();
var audioSourceBuffer;
mediaSource.addEventListener('sourceopen', function (e) {
try {
var mimeType = "audio/mpeg";
audioSourceBuffer = mediaSource.addSourceBuffer(mimeType);
} catch (e) {
log('Exception calling addSourceBuffer', e);
return;
}
}
I get a NotSupportedError exception when calling addSourceBuffer.
Doesn't Firefox support mp3? from MDN list of supported formats (https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats) it implies that mp3 support should be there if the OS supports it - and the OS I am testing on (OSX) does support it.
Any help appreciated!