-
We recommend using .ogg as both Android and iOS have no issues playing this audio format.
-
After you have your audio file ready, you need to place it into a subfolder of the effect called “audios”.
-
You need to open the config.json of the effect you want to add music to and declare the audio file there as a media type of audio according to the below example:
Important: make sure you set the filename to match that of your audio file -
in the config.js of the effect you need to declare the following object:
const audio = bnb.scene.getAssetManager().findAudioTrack(“name”).asMedia()
Important: make sure you set “name” in the line above to match that of your audio file -
You can then use these methods in the config.js to further configure it: