UMS PLAYER REDIRECT TO ANOTHER URL IF LIVE WEBCAM RTMP STREAM FAILS

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Post Reply
Tim Cahill
Posts: 1
Joined: Mon May 01, 2017 4:00 am

UMS PLAYER REDIRECT TO ANOTHER URL IF LIVE WEBCAM RTMP STREAM FAILS

Post by Tim Cahill »

I own a webcam in a remote location... stream the LIVE rtsp video... and embed it into a public webpage.

All of this works VERY WELL - THANKS TO THE UMS PLAYER !!!

However there are increasingly regular occasions when the Internet service at this remote location fails and consequently I lose connection.

When this happens, the player times-out and I get the message displayed 'Media-not-found'.

This is fine and as expected... HOWEVER... it would be very useful if, whenever I lose the connection, the webpage can redirect to another URL.
Alternatively, replacing the video stream with a JPG notice would be fine, rather than just seeing the UMS Player's 'Media-not-found'.

I inherited most of the webpage and although I understand basic HTML and Javascript, I have been unsuccessful achieving this.

Any ideas please?

Suggested script would be useful which I could add to the existing portion shown below.

Thanks in advance.

<!-- player container -->
<!-- <center> <p>The Webcam</p> -->
<div id="player-container"><p>This Feed Uses Adobe Flash Player</p>
</div>

<script type="text/javascript">
embedPlayer('player-container', {
flashvars : {

'rtmp' : 'rtmp://webcamstream.fromhere.net:1935/live/camera.stream',

'autoplay' : true, //start playing automatically; true by default
'bufferLength' : 0, //Buffer length in seconds; 1 by default; set to 0 for real-time streaming
'showMetadata' : true, //display server metadata; true by default
'showLiveCaption' : true, //display "Live" label with time; false by default
'livelabelshowbg' : true, //display only time on "Live" label; false by default
'showErrorInPlayer' : true, //show error text in the player; true by default
'autoReconnect' : false, //reconnect if working connection breaks; false by default
'allowloadlogo' : true, // allow external link to logo file
'showlogo' : true, // show the logo - png
'logoposition' : 'CM', // position of logo - Top-Right default
'nhidelogo' : 5, // seconds to show logo
'logopath' : 'http://www.address.com/abc.png', //url of your logo; not set by default
'ownerlink' : 'http://www.address.com', //where to go when logo is clicked; not set by default
'poster' : 'http://www.address.com/picture.png' //path to your poster, for non-autoplay mode; not set by default
},
size : { width: 640, height: 480 },
playerStyle : 'quick'
}
Post Reply