Skip to content

Instantly share code, notes, and snippets.

@jmcclellan
Created June 20, 2014 04:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmcclellan/5e7c1b45c2e832fcfba6 to your computer and use it in GitHub Desktop.
Save jmcclellan/5e7c1b45c2e832fcfba6 to your computer and use it in GitHub Desktop.
Call the Ustream Channel API to see if a channel is live
// CUSTOM CODE that checks ustream and displays banner if it's live
// GET URL represented as https://api.ustream.tv/channels/CHANNEL_ID.json
$.getJSON('https://api.ustream.tv/channels/5817556.json', function(data)
{
// if the channel status is live then do something
if (data.channel.status == 'live')
{
// alert('Its live!');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment