How to play an audio object instance in Safari?

0

How do I make an audio instance play in Safari?

var som = new Audio("http://www.sousound.com/music/healing/healing_01.mp3");

function tocar() {
   this.play();
}
som.addEventListener('canplay', tocar, false);

See in this example it does not work in Safari.

    
asked by anonymous 18.06.2018 / 21:42

0 answers