Prev Previous Post   Next Post Next
  #1  
Old 27th March 2010, 18:18
harddrop harddrop is offline
Junior Member
 
Join Date: Dec 2009
Posts: 1
Default Need help with isLive

Hi, I know how to show the XML file for my stream: http://xharddropx.channel-api.livest...2.0/livestatus .

I want my site to show Off Air in text when it's false and On Air when it's true, but I don't know how. Does anybody know the programming code I should put? Same with the amount of viewers.

If it helps, I transitioned from Ustream and this is what my code used to looked like:

<script type="text/javascript">
function set_status(status)
{
if (status == "offline")
{
document.getElementById("status").innerHTML = "<b>Live Stream: Off Air</b>";
}
else if (status == "live")
{
document.getElementById("status").innerHTML = "<b>Live Stream: On Air</b>";
}
else
{
document.getElementById("status").innerHTML = "<b>Live Stream: Error</b>";
}
}
</script>

<script type="text/javascript" src="http://api.ustream.tv/json/channel/hard-drop-tetris-channel/getValueOf/status?key=****&callback=set_status">
</script>

Also, I have a LiveStream API key now, but do I need one? Where do I put it?

Last edited by harddrop; 27th March 2010 at 18:26.
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump