0

I am trying to play audio samples from my host with tone.js but no sound.

I try this code from tone.js and it work :

const player2 = new Tone.Player("https://tonejs.github.io/audio/berklee/gong_1.mp3").toDestination();

when I change the link "https://tonejs.github.io/audio/berklee/gong_1.mp3" with my direct host link, no sound.

Caesar
  • 6,733
  • 4
  • 38
  • 44

1 Answers1

0

I think it's a problem with your host, (try changing permissions on your file), try this link, it's my host, it works for me.

  player = new Tone.Player("https://vivo-vivendo-musica.com/sample/1_Hat.mp3").toDestination();
            // play as soon as the buffer is loaded
            player.autostart = true;