Page 1 of 3

create more than radio stream in the same page

Posted: Fri Jun 06, 2014 5:49 am
by rabeeh

hello
i create radio stream app that play more than one radio.
when we click in the title of the radio or the logo the audio panel will stop the radio stream and play the next one
i put in the java script this code for one radio station

var player = Tiggzi('mobileaudio_62').eq(0);
player.empty().append('');
player.empty().append('');
player.empty().append('');
player[0].play();
showSpinner();
player.on('canplay', function () {
hideSpinner();
});

and every radio have the same code but with changing the src of the radio.

its not work all the time and i git error load page and some times i need to click twice to play the radio

need your help
Image


create more than radio stream in the same page

Posted: Fri Jun 06, 2014 5:51 am
by rabeeh

create more than radio stream in the same page

Posted: Fri Jun 06, 2014 12:12 pm
by Kateryna Grynko

Hi,

Why do you use codeempty()/code before codeappend()/code each time? codeempty()/code deletes everything added before:
http://api.jquery.com/empty/

Try the following code:prevar player = Tiggzi('mobileaudio_62');
player.empty().append('');
player.append('');
player.append('');
player[0].load();
player[0].play();
showSpinner();
player.on('canplay', function () {
hideSpinner();
});/pre


create more than radio stream in the same page

Posted: Fri Jun 06, 2014 2:30 pm
by rabeeh

thank you worked


create more than radio stream in the same page

Posted: Fri Jun 06, 2014 10:22 pm
by rabeeh

hello again
we check the app in Samsung tablet version 4.3 the stream radio not work

thank you


create more than radio stream in the same page

Posted: Sat Jun 07, 2014 8:33 pm
by rabeeh

After checking all the phones and the tablet with virsion 4.2.2 the radio work just for one station anf if you swich to another station its not work


create more than radio stream in the same page

Posted: Sat Jun 07, 2014 9:09 pm
by Illya Stepanov

Hello -

So it doesn't work for both 4.2.2 and 4.3?


create more than radio stream in the same page

Posted: Sat Jun 07, 2014 9:16 pm
by rabeeh

4.3 i did not chick but 4.2.2 yes doesnt work what to do??


create more than radio stream in the same page

Posted: Sat Jun 07, 2014 9:29 pm
by Illya Stepanov

Let's try it this way:
precode

var player = Tiggzi('mobileaudio_62');
player&#46;empty()&#46;append('<source src="http:&#47;&#47;www&#46;radiolumina&#46;ro:9000/;stream/1" type="audio/mpeg">');
player&#46;append('<source src="http:&#47;&#47;www&#46;radiolumina&#46;ro:9000/;stream/1" type="audio/ogg">');
player&#46;append('<source src="http:&#47;&#47;www&#46;radiolumina&#46;ro:9000/;stream/1" type="audio/wav">');
player[0]&#46;load();
player[0]&#46;play();
showSpinner();
player&#46;on('canplay', function () {
hideSpinner();
});
</pre>/code/pre


create more than radio stream in the same page

Posted: Sat Jun 07, 2014 10:43 pm
by rabeeh

you add just in the end?? or there is some thing in the beginning that you forget?