我试图找出jPlayer的工作原理。我按照所有说明操作,但我的M4A文件无法播放。
这是我的代码。
<link type="text/css" href="/skin/circle.skin/circle.player.css" rel="stylesheet" />
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.transform2d.js"></script>
<script type="text/javascript" src="js/jquery.grab.js"></script>
<script type="text/javascript" src="js/jquery.jplayer.js"></script>
<script type="text/javascript" src="js/mod.csstransforms.min.js"></script>
<script type="text/javascript" src="js/circle.player.js"></script>
<script src="js/flac.js"></script>
<script src="js/ogg.js"></script>
<script src="js/vorbis.js"></script>
<script src="js/opus.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var myOtherOne = new CirclePlayer("#jquery_jplayer_2",
{
m4a:"http://www.rcsoundbox.com/real_teaser.m4a",
m4a:"http://www.rcsoundbox.com/real_teaser.m4a"
}, {
cssSelectorAncestor: "#cp_container_2"
});
});
</script>
答案 0 :(得分:0)
.....打开.m4a文件:http://www.rcsoundbox.com/real_teaser.m4a
现在打开此.m4a文件:http://www.jplayer.org/audio/m4a/Miaow-04-Lismore.m4a
(注意有什么不同吗?我在FF v.34中做过)
长答案:使用格式正确的文件,并正确使用jPlayer:
<强> jsFiddle demo 强>
<div id="jquery_jplayer_2"></div>
<div id="cp_container_2" class="cp-container">
<div class="cp-buffer-holder">
<div class="cp-buffer-1"></div>
<div class="cp-buffer-2"></div>
</div>
<div class="cp-progress-holder">
<div class="cp-progress-1"></div>
<div class="cp-progress-2"></div>
</div>
<div class="cp-circle-control"></div>
<ul class="cp-controls">
<li><a class="cp-play" tabindex="1">play</a></li>
<li><a class="cp-pause" style="display:none;" tabindex="1">pause</a></li>
</ul>
</div>
$(function() {
var myOtherOne = new CirclePlayer("#jquery_jplayer_2",{
m4a:"http://www.jplayer.org/audio/m4a/Miaow-04-Lismore.m4a",
oga:"http://www.jplayer.org/audio/ogg/Miaow-04-Lismore.ogg"
}, {
cssSelectorAncestor: "#cp_container_2"
});
});