Can anyone tell me how to make this autoplay?
$(document).ready(function(){
var myCirclePlayer = new CirclePlayer("#jquery_jplayer_1",
{
m4a:"x.mp3",
oga: "x.ogg"
}, {
cssSelectorAncestor: "#cp_container_1"
});
});
Try this (documentation here) after you have created your player:
$('#jquery_jplayer_1').jPlayer("play");
Alternatively instantiate the player like this:
$(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"
});
});