Skip to content

Instantly share code, notes, and snippets.

@brentfincham
Created October 6, 2015 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brentfincham/7c5d059827f7bc88f88b to your computer and use it in GitHub Desktop.
Save brentfincham/7c5d059827f7bc88f88b to your computer and use it in GitHub Desktop.
jQuery(function( $ ){
var BV = new $.BigVideo({container: $('.front-page-1'), useFlashForFirefox:false, doLoop: true});
BV.init();
BV.show([
{ type: "video/mp4", src: "path/to/vid/flatbed_background.mp4" },
{ type: "video/webm", src: "path/to/vid/flatbed_background.webm" },
{ type: "video/ogg", src: "path/to/vid/flatbed_background.ogv" }
]);
var BV = new $.BigVideo({container: $('.front-page-3'), useFlashForFirefox:false, doLoop: true});
BV.init();
BV.show([
{ type: "video/mp4", src: "path/to/vid/install_background.mp4" },
{ type: "video/webm", src: "path/to/vid/install_background.webm" },
{ type: "video/ogg", src: "path/to/vid/install_background.ogv" }
]);
// Fade in the video background after the video is fully loaded
BV.getPlayer().on('durationchange',function(){
$('#big-video-wrap').fadeIn();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment