jplayer integration

2 posts by 2 authors in: Forums > CMS Builder
Last Post: December 11, 2012   (RSS)

In looking at doing audio files for friend's website, Jplayer looks really good. I first thought I could connect to cmsBuilder and loop through the music files, but Jplayer loads the music files through Javascript:
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){

new jPlayerPlaylist({
jPlayer: "#jquery_jplayer_1",
cssSelectorAncestor: "#jp_container_1"
}, [
{
title:"Cro Magnon Man",
mp3:"http://www.jplayer.org/audio/mp3/TSP-01-Cro_magnon_man.mp3",
oga:"http://www.jplayer.org/audio/ogg/TSP-01-Cro_magnon_man.ogg"
},
{
title:"Your Face",
mp3:"http://www.jplayer.org/audio/mp3/TSP-05-Your_face.mp3",
oga:"http://www.jplayer.org/audio/ogg/TSP-05-Your_face.ogg"
},

], {
swfPath: "../js",
supplied: "oga, mp3",
wmode: "window"
});

$("#jplayer_inspector_1").jPlayerInspector({jPlayer:$("#jquery_jplayer_1")});
});
//]]>
</script>
So now I am stuck as I don't know how to add the php code to loop through the audio records when JPlayer is using Javascript to pull the files in. I don't know enough on the scripting side to figure out how to loop through the php records and give that to the Javascript to make it work.
Any help is appreciated.

thanks