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

How do I tell when live stream has begun?


I have a question of how to do something via the javascript api. We have a list of playlist items and I would like to be able to query given the playlist items for when they are due to start.

For example:

var links = [];

links.push({file: "" });
links.push({file: "" });

var playerInstance = jwplayer("videoPlayer").setup({
playlist: [
image: "",
sources: links

If I have the setup above how would I interrogate the two playlists and check when they are due to start. Currently when I go to either of the URLs they aren't available. If I was to poll for when they become available would that tell me when they are ready to start playing? Or should I use the callback: .on('beforePlay')


2 Community Answers


JW Player Support Agent  
0 rated :

Hi, Shane.

.on(“beforePlay”) would only work once the player has been told to begin playback. Its only real-world use case is to use it to insert pre-roll ads without having to set them up in your embed code.

Am I understanding you correctly that you would be polling to see when the streams are available outside of our player, and then pushing the sources into the player’s embed code so they can be played?

James Herrieven

0 rated :

You can achieve something along these lines, without any need for coding, using the "Streamy" configuration option with my Tatami for Online Video solution. Here's a snapshot I've created to demonstrate this:

(NOTE: Streamy currently only works with JW Player 6 and JW Player 7 - support for Flowplayer and Bitdash is in the pipeline)

James Herrieven
Powered by Haiku
Tatami for Online Video
skype: JamesHerrieven
email: james[at]haiku[dot]co[dot]uk

This question has received the maximum number of answers.