是否可以在无需用户点击或鼠标悬停的情况下播放声音文件?
我有一个记分牌,我想在球队得分时播放声音文件。任何指示将不胜感激。我基本上完成了记分牌,但没有声音。
谢谢。
最佳答案
https://github.com/admsev/jquery-play-sound
$.playSound('http://example.org/sound.mp3');
或
document.getElementById('yourAudioTag').play();
关于Javascript - 声音,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25046030/