Reputation: 51
Is it right? It doesn't work.
var snd = new Audio('/bgm/1.mp3') //the path is [project dir]/src/resources/bgm/1.mp3
snd.play();
Upvotes: 2
Views: 1523
Reputation: 11
var snd = new Audio('/jah/assets/bgm/1.mp3') //the path is [project dir]/src/resources/bgm/1.mp3 snd.load(); snd.play();
try the above changes it will work in debug mode
Upvotes: 1