|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
Unfortunately, our API doesn't support JSON yet so we don't have a way for you to trigger it directly from your webpage because of cross-domain restrictions. We'll be adding JSON support soon though.
|
|
#3
|
|||
|
|||
|
"Soon", in this case, apparently meaning "never". Bump because we should have this functionality by now.
|
|
#4
|
|||
|
|||
|
This functionality is now available. See for example:
http://xharddropx.channel-api.livest...?callback=test Best, Paul |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|