Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用tone.js 播放来自我的主机的音频样本,但没有声音。
我从tone.js尝试了这段代码,它可以工作:
const player2 = new Tone.Player("https://tonejs.github.io/audio/berklee/gong_1.mp3").toDestination();
当我用我的直接主机链接更改链接“https://tonejs.github.io/audio/berklee/gong_1.mp3”时,没有声音。
我认为这是您的主机的问题,(尝试更改文件的权限),试试这个链接,它是我的主机,它对我有用。
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;