Created
June 20, 2014 04:59
-
-
Save jmcclellan/5e7c1b45c2e832fcfba6 to your computer and use it in GitHub Desktop.
Call the Ustream Channel API to see if a channel is live
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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