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?


Hi,

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: "http://wowzaprod3-lh.akamaihd.net/z/5df2507d_1@142171/manifest.f4m" });
links.push({file: "http://wowzaprod3-lh.akamaihd.net/i/5df2507d_1@142171/master.m3u8" });

var playerInstance = jwplayer("videoPlayer").setup({
playlist: [
{
image: "https://news.gov.bc.ca/Content/Images/Live_Webcast.png",
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')


Thanks,
Shane

2 Community Answers

Alex

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

User  
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:

http://dev.powered-by-haiku.co.uk/solutions/tatami/?share=dhoAJvxfYW

(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
http://powered-by-haiku.co.uk/
---------------------------------------------------
Tatami for Online Video
http://dev.powered-by-haiku.co.uk/solutions/tatami/
---------------------------------------------------
skype: JamesHerrieven
email: james[at]haiku[dot]co[dot]uk
===================================================

This question has received the maximum number of answers.