How to play sounds and music?

Hello, I am using translator.

I have a little problem. It’s that when I try to play a sound with Javascript I have to put the audio in the same location as the game’s Json file for it to play.

For example. If I save the .wav file in the src/sounds/sound.wav folder and enter play(“src/sounds/sound.wav”, //…) it just doesn’t sound. Can’t find the file. I have tried with the backslash src\sounds\sound.ext and neither.

But if I leave the .wav file in the same location as the game’s Json. Oh yes it plays correctly. But it doesn’t seem as organized as possible. I would like you to help me with this please. I am using a translator.