PageSourceSearch

https://www.radiofmlatina.com/wp-content/plugins/qtmplayer/assets/…r%20tested%20up%20to%5D&ver%5B0%5D=PR.3.7.2

js radiofmlatina.com collected 2026-10-02 15:37:09 UTC 25,888 bytes, 879 lines download raw bytes

1/**
2* 
3* @package qtmplayer
4* @subpackage  qtmplayer-radiofeed
5* 
6*/
7
8(function($) {
9	"use strict";
10	function isXML(xml){
11	    try {
12	        xmlDoc = $.parseXML(xml); //is valid XML
13	        return true;
14	    } catch (err) {
15	        // was not XML
16	        return false;
17	    }
18	}
19
20
21	$.qtmplayerRadioFeedObj = {
22		body: $("body"),
23		window: $(window),
24		document: $(document),
25		htmlAndbody: $('html,body'),
26		qtFeedData: {},
27		timeInterval: 15000,
28		/**
29		 * ======================================================================================================================================== |
30		 * 																																			|
31		 * 																																			|
32		 * START SITE FUNCTIONS 																													|
33		 * 																																			|
34		 *																																			|
35		 * ======================================================================================================================================== |
36		 */
37		fn: {
38			cachedThumbsArray: [], // when this changes, we fetch a new cover
39			
40		
41
42
43			// ----------------------------------------------- FEED READERS END ------------------------------------
44			getThumbnail: function(that, termArray, callBack){
45				var preclean = termArray.split('<!--');
46				if(preclean.length > 1){
47					termArray = preclean[0]; 
48				}
49
50
51				termArray =  termArray.split(' - ').join('-').split(' ').join('+');
52				var thumb; // image from itunes
53				var apiUrl = 'https://itunes.apple.com/search?term='+termArray;
54				if( undefined === that.cachedThumbsArray[termArray] ) {
55					$.ajax({
56						type: 'GET',
57						cache: true,
58						url: apiUrl,
59						async: true,
60						dataType: 'jsonp',
61						context: this,
62						success: function(json) {
63							if('object' !== typeof( json )){
64								json = JSON.parse(json);
65							}
66							if(json.resultCount > 0){
67								thumb = json.results[0].artworkUrl100.split('100x100bb.jpg').join('1000x1000bb.jpg');
68								that.cachedThumbsArray[termArray] = thumb;
69								callBack(thumb);
70								return;
71							}
72						}
73					});
74				} else {
75					// return cached image
76					callBack( that.cachedThumbsArray[termArray] );
77					return;
78				}
79			},
80
81
82
83			/**====================================================================
84			 *
85			 * 
86			 *  Marquee for longer texts
87			 *  
88			 * 
89			 ====================================================================*/
90			marqueeInstances: [],
91			marqueeText: function(that) {
92				if('function' !== typeof( $.fn.marquee ) ){ // missing marquee library? quit
93					return;
94				}
95				var marquees = $('body').find('.proradio-marquee');
96				// Destroy any old instance of the marquee
97				if( that.marqueeInstances.length > 0 ){
98					for( var mi = 0; mi < that.marqueeInstances.length; mi++ ){
99						if( 'undefined' !== typeof( that.marqueeInstances[mi] )){
100							that.marqueeInstances[mi].marquee('destroy');
101						}
102					}
103					that.marqueeInstances = []; // reset
104				}
105				$.each(marquees, function(i,c){
106					var item = $(c);
107					if(item.find('.marquee').length === 0){
108						item.html('<span class="marquee">'+item.html()+'</span>');
109					}
110					if(  item.outerWidth() >  item.find('.marquee').outerWidth() ){ // the title is short? quit!
111						return;
112					}
113					that.marqueeInstances[i] = item.marquee({
114						duration: 12000,
115						gap: item.outerWidth(),
116						delayBeforeStart: 1000,
117						direction: 'left',
118						duplicated: false,
119						pauseOnCycle: 5000,
120						startVisible: true
121					});
122				});
123			},
124
125			qtApplyTitle: function(result, callBack){
126				var that = this;
127				if(result && result !== ''){
128
129					// result = decodeURIComponent(escape(result));
130					var feedsplit = result.split(" - ");
131					var artist;
132					var title;
133					if(feedsplit.length > 1){
134						artist = feedsplit[0],
135						title = feedsplit[1];
136					} else {
137						feedsplit = result.split("-");
138						if(feedsplit.length > 1){
139							artist = feedsplit[0],
140							title = feedsplit[1];
141						} else {
142							artist = "";
143							title = result;
144						}
145						
146					}
147					var artistSplit = artist.split('[');
148					if( artistSplit.length > 1 ){
149						artist = artistSplit[0];
150					}
151					var titleSplit = title.split('[');
152					if( titleSplit.length > 1 ){
153						title = titleSplit[0];
154					}
155					title = $.trim(title);
156					artist = $.trim(artist);
157					$(".qtmplayer-feed").show();
158					$('.qtmplayer__title').html(title);
159					$('.qtmplayer__artist').html(artist);
160					that.marqueeText( that );
161					var termArray = artist+'-'+title;
162					if( callBack ){
163						this.getThumbnail(that, termArray, callBack );
164					}
165				} else {
166					$(".qtmplayer-feed").hide();
167				}
168				return;
169			},
170			newFeedReading: function(){
171
172
173				// debug: fix title not changing after pause
174				
175				$.qtmplayerRadioFeedObj.fn.log('newFeedReading = REITERATE - '+$.now());
176
177				var o 	= $.qtmplayerRadioFeedObj,
178					fd = o.qtFeedData,
179					callBack = fd.callBack,
180					fn 	= o.fn,
181					qtradiofeedHost		=  (undefined !== fd.host) ? fd.host : '',
182					qtradiofeedPort 	=  (undefined !== fd.port) ? fd.port : '',
183					qtradiofeedProtocol =  (undefined !== fd.protocol) ? fd.protocol : 'http',
184					theChannel 			=  (undefined !== fd.channel) ? fd.channel : '',
185					qticecasturl 		=  (undefined !== fd.icecasturl) ? fd.icecasturl : '',
186					qticecastmountpoint	=  (undefined !== fd.icecastmountpoint) ? fd.icecastmountpoint : '',
187					qticecastchannel	=  (undefined !== fd.icecastchannel) ? fd.icecastchannel : '',
188					qtradiodotco		=  (undefined !== fd.radiodotco) ? fd.radiodotco : '',
189					qtairtime			=  (undefined !== fd.airtime) ? fd.airtime : '',
190					qtradionomy 		=  (undefined !== fd.radionomy) ? fd.radionomy : '',
191					qttextfeed 			=  (undefined !== fd.textfeed) ? fd.textfeed : '',
192					qtUseProxy 			=  (undefined !== fd.useproxy) ? fd.useproxy : '',
193					qtlive365 			=  (undefined !== fd.live365) ? fd.live365 : '',
194					qtradioking 		=  (undefined !== fd.radioking) ? fd.radioking : '',
195					qtazuracast 		=  (undefined !== fd.azuracast) ? fd.azuracast : '',
196					qtsecuresystems 	=  (undefined !== fd.securesystems) ? fd.securesystems : '',
197					qtradiojar 			=  (undefined !== fd.radiojar) ? fd.radiojar : '',
198					qtradioboss			=  (undefined !== fd.radioboss) ? fd.radioboss : '',
199					qtmaxcast			=  (undefined !== fd.maxcast) ? fd.maxcast : '',
200					qtFeedPlayerTrack = $('#qtFeedPlayerTrack'),
201					qtFeedPlayerAuthor = $('#qtFeedPlayerAuthor'),
202					qtPlayerTrackInfo = $("#qtPlayerTrackInfo"),
203					author, title, result, feedsplit;
204					o = $.qtmplayerRadioFeedObj;
205					var proxyURL = $("#qtmplayer-radiofeed-proxyurl").data('proxyurl');
206					var timestamp = new Date().getUTCMilliseconds();
207
208
209					/**
210					 * ===================================================================
211					 *
212					 *	laut.FM
213					 *
214					 * ===================================================================
215					 */
216					if( fd.servertype == 'type-lautfm' ){
217						fn.log('Server type: LAUT.FM');
218						fn.log('Stream URL: '+fd.file);
219						if( fd.file.indexOf('/stream.laut.fm/')  != -1 ){
220							fn.log('Laut.FM reading titles');
221							var radioname =  fd.file.split('http://stream.laut.fm/').join('');
222							var radiourl = 'https://api.laut.fm/station/'+radioname+'/current_song';
223							if ( radiourl.indexOf("?") > -1 ) {
224								radiourl = radiourl + '&rand='+timestamp;
225							} else {
226								radiourl = radiourl + '?rand='+timestamp;
227							}
228							if(qtUseProxy){
229								radiourl =  proxyURL+'?qtproxycall='+window.btoa(radiourl);
230							}
231							// console.log(radiourl);
232
233							$.ajax({
234							   	type: 'GET',
235								url: radiourl,
236								async: true,
237								cache: false,
238								success: function(data) {
239									fn.log('Laut.FM Success');
240									if('object' !== typeof( data )){
241										data = JSON.parse(data);
242									}
243									var titles = 'Now live - Streaming';
244									if(data.title){
245										titles = data.title;
246										if(data.artist){
247											if(data.artist.name){
248												titles = data.artist.name +' - '+ titles;
249											}
250										}
251									}
252									fn.qtApplyTitle( titles, callBack );
253								},
254								error: function(e){
255									fn.log(e);
256									console.log(e);
257									fn.qtApplyTitle('Laut FM API error - Titles not available');
258								}
259							});
260						} 
261					} // IF servertype end
262
263
264					/**
265					 * ===================================================================
266					 *
267					 *	Auto or HTTPS shoutcast
268					 *
269					 * ===================================================================
270					 */
271					if( fd.servertype == 'type-auto' ){
272						if(fd.file.indexOf('/proxy/') != -1 && fd.file.indexOf('https') != -1 && fd.file.indexOf('?mp=/') != -1){
273							qtradiofeedHost = fd.file.split('?mp=/');
274							qtradiofeedHost = qtradiofeedHost[0] + '?mp=/stats' + '&rand='+timestamp;
275							if(qtUseProxy){
276								qtradiofeedHost =  proxyURL+'?qtproxycall='+window.btoa(qtradiofeedHost);
277							}
278							$.ajax({
279							   	type: 'GET',
280								url: qtradiofeedHost,
281								async: true,
282								cache: false,
283								dataType: "xml",
284								success: function(data) {
285									fn.qtApplyTitle( $(data).find('SONGTITLE').html() , callBack);
286								},
287								error: function(e){
288									fn.log(e);
289									console.log(e);
290								}
291							});
292						} else {
293							$.ajax({
294							   	type: 'GET',
295								url: proxyURL,
296							    jsonpCallback: 'parseMusic',
297								async: true,
298								cache: false,
299								data: { "qtproxycall": window.btoa(fd.file), 'icymetadata': '1'  },
300								success: function(data) {
301									fn.qtApplyTitle( data, callBack );
302								}
303							});
304						}
305						return;
306					}
307
308					/**
309					 * Maxcast
310					 */
311					/**
312					 * ===================================================================
313					 *
314					 *	Maxcast
315					 *
316					 * ===================================================================
317					 */
318					// Demo feeds:
319					//https://s05.maxcast.com.br/api/status/brasitaliawebradio/current.json
320					//https://s16.maxcast.com.br/api/status/bocadoacreatualjt/current.json
321					if( fd.servertype == 'type-maxcast' ){
322						fn.log('Maxcast '+ qtmaxcast);
323						qtmaxcast = qtmaxcast + '?rand='+timestamp;
324						if(qtUseProxy){
325						 	qtmaxcast =  proxyURL+'?qtproxycall='+window.btoa(qtmaxcast); // working without proxy. Leave here just in case
326						}
327						$.ajax({
328							type: 'GET',
329							cache: false,
330							url: qtmaxcast,
331							async: true,
332							jsonpCallback: "parseMusic",
333							jsonp: false,
334							data: songdata,
335							success: function(data) {
336								if('object' !== typeof(data)){
337									data = JSON.parse(data);
338								}
339								if(data.playing){
340									title = data.playing.current;
341								}
342								if(data.song_data && 'function' === typeof(callBack)){
343									callBack( data.song_data.cover );
344									callBack = false;
345								}
346								fn.qtApplyTitle(title, callBack);
347							},
348							error: function(e){
349								console.log(e);
350							}
351						});
352						return;
353					}
354
355					if(qtradioboss === '' && qtsecuresystems === '' && qtradiojar === '' && qtradioking === '' && qtazuracast === '' && qttextfeed === '' && qtradionomy === '' && qtlive365 === '' && qtairtime === '' && (qtradiofeedHost === '' || qtradiofeedPort === '' || typeof(qtradiofeedHost) === 'undefined') && qticecasturl === '' && qtradiodotco === '') {
356						fn.qtApplyTitle();
357						return;
358					} else {
359						/**
360						 * ===================================================================
361						 *
362						 *	Radioboss
363						 *
364						 * ===================================================================
365						 */
366						if( qtradioboss !== ''){
367							qtradioboss = qtradioboss + '?rand='+timestamp;
368							// RadioBoss requires always the proxy
369							qtradioboss =  proxyURL+'?qtproxycall='+window.btoa(qtradioboss);
370							$.ajax({
371								type: 'GET',
372								cache: false,
373								url: qtradioboss,
374								async: true,
375								contentType: "application/json",
376								success: function(data) {
377									data = JSON.parse(data);
378									title = data['nowplaying'];
379									fn.qtApplyTitle(title, callBack);
380								},
381							});
382						}
383
384
385						/**
386						 * ===================================================================
387						 *
388						 *	Radiojar
389						 *
390						 * ===================================================================
391						 */
392						if( qtradiojar !== ''){
393							
394							if ( qtradiojar.indexOf("?") > -1 ) {
395								qtradiojar = qtradiojar + '&rand='+timestamp;
396							} else {
397								qtradiojar = qtradiojar + '?rand='+timestamp;
398							}
399
400
401							if(qtUseProxy){
402								qtradiojar =  proxyURL+'?qtproxycall='+window.btoa(qtradiojar);
403							}
404
405
406							$.ajax({
407								type: 'GET',
408								cache: false,
409								url: qtradiojar,
410								async: true,
411								contentType: "application/json",
412								success: function(data) {
413									if('object' !== typeof( data )){
414										data = JSON.parse(data);
415									}
416									title = data.artist+' - '+data.title;
417									if(data.thumb && 'function' === typeof(callBack)){
418										callBack(data.thumb+'#.jpg');
419										callBack = false;
420									}
421									fn.qtApplyTitle(title, callBack);
422								},
423								error: function(e){
424									console.log(e);
425								}
426							});
427						}
428
429
430
431
432						/**
433						 * ===================================================================
434						 *
435						 *	SecureSystems
436						 *
437						 * ===================================================================
438						 */
439						if( qtsecuresystems !== ''){
440							qtsecuresystems =qtsecuresystems;
441							if(qtUseProxy){
442								qtsecuresystems =  proxyURL+'?qtproxycall='+window.btoa(qtsecuresystems);
443							}
444							$.ajax({
445								type: 'GET',
446								cache: false,
447								url: qtsecuresystems,
448								async: true,
449								dataType: "xml",
450								success: function(data) {
451									if($(data).find('cover').html() !== ''  && 'function' === typeof(callBack)){
452										callBack($(data).find('cover').html());
453										callBack = false;
454									}
455									fn.qtApplyTitle( $(data).find('artist').html()+ ' - ' + $(data).find('title').html() , callBack);
456								},
457								error: function(e){
458									console.log(e);
459								}
460							});
461						}
462
463
464
465
466
467						/**
468						 * ===================================================================
469						 *
470						 *	qtlive365
471						 *
472						 * ===================================================================
473						 */
474						if( qtlive365 !== ''){
475							qtlive365 = 'https://api.live365.com/station/'+qtlive365;
476							if(qtUseProxy){
477								qtlive365 =  proxyURL+'?qtproxycall='+window.btoa(qtlive365);
478							}
479
480							$.ajax({
481								type: 'GET',
482								cache: false,
483								url: qtlive365,
484								async: true,
485								jsonpCallback: "parseMusic",
486								jsonp: false,
487								success: function(data) {
488									// console.log(data);
489									jsondata = data;
490									// console.log(json);
491									if('object' !== typeof( data )){
492										data = JSON.parse(data);
493									}
494									if( data['current-track'].art ){
495										var art = data['current-track'].art;
496										if( art != ''){
497											callBack(art);
498											// console.log(art);
499											callBack = false;
500										}
501									}
502									fn.qtApplyTitle(data['current-track'].artist+' - '+data['current-track'].title, callBack);									
503								},
504								error: function(e){
505									console.log(e);
506								}
507							});
508						}
509
510						/**
511						 * ===================================================================
512						 *
513						 *	Text
514						 *
515						 * ===================================================================
516						 */
517						else if(qttextfeed !== ''){
518							var tfeedurl,jsondata, title, proxyURL, mydata;
519							if(qtUseProxy){
520								tfeedurl = $("#qtmplayer-radiofeed-proxyurl").data('proxyurl');
521								mydata = { 
522							        "qtproxycall": window.btoa(qttextfeed),
523							    };
524							} else {
525								tfeedurl = qttextfeed;
526							}
527							$.ajax({
528							   	type: 'GET',
529								cache: false,
530								url: tfeedurl,
531								async: true,
532								data: mydata,
533								dataType: "html",
534								success: function(data) {
535									fn.qtApplyTitle( data, callBack );
536								},
537								error: function(e){
538									console.log(e);
539								}
540							});
541						} 
542						/**
543						 * ===================================================================
544						 *
545						 *	Radionomy
546						 *
547						 * ===================================================================
548						 */
549						else if(qtradionomy !== '' ) {
550							$.ajax({
551							   	type: 'GET',
552								url: qtradionomy,
553								async: true,
554								cache: false,
555								dataType: "xml",
556								success: function(data) {
557									fn.qtApplyTitle( $(data).find('artists').html()+ ' - ' + $(data).find('title').html() );
558								},
559								error: function(e){
560									console.log(e);
561								}
562							});
563						} 
564
565						/**
566						 * ===================================================================
567						 *
568						 *	AirTime
569						 *
570						 * ===================================================================
571						 */
572						else if(qtairtime !== '' && qtairtime !== 'undefined' && qtairtime !== undefined && typeof(qtairtime) !== 'undefined'){
573							var jsondata, title;
574							$.ajax({
575								type: 'GET',
576								cache: false,
577								url: proxyURL,
578								async: true,
579								data: {
580							        "qtproxycall": window.btoa(qtairtime),
581							    },
582								contentType: "application/json",
583								success: function(data) {
584									jsondata = JSON.parse(data);
585									title = jsondata.tracks.current.name;
586									fn.qtApplyTitle(title);
587								},
588								error: function(e) {
589								}
590							});
591						}
592
593						/**
594						 * ===================================================================
595						 *
596						 *	Icecast
597						 *
598						 * ===================================================================
599						 */
600						else if(qticecasturl !== '' && typeof(qticecasturl) !== 'undefined') {
601							var feedurl = qticecasturl;
602							var source;
603							var title;
604							var songdata;
605							if(qtUseProxy){
606								feedurl = proxyURL;
607								songdata = {
608							        "qtproxycall":  window.btoa(qticecasturl),
609							    };
610							}
611							// beta
612							fn.log('Radio feed - Icecast '+ qticecasturl);
613							// generally ok, not working for LN Soulr Icecast
614							// console.log( proxyURL+'?qtproxycall='+window.btoa(qticecasturl) );
615							$.ajax({
616								type: 'GET',
617								cache: false,
618								url: feedurl,
619								async: true,
620								jsonpCallback: "parseMusic",
621								jsonp: false,//jsonp: true,
622								// dataType: 'jsonp', // not working with some radios
623								data: songdata,
624								 // contentType: "application/json",
625								success: function(json) {
626									fn.log('Ajax response');
627									fn.log( json );
628
629									// console.log(json);
630									if('object' !== typeof( json )){
631										json = JSON.parse(json);
632									}
633									source = json.icestats.source;
634									if('undefined' === typeof(source)){ 
635										return; 
636									}
637									if(qticecastmountpoint){
638										source = source[qticecastmountpoint];
639									}
640									if(qticecastchannel){
641										// console.log("set source to 0");
642										source = source[qticecastchannel];
643									}
644									// since PR.3.2.3
645									// If there is no channel and there is no title, channel must be 0
646									if(!qticecastchannel && 'undefined' === typeof(source.title)){
647										source = source[0];
648									}
649									title = source.title;
650
651									if( source.artist ){
652										title = title +' - '+source.artist;
653									}
654									fn.qtApplyTitle(title, callBack);
655								},error: function(e) {
656									console.log(e);
657									fn.log('Ajax response');
658									fn.log( e );
659								}
660							});
661
662
663							
664
665						} 
666						/**
667						 * ===================================================================
668						 *
669						 *	ShoutCast
670						 *
671						 * ===================================================================
672						 */
673						else if (qtradiofeedHost !== '' && qtradiofeedPort !== '' && typeof(qtradiofeedHost) !== 'undefined'){
674							// to tide up
675							var feedData = {
676								shoutcast_host: qtradiofeedHost,
677								shoutcast_port: qtradiofeedPort,
678								shoutcast_protocol: qtradiofeedProtocol,
679								shoutcast_channel: theChannel
680							};
681							var channel = feedData.shoutcast_channel || 1;
682							var protocol = 'http';
683							if(feedData.shoutcast_port === '443' || feedData.shoutcast_protocol === 'https' ){
684								protocol 	= 'https';
685							}
686							var shoutcastUrl = protocol+'://'+feedData.shoutcast_host+':'+feedData.shoutcast_port+'/stats?sid='+channel+'&json=1';
687							var feedurl 	= shoutcastUrl;
688							
689							if(qtUseProxy){
690								feedurl = proxyURL;
691								songdata = {
692							        "qtproxycall":  window.btoa(shoutcastUrl),
693							    };
694							}
695
696							/**
697							 * @since PR.3.4.6 2021 02 27 added fallback
698							 */
699							try{
700								$.ajax({
701									type: 'GET',
702									cache: false,
703									url: feedurl,
704									async: true,
705									data: songdata,
706									dataType:  $.qtmplayerRadioFeedObj.qtFeedData.dataType,
707									contentType: "application/json",
708									success: function(json) {
709										if('object' !== typeof( json )){
710											json = JSON.parse(json);
711										}
712										fn.qtApplyTitle( json.songtitle, callBack);
713									},error: function(e) {
714										if($.qtmplayerRadioFeedObj.qtFeedData.dataType !== 'jsonp'){
715											$.qtmplayerRadioFeedObj.qtFeedData.dataType = 'jsonp';
716											$.qtmplayerRadioFeedObj.fn.newFeedReading(); 
717										}
718									}
719								});
720							} catch(e){
721								dataType = 'jsonp';
722								console.log(e);
723							}
724						
725							return;
726						} 
727						/**
728						 * ===================================================================
729						 *
730						 *	Radio.co
731						 *
732						 * ===================================================================
733						 */
734						else if (qtradiodotco !== '' && typeof(qtradiodotco) !== 'undefined'){
735							var rUrl = 'https://public.radio.co/stations/'+qtradiodotco+'/status'
736							$.ajax({
737								type: 'GET',
738								cache: false,
739								url: rUrl,
740								async: true,
741								contentType: "application/json",
742								success: function(data) {
743									title = data['current_track']['title'];
744									fn.qtApplyTitle(title, callBack);
745								},
746								error: function(e) {
747								}
748							});
749						}
750						/**
751						 * ===================================================================
752						 *
753						 *	Radioking
754						 *
755						 * ===================================================================
756						 */
757						else if (fd.servertype == 'type-radioking' && qtradioking !== '' ){
758							var rUrl = 'https://api.radioking.io/widget/radio/'+qtradioking+'/track/current';
759							$.ajax({
760								type: 'GET',
761								cache: false,
762								url: rUrl,
763								async: true,
764								contentType: "application/json",
765								success: function(data) {
766									title = data.artist+' - '+data.title;
767									
768									if(data.cover && 'function' === typeof(callBack)){
769										callBack(data.cover);
770										callBack = false;
771									}
772									fn.qtApplyTitle(title, callBack);
773								},
774								error: function(e) {
775									console.log(e);
776								}
777							});
778						}
779						/**
780						 * ===================================================================
781						 *
782						 *	Azuracast
783						 *
784						 * ===================================================================
785						 */
786						else if (fd.servertype == 'type-azuracast' && qtazuracast !== '' ){
787							var rUrl = '';
788
789							qtazuracast = qtazuracast + '?rand='+timestamp;
790
791							$.ajax({
792								type: 'GET',
793								cache: false,
794								url: qtazuracast,
795								async: true,
796								contentType: "application/json",
797								success: function(data) {
798									if( 'undefined' === typeof( data.now_playing ) ){
799										data = data[0];
800									}
801									author = data.now_playing.song.artist;
802									title = data.now_playing.song.title;
803									if('' !== author){
804										title = author+' - '+title;
805									}
806									if(data.now_playing.song.cover && 'function' === typeof(callBack)){
807										callBack(data.now_playing.song.cover);
808										callBack = false;
809									}
810									if(data.now_playing.song.art && 'function' === typeof(callBack)){
811										// console.log(data.now_playing.song.art);
812										callBack(data.now_playing.song.art);
813										callBack = false;
814									}
815
816									if(data.cover && 'function' === typeof(callBack)){
817										callBack(data.cover);
818										callBack = false;
819									}
820									if(data.art && 'function' === typeof(callBack)){
821										callBack(data.art);
822										callBack = false;
823									}
824									fn.qtApplyTitle(title, callBack);
825								},
826								error: function(e) {
827									console.log(e);
828
829								}
830							});
831						}
832					}
833				return;
834			},
835			feedInterval: null,
836			stopFeed: function(){
837				var o = $.qtmplayerRadioFeedObj;
838				if("undefined" !== typeof($.qtmplayerRadioFeedObj.fn.qtFeedInterval) ){
839					clearInterval($.qtmplayerRadioFeedObj.fn.qtFeedInterval);
840				}
841			},
842			pushFeed: function( data ){
843
844				
845				var o = $.qtmplayerRadioFeedObj;
846				o.qtFeedData = data;
847
848				o.fn.log('pushFeed = INITIALIZE'+$.now());
849				o.fn.log(data);
850
851
852				o.fn.stopFeed();
853				o.fn.newFeedReading();
854				$.qtmplayerRadioFeedObj.qtFeedData.dataType = '';
855				$.qtmplayerRadioFeedObj.fn.qtFeedInterval = setInterval(
856					function(){ 
857						o.fn.newFeedReading(); 
858					}, 
859					$.qtmplayerRadioFeedObj.timeInterval
860				);
861			},
862			log:function(msg){
863				var c = $("#qtmPlayerDebugger");
864				if(c.length > 0){
865					c.append(msg+'<br>');
866				}
867			}
868		}
869
870	};
871	$(document).ready(function(){
872		$.qtmplayerRadioFeedObj.fn.qtApplyTitle();
873	});
874})(jQuery);
875
876
877
878
879

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.