Loadremote AudioClip

When I loadremote audioclip it says CORS


loadMp3() {
assetManager.loadRemote(this.mpAudioClipUrl, AudioClip, (err: Error, audio: AudioClip) => {
if (err) {
console.log(‘Error load audio remote :’, err);
return;
}
AudioManager.instance.play(audio);
});
}
cocos creator version 3.8.3

@Tom_k pls help me!


You can try the url which is listed in build panel. Or please provide the audio url for me to check.

You have redacted your url where you are trying to obtain the content from but it is currently not allowing requests from your localhost by the looks of things!

If the location of the content is your own, you should set a CORS header in the response to allow the content…

You can find further information on Cross Origin Request Sharing, on Mozilla or just google CORS.

Hope that helps in some way, good luck.