Sound works in Edge and not in Chrome
With this code
<!DOCTYPE html>
<html>
<head>
</head>
<body onload="init()">
<script type="text/javascript" src="soundjs-NEXT.js"></script>
<script>
var src = "fransk1.mp3"; // set up our source
var soundInstance; // the sound instance we create
function init() {
createjs.Sound.on("fileload", handleLoad, this); // add an event listener for when load is completed
createjs.Sound.registerSound(src); // register sound, which will preload automatically
}
function handleLoad(evt) {
startPlayback();
}
function startPlayback(evt) {
if (soundInstance) {
return;
}
soundInstance = createjs.Sound.play(src);
}
</script>
</body>
</html>
I'm not getting any sound to boot in the browser Chrome version 71.0.3578.80 but on the other hand, the sound works in the Microsoft Edge browser.
Why is it so wondering I over.