Hi,
I am encoding to ogg via the users mic. The encoder returns a blob.
I am able to play this back if I do the following with an Audio object as so:
var url = URL.createObjectURL( oggBlob );
var audio = new Audio();
audio.src = url;
audio.play();
_OR_
<Audio src='blob:http://localhost/address_to_blob' />
The above plays just fine, but if I try to use Howler to play this same blob I can't get it to work.
var url = URL.createObjectURL( oggBlob );
var sound = new Howl({
urls: [url]
}).play();
Doesn't work
I've also tried some other variations on the above
var url = URL.createObjectURL( oggBlob );
var sound = new Howl({
autoplay: true
});
sound.src = url;
Any ideas? Is there something weird when using a blob like this?
Thanks
Same issue here
You can specify the extension:
var sound = new Howl({
src: [url],
ext: ['ogg']
});
And then howler will be able to check if the ogg format is supported in the browser.
Right, you need to specify the ext so that it knows what kind of audio is trying to be played.
Just an FYI for anyone that is looking at this later as reference, ext has been changed back to format.
Most helpful comment
Just an FYI for anyone that is looking at this later as reference,
exthas been changed back toformat.