Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Player - get online status? #508

Closed
jzisser9 opened this issue Mar 10, 2016 · 5 comments
Closed

New Player - get online status? #508

jzisser9 opened this issue Mar 10, 2016 · 5 comments

Comments

@jzisser9
Copy link

Hi, first off, great job on the new interactive player - it's a huge step forward.

Is there a way to detect whether a player's channel is online or offline? I see the "isEnded()" method but it returns false, even for offline channels. I'm guessing this is only set to "true" if a channel goes from online to offline during the lifetime of the player.

Additionally, is there an event listener for when a streamer goes online?

@bofinbabu
Copy link

Any leads ?

@tmaneri
Copy link

tmaneri commented May 10, 2016

You can use the streams endpoint to detect if a channel is live or not.

On Tue, May 10, 2016 at 5:24 AM Bofin Babu notifications@github.com wrote:

Any leads ?


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#508 (comment)

@jzisser9
Copy link
Author

That's what I'm currently using, but there's a noticeable delay between noticing the stream go offline in an embedded player and the API returning that fact. Being able to grab this info from the player - maybe based on whether or not the embedded player is playing something - would be better.

@bofinbabu
Copy link

@Argus9 : I've noticed the same too. I tried to fetch contents of the channel's url and parsed it to see if there's any difference while the channel is live and when it's offline. But couldn't find any.

@jzisser9
Copy link
Author

Closing issue; you can use addEventListener to detect when a stream comes online or goes offline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants