任何人都可以告诉我如何做这个自动播放?
$(document).ready(function(){ var myCirclePlayer = new CirclePlayer("#jquery_jplayer_1",{ m4a:"x.mp3",oga: "x.ogg" },{ cssSelectorAncestor: "#cp_container_1" }); });
解决方法
创建播放器后尝试(
documentation here):
$('#jquery_jplayer_1').jPlayer("play");
或者像这样实例化玩家:
$(document).ready(function () { $("#jquery_jplayer_1").jPlayer({ ready: function () { $(this).jPlayer("setMedia",{ m4a:"x.mp3",oga: "x.ogg" }).jPlayer("play"); },swfPath: "/scripts/Jplayer.swf",supplied: "m4a,oga" }); });