1if (typeof (YT) == 'undefined' || typeof (YT.Player) == 'undefined') { 2 var tag = document.createElement('script'); 3 tag.src = "https://www.youtube.com/iframe_api"; 4 var firstScriptTag = document.getElementsByTagName('script')[0]; 5 firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); 6} 7 8var player = player || []; 9function ytLoadVideoPlayer($this) { 10 var frameId = $this.attr('id'); 11 12 player[frameId] = new YT.Player(frameId, { 13 events: { 14 "onStateChange": onPlayerStateChange 15 } 16 }); 17 player[frameId].paused = false; 18 19 function onPlayerStateChange(event) { 20 var target = event.target.getVideoUrl(), 21 fid = event.target.getIframe().id, 22 arr = fid.split('_'), 23 pos = Number(arr[1]) + 1, 24 ad = Number(arr[2]), 25 src = encodeURIComponent(target), 26 type = "FTRVDS"; 27 28 switch (event.data) { 29 case -1: 30 // unstarted 31 //console.log('unstarted') 32 RecordVideoClickStats(type, ad, "VUST", src, pos); 33 break; 34 case 0: 35 // ended 36 //console.log('ended') 37 RecordVideoClickStats(type, ad, "VEND", src, pos); 38 break; 39 case 1: 40 // playing 41 //console.log('playing') 42 RecordVideoClickStats(type, ad, "VPLY", src, pos); 43 player[frameId].paused = false; 44 break; 45 case 2: 46 // paused 47 if (!player[frameId].paused) { 48 //console.log('paused') 49 RecordVideoClickStats(type, ad, "VPSD", src, pos); 50 player[frameId].paused = true; 51 } 52 break; 53 case 3: 54 //buffering 55 //console.log('buffering') 56 RecordVideoClickStats(type, ad, "VBFF", src, pos); 57 break; 58 case 5: 59 //cued 60 //console.log('cued') 61 RecordVideoClickStats(type, ad, "VCUD", src, pos); 62 break; 63 } 64 } 65} 66 67function loadVideo(instance) { 68 var $el = $('#player_' + instance), 69 $img = $('#image_' + instance), 70 src = $el.data('src'); 71 72 $img.hide(); 73 74 $el.attr('src', src).show('fast', function () { 75 ytLoadVideoPlayer($el) 76 }).parent().fitVids(); 77} 78 79$(document).ready(function () { 80 $('.featureVideoSet ul li').each(function () { 81 $this = $(this).find('div.mainVideo'); 82 $this.width($this.width()); 83 }); 84});
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.