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

Live Web Feed - scheduling an off air slate?

Hi there,

I've got a 24 hour live web stream but I want a website to only display the stream for 12 of those hours. So at set times, I want a slate / image to appear in the player with an off air message until the next 12 hours.

I've seen other websites do this with JW Player but there appears to be no clue in their source code as to how they are making it work.

3 Community Answers


JW Player Support Agent  
0 rated :

My suggestion would be to use either an on(‘error’) or on(‘setupError’) event (which ever one fires, I do not have an off-air live stream to test with at the moment) to display your off-air slate in a <div> over the player. I would also suggest setting an Javascript setInternal to check again every 30 seconds or so.

Our engineers are asking what your stream does when it is off-air. Does it return a 404 or is the manifest just empty?


0 rated :

Hi Todd

Thanks for replying - the stream continues with another event after ours finishes each day, so we just want the player on our website to only let our visitors see our stream if that makes sense?

2 websites I know which manage this and have an image slate appear in the player at set times daily are:

Although as I say, I can't see anything in their source code to help work out how they do it?


JW Player Support Agent  
0 rated :

If you know the exact times your stream is going to be live each day, my suggestion would be to use Javascript to write an if statement to check the time and then either call jwplayer().setup() if the stream is live, or display your offline slate if it isn’t. I found sample code for you in this Stack Overflow thread:

Your code would look something like this:

<div id='player' style="height:270px; width:480px;"></div>
var objDate = new Date();
var hours = objDate.getHours();
if(hours >= 12 && hours <= 21){
        file: 'bunny.mp4',
else {
    document.getElementById('player').style.backgroundImage = "url(offline.jpg)";

This question has received the maximum number of answers.