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

On error play another stream


I use this code to display a streamer and it works fine. However, I want to play another stream when the first one is down or has any problem.

script language="javascript" type="text/javascript" src="embed/swfobject.js"></script>

<div id="playerContainer">player should load here</div>

<script language="javascript" type="text/javascript">
var flashvars = {};
flashvars.linkfromdisplay = "true";
flashvars.autostart = "true";
flashvars.height = "480";
flashvars.width = "640";
flashvars.volume = "90";
flashvars.repeat = "false";
flashvars.displayheight = "640";
flashvars.displaywidth = "480";
flashvars.stretching = "exactfit";
flashvars.file = "live1.stream";
flashvars.streamer = "rtmp://streaming.gr:1935";
var params = {};
params.menu = "true";
params.allowscriptaccess = "always";
params.allowfullscreen = "true";
params.wmode = "transparent";
var attributes = {};
attributes.id = "playerContainer";
attributes.wmode = "transparent";
attributes.name = "playerContainer";
swfobject.embedSWF("jwplayer/player.swf",
"playerContainer", "640", "480", "8","expressInstall.swf", flashvars,
params, attributes);
</script>

5 Community Answers

Andrew

JW Player Support Agent  
0 rated :

Hi,

Do you have a link? Also, which version of JW Player is being used?

Regards,
Andrew

giorgos.avgeris

User  
0 rated :

I use jw 5.3. The website is not ready so I don't have link.

I found out that I can do it with onError() function, but I don't know exacltly how to do it.

Andrew

JW Player Support Agent  
0 rated :

Hi,

We definitely need a link for this. Also, we will not be supporting JW5 for much longer unfortunately. Please put this on a public page if you can.

giorgos.avgeris

User  
0 rated :

You can find the player in this page:

http://www.pste.gov.gr/index.php/component/content/article?layout=edit&id=3681

Ethan Feldman

JW Player Support Agent  
0 rated :

You are embedding using SWFObject, our API only works if you embed using jwplayer.js

This question has received the maximum number of answers.