Hello,
I just started using JPlayer for an application I am building. I have the single player working fine, very happy with that.
I do however have an issue with the playlist version. I generate the JS code dynamically on the page but for some reason when I don't include 'oga' in the 'supplied' the playlist does not load.
For example this is my generated code:
<div id="jquery_jplayer_3" class="jp-jplayer"></div>
<div id="jp_container_3" class="jp-audio">
<h3>Listen to Foo Release by BAR</h3>
<div class="jp-type-playlist">
<div class="jp-gui jp-interface">
<ul class="jp-controls">
<li><a href="javascript:;" class="jp-previous" tabindex="1">previous</a></li>
<li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li>
<li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li>
<li><a href="javascript:;" class="jp-next" tabindex="1">next</a></li>
<li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li>
<li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li>
<li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li>
<li><a href="javascript:;" class="jp-volume-max" tabindex="1" title="max volume">max volume</a></li>
</ul>
<div class="jp-progress">
<div class="jp-seek-bar">
<div class="jp-play-bar"></div>
</div>
</div>
<div class="jp-volume-bar">
<div class="jp-volume-bar-value"></div>
</div>
<div class="jp-time-holder">
<div class="jp-current-time"></div>
<div class="jp-duration"></div>
</div>
<ul class="jp-toggles">
<li><a href="javascript:;" class="jp-shuffle" tabindex="1" title="shuffle">shuffle</a></li>
<li><a href="javascript:;" class="jp-shuffle-off" tabindex="1" title="shuffle off">shuffle off</a></li>
<li><a href="javascript:;" class="jp-repeat" tabindex="1" title="repeat">repeat</a></li>
<li><a href="javascript:;" class="jp-repeat-off" tabindex="1" title="repeat off">repeat off</a></li>
</ul>
</div>
<div class="jp-playlist">
<ul>
<li></li>
</ul>
</div>
<div class="jp-no-solution">
<span>Update Required</span>
To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
</div>
</div>
</div>
<script type="text/javascript">
jQuery(document).ready(function($){
new jPlayerPlaylist(
{
jPlayer: "#jquery_jplayer_3",
cssSelectorAncestor: "#jp_container_3"
},
[
{
title:"Foo's Wonderful Music",
artist:"BAR",
mp3:"/audio/Foos-Wonderful-Music.mp3"
},
{
title:"Foo's Excellent Track",
artist:"BAR",
mp3:"/audio/Foos-Excellent-Track.mp3"
},
]
{
swfPath: "/js/jplayer",
supplied: "mp3"
}
);
});
</script>
The important part has been highlighted in bold. If I have 'supplied: "mp3"', or indeed if I do not have this parameter at all (given that the default is just "mp3"), the playlist does not display at all and the tracks do not play. Weird. If I add in "oga, mp3", the playlist displays but won't play. If I have just "oga" again the playlist displays but does not play.
I am using the new version of jPlayer (2.1.0) and I grabbed the jplayer.playlist.min.js file from the add-on directory in the zip file.
This problem seems to be in Firefox 3.6 but it all works fine in Chrome and IE7. The media plays if accessed directly via the URL.
Can anyone point me in the right direction for trying to solve this issue? This will be a great feature for my application and as such I am at a dead-end temporarily until I can get this issue resolved.
Thanks in advance
Owen
P.s. I hope posting the code doesn't get garbled so I posted it to pastebin incase:
http://pastebin.com/4yF3ZFkz