使用jquery播放mp3文件 [英] play mp3 file using jquery
本文介绍了使用jquery播放mp3文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在网站上使用jquery播放mp3文件。我使用servlet或http播放歌曲。我怎样才能计算播放歌曲的总时间。
How can i play an mp3 file using jquery in website.I m using servlets or http to play a song.Also how can i calculate total time of song played.
问候
Angelina
Regards Angelina
推荐答案
您可以将包含声音的元素添加到页面中:
You can add an element with your sound to the page:
var sound = $('<embed autoplay="true" height="0" width="0" />');
sound.attr('src', urlOfMyMp3);
$('body').append(sound);
资料来源:在网站上嵌入MP3
这篇关于使用jquery播放mp3文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文