简体   繁体   English

HTML5 JQuery音频播放器

[英]HTML5 JQuery Audio Player

I am making a jQuery audio player, get audio source files from HTML5 tag. 我正在制作一个jQuery音频播放器,从HTML5标签获取音频源文件。 Everything works fine with play, pause, next and previous button. 播放,暂停,下一个和上一个按钮都可以正常工作。 Now I am looking for a solution to let the player continue playing all musics automatically after one music is finished without clicking on the next button. 现在,我正在寻找一种解决方案,使播放器在播放完一部音乐后自动继续播放所有音乐,而无需单击下一步按钮。 Does anyone know any tricks to loop through all musics and let it play one by one? 有谁知道在所有音乐中循环播放并使其一一播放的技巧? Thanks in advanced! 提前致谢!

Such functionality is not provided by the audio tag, but you could hook into the 'ended' event to trigger the next track. 音频标签未提供此类功能,但您可以加入“结束”事件以触发下一首曲目。

It's already been answered here, 在这里已经被回答了

HTML5 audio playlist - how to play a second audio file after the first has ended? HTML5音频播放列表-在第一个音频文件结束后如何播放第二个音频文件?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM