Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

stream failover


HI all,
We are using jwplayer for our live set on friday evening.
But on other days of the week we have a NON stop player active.
What we want is that JWplayer does a failover or something.

i mean: jwplayer has to look if the live stream (or url) is avainable ...if not failover to the non stop stream and start automaticly.

i looked every where on the forums and FAQ's but i can not find any solution for this.
I hope you all understand my question and maybe someone has a solution.

many many thanks in advance
Micheal

13 Community Answers

Ethan Feldman

JW Player Support Agent  
1 rated :

You can use our API for this, and onError() – http://support.jwplayer.com/customer/portal/articles/1413089-javascript-api-reference

jojojo1972

User  
0 rated :

THANKS ETHAN !!!!
can you make me a simple example with 2 sources ?

many many thanks
micheal !

Ethan Feldman

JW Player Support Agent  
1 rated :

http://support.jwplayer.com/customer/portal/articles/1442607-example-a-custom-error-message

jojojo1972

User  
0 rated :

THANKS ETHAN
thanks for your answer...but i am allmost there

this is my code (from the example) ...but i wont play my non-stop stream ...aaahhhh
can you please help me for the last time...
many many thanks in advance ethan !

the full code :



<html>
<head>

<script type="text/javascript" src="jwplayer.js"></script>
</head>

<body topmargin="0" leftmargin="0">


<div id="container">&nbsp;</div>
<script>
jwplayer("container").setup({
file: "rtmp://fms.12E5.edgecastcdn.net/0012E5/videos/Qvxp3Jnv-68183.flv",
image: "http://s.jwpcdn.com/thumbs/RxiqSWej-640.jpg"
});
jwplayer().onError(function(){
jwplayer().load({file:"icastify.com/edm",image:"http://content.jwplatform.com/thumbs/7RtXk3vl-480.jpg"});
jwplayer().play();
});
jwplayer().onComplete(function(){
window.location = window.location.href;
});
jwplayer().onBuffer(function(){
theTimeout = setTimeout(function(){
jwplayer().load({file:"icastify.com/edm",image:"http://content.jwplatform.com/thumbs/7RtXk3vl-480.jpg"});
jwplayer().play();
},2000);
});
jwplayer().onPlay(function(){
clearTimeout(theTimeout);
});
</script>



<p>The above code will check for a buffer every 2 seconds. If no buffering is detected, we will load our error video yet again.</p>


</div>


</body>
</html>

jojojo1972

User  
0 rated :

i am sorry ethan ...i forgot to say that this is our live stream adres: http://icastify.com/edm

if i put this adress in the example it won't play...
aahhhh

can you please please help me with this last step !
thanks

micheal

Ethan Feldman

JW Player Support Agent  
1 rated :

Where are you running this?

jojojo1972

User  
0 rated :

we are running this on our test server ..
see here : http://megasounds.nl/testit/newtest.html

micheal

jojojo1972

User  
0 rated :

just put the url : http://icastify.com/edm in your google browser and it starts playing...

but in the html its not playing
it says : playlist could not be loaded incorrect playlist type

thanks in advance
micheal

Ethan Feldman

JW Player Support Agent  
0 rated :

Is http://icastify.com/edm IceCast?

jojojo1972

User  
0 rated :

YESS thats icecast ethan

Ethan Feldman

JW Player Support Agent  
0 rated :

That is why it doesn’t work.

We don’t support it, or shortcast, or any other type of radio cast.

http://support.jwplayer.com/customer/portal/articles/1403635-media-format-support

jojojo1972

User  
0 rated :

OK thx
i will try to make it a rtmp stream ..then it must work

thanks for now
have a nice day Ethan

Ethan Feldman

JW Player Support Agent  
0 rated :

Np, you too.

This question has received the maximum number of answers.