Different audio format support

Hello, i want to use ogg auido format in my project
But i know that on safari ogg is not available, so on IE and Safari i will give mp3 format
Does playcanvas has a native instrument to run a format that it needs?
For example, in phaser.js i load 2 sounds with different types for 1 name, and everything was working

Hi @wazti,

Right now it’s not supported by the engine, so you will have to handle that on your own. I think having audio variant files has come up as a request a couple of times before.

Try submitting a feature request in the engine repo about it in the meantime: Issues · playcanvas/engine · GitHub

1 Like

thanks for reply!

It has come up a few times. It hasn’t really been considered because the workaround is to use mp3 which is supported by all modern browsers

1 Like

Doesn’t using mp3s in commercial projects require a license in some cases?

I believe it’s gone license free? MP3 Format Is Now License-Free - CCM

1 Like

I’ve used howler.js (github) for a number of projects. It’s open source (MIT License), easy to learn and supports all formats - you provide however many extensions based on what you have available in whatever order you prefer, and it will use the first format which is supported by the browser.

1 Like