Notes for Music Player
-replace song.mp3 with the url of the song you want
-delete autoplay="autoplay" if you don't want the song to start when the page loads
-delete loop="loop" if you only want the song to play once
-delete controls="controls" if you don't want the play/pause button
方法1:最直接的html格式,在chrome下测试成功
<audio controls="controls" loop="loop" autoplay="autoplay"> <source src="song.mp3" type="audio/mpeg" /> Your browser does not support the audio element. </audio>
<zaudio src="http://mp3file21.mafengwo.net/201304290000/45bac052cacc6ae561f2173107c69878/M00/9D/73/wKgB3FFz7IaAeoOEAF-WgFrqx4k442.mp3" controls autoplay>
<body><video controls="" autoplay="" style="margin: auto; position: absolute; top: 0; right: 0; bottom: 0; left: 0;" name="media" src="http://mp3file21.mafengwo.net/201304290000/45bac052cacc6ae561f2173107c69878/M00/9D/73/wKgB3FFz7IaAeoOEAF-WgFrqx4k442.mp3"></video></body>
方法2: 参考马蜂窝网站,可以调播放器颜色
<script> swfobject.embedSWF("/swf/player.swf?soundFile=http://mp3file21.mafengwo.net/201304290000/45bac052cacc6ae561f2173107c69878/M00/9D/73/wKgB3FFz7IaAeoOEAF-WgFrqx4k442.mp3&bg=0xeeeeee&leftbg=0xFAB303&lefticon=0xFFFFFF&rightbg=0xF89213&rightbghover=0xaf2910&righticon=0xFFFFFF&righticonhover=0xffffff&text=0x666666&slider=0x666666&track=0xFFFFFF&border=0x666666&loader=0x9FFFB8&autostart=yes&loop=yes", "music_show", "310", "30", "9.0.0", "expressInstall.swf","",{wmode: "transparent",allowscriptaccess:"always"}); </script>
方法3: 参考Weebly网站
<embed src="http://www.weebly.com/weebly/apps/audioPlayer2.swf?soundFile=http://mp3file21.mafengwo.net/201304290000/45bac052cacc6ae561f2173107c69878/M00/9D/73/wKgB3FFz7IaAeoOEAF-WgFrqx4k442.mp3" type="application/x-shockwave-flash" wmode="transparent" height="40" width="290" controls = "autoplay"></embed>