summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAlib <aliboba@free.fr>2010-03-17 15:29:56 +0100
committerAlib <aliboba@free.fr>2010-03-17 15:29:56 +0100
commit38ca22c1b216b75fa725bbe8d0da89384fee4294 (patch)
tree54bc9bf80d0596ede4e8a1f06c6dc783c88f0a4f /js
parent478709641e55c9050f60c62e478c5d5279970efd (diff)
downloadistreamdev-38ca22c1b216b75fa725bbe8d0da89384fee4294.tar.gz
istreamdev-38ca22c1b216b75fa725bbe8d0da89384fee4294.tar.bz2
running session in home
Diffstat (limited to 'js')
-rw-r--r--js/istreamdev.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/js/istreamdev.js b/js/istreamdev.js
index 53963bc..a5e33fb 100644
--- a/js/istreamdev.js
+++ b/js/istreamdev.js
@@ -68,6 +68,7 @@ $.getJSON("bin/backend.php",
//Goto home
$('#home_but').tap(function(event) {
event.preventDefault();
+ getRunningSessions();
jQT.goTo('#home','flip');
});
@@ -128,6 +129,35 @@ $('#audio_but').tap(function(event) {
gen_browser(audio_path,browser,"Audio","aud");
return false;
});
+// show active sessions
+$(document).ready(function(e){
+getRunningSessions();
+});
+
+function getRunningSessions() {
+var dataString = "action=getRunningSessions";
+ $('#home #runningsessions').html('');
+ //Json call to get category array
+ $.getJSON("bin/backend.php",
+ dataString,
+ function(data){
+ $('#home #runningsessions').append('<li><span class="menutitle">SESSIONS</span></li>');
+ if ( data.broadcast[0].session ) {
+ $.each(data.broadcast, function(i,broadcast){
+ session = broadcast.session;
+ name = broadcast.name;
+ type = broadcast.type;
+ if (type == 'tv') { var pic='tv.png'; }
+ else if (type == 'rec') { var pic='record.png'; }
+ else if (type == 'vid') { var pic='video.png'; }
+ $('#home #runningsessions').append('<li class="arrow"><a rel="session" href="#"><img class="menuicon" src="img/' + pic + '" /><span class="menuname">*Live: ' + name + '</span></a></li>');
+ });
+ }
+ else {
+ $('#home #runningsessions').append('<li class="arrow"><span class="menuname">No running session</span></li>');
+ }
+ });
+}
// [/HOME SECTION]
// [TV SECTION]