1(function ($) { 2 3 4 5 function resizeVideo(videoElement, animate) { 6 var $videoElement = jQuery(videoElement); 7 8 9 var size = one_page_express_video_background.getVideoRect(); 10 $videoElement.css({ 11 width: Math.round(size.width), 12 "max-width": Math.round(size.width), 13 height: Math.round(size.height), 14 "opacity": 1, 15 "left": size.left 16 }); 17 18 if (animate === false) { 19 return; 20 } 21 22 23 } 24 25 window.addEventListener('resize', function () { 26 var videoElement = document.querySelector('video#wp-custom-header-video') || document.querySelector('iframe#wp-custom-header-video'); 27 if (videoElement) { 28 resizeVideo(videoElement); 29 one_page_express_video_background.resizePoster() 30 } 31 }); 32 33 34 35 jQuery(function () { 36 var videoElement = document.querySelector('video#wp-custom-header-video') || document.querySelector('iframe#wp-custom-header-video'); 37 if (videoElement) { 38 resizeVideo(videoElement, false); 39 } 40 }); 41 42 __cpVideoElementFirstPlayed = false; 43 44 document.addEventListener('wp-custom-header-video-loaded', function () { 45 var videoElement = document.querySelector('video#wp-custom-header-video'); 46 47 if (videoElement) { 48 resizeVideo(videoElement); 49 return; 50 } 51 52 document.querySelector('#wp-custom-header').addEventListener('play', function () { 53 var iframeVideo = document.querySelector('iframe#wp-custom-header-video'); 54 var videoElement = document.querySelector('video#wp-custom-header-video') || iframeVideo; 55 56 if (videoElement && !__cpVideoElementFirstPlayed) { 57 __cpVideoElementFirstPlayed = true; 58 resizeVideo(videoElement); 59 } 60 61 }); 62 63 }); 64 65 66})(jQuery); 67
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.