Hi,
I am trying to integrate the Flowplayer video player (http://flowplayer.org) into a page template. The video player is initiated using a jQuery function:
<script>
// wait for the DOM to load using jQuery
$(function() {
// setup player normally
$f("player1", "flowplayer-3.2.5.swf", {
// clip properties common to all playlist entries
clip: {
baseUrl: '',
subTitle: '',
time: ''
},
// show playlist buttons in controlbar
plugins: {
controls: {
playlist: true
}
}
});
$f("player1").playlist("div.clips:first", {loop:true});
});
</script>
If I put this code into my template, I get an error when I try to run ?flush=1:
Parse error: syntax error, unexpected T_STRING, expecting ')' in <path to temp file>
I have tracked the error down to this line:
$f("player1").playlist("div.clips:first", {loop:true});
However I cannot get the player to initiate. I have hard-coded a link to the jQuery library in the head section of my template. I have also tried surrounding the code with
(function($) {
//code as before
})(jQuery);
I'm not 100% on jQuery and am completely new to SilverStripe so can somebody tell me what I need to do to get this working please?
Thanks,
Iain