Open Moxmi opened 6 years ago
Have the same bug.
This is because PreloadJS (which SoundJS under the hood) uses file extensions to automatically determine if a file source is a sound. You can hint to SoundJS/PreloadJS that a file is a sound using type
.
createjs.Sound.registerSound({src: src, type:"sound"});
Further, if you have different MP3/OGG sources to support a wider browser list, you can pass an object with extensions a keys to indicated which sources are which file type, since no file extension is present to help out with that.
createjs.Sound.registerSound({src: {mp3: src1, ogg:src2}, type:"sound"});
It might make sense for SoundJS to be a little more permissive when adding string paths, since there is no need to determine the file type to try and load it as a sound. I will leave this open to track that feature.
as the follow: