I’m trying to play a sound where the url includes query parameters, but the sound will only play if I remove the query parameter from the url.
The problem is that I’m required to have files hosted on a CDN that I don’t control, which requires certain query parameters to be included in the url. So simply removing the query parameters won’t work in my case.
You can also set the skipCodecCheck option to true in the Sound constructor. That way you can set the sound to be streamed if you want. The solution posted earlier does not allow the sound to be streamed.
When you pass a url to the Sound constructor, you can set the streaming option to true to have the sound start playing before it is completely downloaded. This is mainly used for long sound files that you want to start as soon as possible.
The streaming option does nothing if you pass an array buffer to the Sound constructor, because the sound has already been downloaded. So, while the solution posted earlier works fine, it will not work if you want to set the streaming option to true on a long sound file.