overlay (incl. player) doesn't work when combined with scrolling playlist and tooltips
Posted: Nov 2, 2009
My playlist works and so does the tooltips, but there is something wrong with my player and overlay. I suspect that I load the player somehow wrongly when trying to use the overlay. Please see the source code for details, as I cant figure out myself where the actual problem lies... The overlay with the player is supposed to start when you click on an item in the scrolling playlist.
I howe you can help.
http://users.abo.fi/hsandber/testflow/testflow.html
Here is some of the code where the prblem might be:
Cheers,
Henrik
I howe you can help.
http://users.abo.fi/hsandber/testflow/testflow.html
Here is some of the code where the prblem might be:
<div id="videoscroll">
<!-- navigator -->
<div class="navi"></div>
<!-- prev link -->
<a class="prev"></a>
<!-- root element for scrollable -->
<div id="pl">
<!-- root element for the items -->
<div class="clips">
<!-- single playlist entry "template" -->
<a rel="#videooverlay" href="${url}" title="${caption}">
<img width="50px" src="./hipweb/video/${vthumb}"/>
<!--<span>${size}</span>-->
<em>${date}</em>
<!-- -->
<h2>${title}</h2>
</a>
</div>
</div>
<!-- next link -->
<a class="next"></a>
</div>
<!-- the tooltip -->
<div id="videocaption">
</div>
<div id="videooverlay" class="overlay">
<div class="close"></div>
<!-- here is the content for overlay, can be anything -->
<a id="videoplayer" class="player"><img src="./png/play.png" /> </a>
</div>
<script> // script for loading the player into a-tag named player //
$(function() {
// install flowplayers
$("#videoplayer").flowplayer("./flowplayer/flowplayer-3.1.5.swf", {
clip:{
autoPlay: true,
autoBuffering: true
},
// our playlist
playlist: [
{ url: './hipweb/video/video1.flv',
size: '? kb',
vthumb: 'video1.jpg',
title: 'Video 1 title',
date: '28.5.09',
caption: 'Caption for video 1'
},
// more playlist items...
],
// show playlist buttons in controlbar
plugins: {
controls: {
playlist: true
}
}
});
$f().playlist("div.clips");
// setup overlay actions to buttons
$("a[rel]").overlay({
// use the Apple effect for overlay
effect: 'apple',
expose: '#789',
onLoad: function(content) {
this.getOverlay().find("#videoplayer").flowplayer(0).load();
},
onClose: function(content) {
$f().unload();
}
});
// setup scrolling for the playlist elements
$("#pl").scrollable({
items:'div.clips',
size:3,
clickable:true
}).navigator().mousewheel();
});
</script>
<!-- XXXXXXXXXXXXX Tooltip for video caption XXXXXXXXXXXXXX-->
<script>
$(document).ready(function() {
$("a[title]").tooltip('#videocaption');
});
</script>
Cheers,
Henrik