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

Pre-live video


Is it possible to play an on demand video playing before automatically switching over to a live stream once it is detected? We do live events and begin streaming 15minutes prior the the scheduled event start. However I would like the audience who tune in earlier to be able to play a looped pre-live video and when the player detected the live stream from the encoder it switches to the live stream.

1 Community Answers

Todd

JW Player Support Agent  
0 rated :

Yes, this sounds like it would be possible but we do not have built-in functionality for this so you are going to need some custom code:

1) Load the player with the pre-live video on repeat
2) Start polling the live stream endpoint via a setInterval() on the page
3) When the live stream endpoint reports that the stream is live, kill the setInterval()
4) Call jwplayer().load({file: ’your_live_stream_url’}) and load the live stream URL

So the first question is what is the best way to do that polling with your live streaming service?

This question has received the maximum number of answers.