PageSourceSearch

https://lmforums.com/Areas/InfoCentre/Content/js/jquery.backgroundvideo.min.js

js lmforums.com collected 2026-10-08 13:27:36 UTC 3,121 bytes, 49 lines download raw bytes

1// Video Init
2$(document).ready(function(){
3
4    var videobackground_1 = new $.backgroundVideo($('#video-background-1'), {
5        "align": "centerXY",
6        "width": 1280,
7        "height": 720,
8        "path": "video/",
9        "filename": "video",
10        "types": ["mp4", "ogg", "webm"],
11        "autoplay": true,
12        "loop": true
13    });
14    var videobackground_2 = new $.backgroundVideo($('#video-background-2'), {
15        "align": "centerXY",
16        "width": 1280,
17        "height": 720,
18        "path": "video/",
19        "filename": "video-restaurant",
20        "types": ["mp4", "ogg", "webm"],
21        "autoplay": true,
22        "loop": true
23    });
24
25    
26    $(".bg-video-button-muted").click(function(){
27        if ($(this).prev().find("#video_background").prop('muted')) {
28            $(this).prev().find("#video_background").prop('muted', false);
29            $(this).find("i").removeClass("fa-volume-off").addClass("fa-volume-up");
30        }
31        else {
32            $(this).prev().find("#video_background").prop('muted', true);
33            $(this).find("i").removeClass("fa-volume-up").addClass("fa-volume-off");
34        }
35        
36        return false;
37    });
38
39});
40
41/*
42* jQuery Background video plugin for jQuery
43* ---
44* Copyright 2011, Victor Coulon (http://victorcoulon.fr)
45* Released under the MIT, BSD, and GPL Licenses.
46* based on jQuery Plugin Boilerplate 1.3
47*/
48
49(function(t){t.backgroundVideo=function(e,i){var n={videoid:"video_background",autoplay:true,loop:true,preload:true};var s=this;s.settings={};var o=function(){s.settings=t.extend({},n,i);s.el=e;d()};var d=function(){var e="",i="",n="",o="",d=s.settings.preload,g=s.settings.autoplay,a=s.settings.loop;if(d){i='preload="auto"'}else{i=""}if(g){n='autoplay="autoplay"'}else{n=""}if(a){o='loop="true"'}else{o=""}e+='<video id="'+s.settings.videoid+'"'+i+n+o;if(s.settings.poster){e+=' poster="'+s.settings.poster+'" '}e+='muted playsinline style="display:none;position:absolute;top:0;left:0;bottom:0;right:0;z-index:-100;width:100%;height:100%;">';for(var l=0;l<s.settings.types.length;l++){e+='<source src="'+s.settings.path+s.settings.filename+"."+s.settings.types[l]+'" type="video/'+s.settings.types[l]+'" />'}e+="bgvideo</video>";s.el.prepend(e);s.videoEl=document.getElementById(s.settings.videoid);s.$videoEl=t(s.videoEl);s.$videoEl.fadeIn(2e3);r()};var r=function(){var t=g();s.$videoEl.width(t*s.settings.width);s.$videoEl.height(t*s.settings.height);if(typeof s.settings.align!=="undefined"){a()}};var g=function(){var e=t(window).width();var i=t(window).height();var n=e/i;var o=s.settings.width/s.settings.height;var d=i/s.settings.height;if(n>=o){d=e/s.settings.width}return d};var a=function(){var e=(t(window).width()>>1)-(s.$videoEl.width()>>1)|0;var i=(t(window).height()>>1)-(s.$videoEl.height()>>1)|0;if(s.settings.align=="centerXY"){s.$videoEl.css({left:e,top:i});return}if(s.settings.align=="centerX"){s.$videoEl.css("left",e);return}if(s.settings.align=="centerY"){s.$videoEl.css("top",i);return}};o();t(window).resize(function(){r()});s.$videoEl.bind("ended",function(){this.play()})}})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.