1 2jQuery(document).ready(function($){ 3 4 $('.tab_popup a').on('click', function(e){ 5 e.preventDefault(); 6 console.log('click on post'); 7 var button = $(this), data; 8 var show_id_attr = button.attr("data_show_id"); 9 data = { 10 'action': 'change_play_track', 11 'show_id': show_id_attr , 12 }; 13 14 $.ajax({ 15 url : ajaxObj.ajaxurl, // AJAX handler 16 data : data, 17 type : 'POST', 18 beforeSend : function () { 19 $('#playerL').attr('data-live',''); 20 21 }, 22 success : function( response ){ 23 if( response ) { 24 $('html').find('script#liza').remove(); 25 var data = $.parseJSON(response); 26 //console.log(data); 27 var myPlayer; 28 if(!data[0].video) { 29 $('#live-audio-player').css( 'min-height','60vw'); 30 $('.live-audio-player-dimensions.vjs-fluid:not(.vjs-audio-only-mode').css('padding-top', '0'); 31 $('.video-container').addClass('hide_iframe'); 32 }else{ 33 $('#live-audio-player').css( 'min-height','0'); 34 $('.live-audio-player-dimensions.vjs-fluid:not(.vjs-audio-only-mode').css('padding-top', '15%'); 35 $('#playerL').append('<style id="live-video">#live-audio-player{ min-height: 0;}.live-audio-player-dimensions.vjs-fluid:not(.vjs-audio-only-mode){ padding-top: 15%;}</style>'); 36 $('.video-container').removeClass('hide_iframe'); 37 $('#youtubeVideo').attr('src',data[0].video); 38 if(!data[0].url) { 39 $('#live-audio-player button.vjs-play-control').hide(); 40 } 41 } 42 if(data[0].live == 'live') { 43 $('#playerL').attr('data-live','live'); 44 } 45 videojs.getPlayer('live-audio-player').ready(function() { 46 myPlayer = this; 47 myPlayer.pause(); 48 myPlayer.src({ type: 'audio/mp3', src: data[0].url }); 49 myPlayer.poster(""+data[0].img+""); 50 var newTitle =data[0].title.toString().replace('–', '-'); 51 $('.vjs-control-text').text(""+newTitle); 52 myPlayer.play(); 53 if(data[0].live == 'live') { 54 $('#playerL').attr('data-live','live'); 55 myPlayer.titleBar.update({title: 'LIVE'}); 56 }else { 57 myPlayer.titleBar.update({title:''}); 58 59 } 60 myPlayer.on("pause", function(e) { 61 myPlayer.pause(); 62 63 }); 64 65 }); 66 } else { 67 alert('ERROR'); 68 } 69 } 70 }); 71 }); 72 73 $("#_ajaxlLoad").on("click","article", function(e){ 74 e.preventDefault(); 75 var button = $(this), data; 76 var show_id_attr = button.find('a').attr("data_show_id"); 77 data = { 78 'action': 'change_play_track', 79 'show_id': show_id_attr , 80 }; 81 82 $.ajax({ 83 url : ajaxObj.ajaxurl, // AJAX handler 84 data : data, 85 type : 'POST', 86 beforeSend : function () { 87 $('#playerL').attr('data-live',''); 88 89 }, 90 success : function( response ){ 91 if( response ) { 92 $('html').find('script#liza').remove(); 93 var data = $.parseJSON(response); 94 //console.log(data); 95 var myPlayer; 96 if(!data[0].video) { 97 $('#live-audio-player').css( 'min-height','60vw'); 98 $('.live-audio-player-dimensions.vjs-fluid:not(.vjs-audio-only-mode').css('padding-top', '0'); 99 $('.video-container').addClass('hide_iframe'); 100 $('#live-video').remove(); 101 }else{ 102 $('#live-audio-player').css( 'min-height','0'); 103 $('.live-audio-player-dimensions.vjs-fluid:not(.vjs-audio-only-mode').css('padding-top', '15%'); 104 $('.video-container').removeClass('hide_iframe'); 105 $('#youtubeVideo').attr('src',data[0].video); 106 } 107 if(data[0].live == 'live') { 108 $('#playerL').attr('data-live','live'); 109 } 110 videojs.getPlayer('live-audio-player').ready(function() { 111 myPlayer = this; 112 myPlayer.pause(); 113 myPlayer.src({ type: 'audio/mp3', src: data[0].url }); 114 myPlayer.poster(""+data[0].img+""); 115 if(data[0].live == 'live') { 116 $('#playerL').attr('data-live','live'); 117 myPlayer.titleBar.update({title: 'LIVE'}); 118 }else { 119 myPlayer.titleBar.update({title:''}); 120 121 } 122 var newTitle =data[0].title.toString().replace('–', '-'); 123 124 $('.vjs-control-text').text(""+newTitle); 125 myPlayer.play(); 126 myPlayer.on("pause", function(e) { 127 myPlayer.pause(); 128 129 }); 130 131 }); 132 } else { 133 alert('ERROR'); 134 } 135 } 136 }); 137 }); 138 139});
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.