我正在关注这个快速教程:
http://code.coneybeare.net/getting-html5-audio-tag-and-flash-fallback-to
在 Firefox 15 中,OGG 和 MP3 文件都可以播放,我做错了什么?
<!DOCTYPE html>
<html>
<head>
<script src="audio-player.js"></script>
<script>
AudioPlayer.setup("player.swf", {
width: 500,
initialvolume: 100,
transparentpagebg: "yes",
left: "000000",
lefticon: "FFFFFF",
animation: "no",
autostart: "yes",
noinfo: "yes"
});
</script>
</head>
<body>
<audio id="audioplayer" preload controls autoplay="autoplay" loop style="width:424px;">
<source src="emo.mp3">
<source src="emo.ogg">
</audio>
<script type="text/javascript">
var audioTag = document.createElement('audio');
if (!(!!(audioTag.canPlayType) && ("no" != audioTag.canPlayType("audio/mpeg")) && ("" != audioTag.canPlayType("audio/mpeg")))) {
AudioPlayer.embed("audioplayer", {soundFile: "emo.mp3"});
}
</script>
</body>
</html>