我正在使用以下代码在网页中嵌入MP3音频文件,
<embed type="application/x-shockwave-flash" flashvars="audioUrl=http://d5duwnm1arn0s.cloudfront.net/awp-content_1/24396wp10302/files/T---Billa-Theme-Music.mp3" src="http://www.google.com/reader/ui/3523697345-audio-player.swf" width="600" height="27" quality="best"></embed>
它在某些机器上运行良好。不能在其他机器上工作。问题出在哪里?。
用以下行嵌入:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="27" >
<param name="movie" value="http://www.google.com/reader/ui/3523697345-audio-player.swf" />
<param name="FlashVars" value="audioUrl=http://d5duwnm1arn0s.cloudfront.net/awp-content_1/24396wp10302/files/T---Billa-Theme-Music.mp3">
<param name="quality" value="high" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="http://www.google.com/reader/ui/3523697345-audio-player.swf" width="600" height="27">
<param name="movie" value="http://www.google.com/reader/ui/3523697345-audio-player.swf" />
<param name="FlashVars" value="audioUrl=http://d5duwnm1arn0s.cloudfront.net/awp-content_1/24396wp10302/files/T---Billa-Theme-Music.mp3">
<param name="quality" value="high" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
此代码需要安装Flash插件,因此在没有插件的系统上无法工作。使用<audio>
元素可以在不需要插件的情况下播放声音。作为旧浏览器的后备条目,您可以添加当前代码,如下所示:
<audio controls="controls">
<source src="http://d5duwnm1arn0s.cloudfront.net/awp-content_1/24396wp10302/files/T---Billa-Theme-Music.mp3"
type="audio/mpeg"/>
<embed type="application/x-shockwave-flash"
flashvars="audioUrl=http://d5duwnm1arn0s.cloudfront.net/awp-content_1/24396wp10302/files/T---Billa-Theme-Music.mp3"
src="http://www.google.com/reader/ui/3523697345-audio-player.swf"
width="600" height="27" quality="best">
</embed>
</audio>