Howler.js error: 'array of source files must be uploaded with any new Howl'
So I'm trying to test using Howler.js to play an audio file. When I run this html file and click the button, I get an error in the console: "Array of source files should be uploaded with any new Howl".
HTML:
<!DOCTYPE html>
<html>
<head>
<title>Play Sound</title>
<script src='./howler.js/dist/howler.js'></script>
</head>
<body>
<button id="btn">Play</button>
<script>
var pong = new Howl({urls: ['sound.mp3', 'sound.ogg']});
document.getElementById('btn').onclick=function(){pong.play();}
</script>
</body>
</html>
+3
source to share