开发者

Embed mp3 in html

I used this code for embed a mp3 file to html:

<EMBED SRC="mp3 link" HEIGHT=60 WIDTH=300>];

the problem is that the browser download the file an开发者_C百科d than he play it, there is any way for do it in buffer or something like this?

because i want the user will not wait.


For browsers that support HTML 5 you can use this:

<audio src="song.mp3" controls="controls">
Your browser does not support the audio element.
</audio>

Otherwise you'd have to use JQuery as suggested above, or a flash audio player.


Google has a good player :

<embed type="application/x-shockwave-flash" flashvars="audioUrl=MP3_FILE_URL" src="http://www.google.com/reader/ui/3523697345-audio-player.swf" width="400" height="27" quality="best"></embed>


Use the audio element of HTML5:

<audio src="[mp3 link]" preload controls></audio>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜