1$(function() { 2 3 var backgroundVideo = $('.background-video'); 4 5 if ($('*').is(backgroundVideo)) { 6 var bv = new Bideo(); 7 bv.init({ 8 // Video element 9 videoEl: document.querySelector('.background-video'), 10 11 // Container element 12 container: document.querySelector('.background-video__wrapper'), 13 14 // Resize 15 resize: true, 16 17 autoplay: true, 18 19 // isMobile: window.matchMedia('(max-width: 768px)').matches, 20 21 playButton: document.querySelector('.play'), 22 pauseButton: document.querySelector('.pause'), 23 24 // Array of objects containing the src and type 25 // of different video formats to add 26 src: [ 27 { 28 src: backgroundVideo.attr('data-mp4'), 29 type: 'video/mp4' 30 }, 31 { 32 src: backgroundVideo.attr('data-webm'), 33 type: 'video/webm;codecs="vp8, vorbis"' 34 } 35 ], 36 37 // What to do once video loads (initial frame) 38 onLoad: function () { 39 document.querySelector('.video-cover').style.display = 'none'; 40 } 41 }); 42 } 43});
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.