Hi Pullo, I can't get this to work. What I would like is this:
- The side start with a Video
- The video fades out
- A image fades in.
- When the image is completely faded in the content fades in
I made two examples. In the first example I'm using your method where the background-image and content are first hidden. After the video is faded out the background image should fade in, and after that one is faded in the content should fade in:
Code:
<script type="text/javascript">
$(document).ready(function(){
$('#wrapper').hide();
$('#background-image').hide();
});
$(function() {
var BV = new $.BigVideo({useFlashForFirefox:false});
BV.init();
BV.show('video/porsche.mp4', {altSource:'video/porsche.ogv'});
BV.getPlayer().addEvent("ended", function(){
$('#wrapper').hide();
$("#big-video-vid_html5_api").fadeOut(1400, function() {
$("#background-image").fadein(1400, function() {
$('#wrapper').fadeIn(1400);
});
});
});
});
As you can see is the video playing but after it is faded out, neither the background image or wrapper are showing?
In this second example I have the background-image fading in like I want it. But here I used a delayed function:
Code:
<script type="text/javascript">
$(document).ready(function(){
$('#background-image').hide().delay(18500).fadeIn(1500);
});
$(function() {
var BV = new $.BigVideo({useFlashForFirefox:false});
BV.init();
BV.show('video/porsche.mp4', {altSource:'video/porsche.ogv'});
BV.getPlayer().addEvent("ended", function(){
$("#big-video-vid_html5_api").fadeOut("slow");
});
});
</script>
At least the image is fading in after the movie is faded out, but I am sure that there must be another more logical way then using the delay function. I hope that you see what I am doing wrong.
Bookmarks