diff options
author | Alib <aliboba@free.fr> | 2010-03-17 17:09:08 +0100 |
---|---|---|
committer | Alib <aliboba@free.fr> | 2010-03-17 17:09:08 +0100 |
commit | c46a516fe54867f31a331031a0d83503a83432fb (patch) | |
tree | 47ce8afd934c706e413c5cda712909597a64dc9e | |
parent | 69e40c5afad89ab966cbfff1121e631ff2e64e40 (diff) | |
download | istreamdev-c46a516fe54867f31a331031a0d83503a83432fb.tar.gz istreamdev-c46a516fe54867f31a331031a0d83503a83432fb.tar.bz2 |
added killall session
-rw-r--r-- | js/istreamdev.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/js/istreamdev.js b/js/istreamdev.js index 0f0fd2b..7f7ec91 100644 --- a/js/istreamdev.js +++ b/js/istreamdev.js @@ -137,11 +137,24 @@ $('#audio_but').tap(function(event) { $('#runningsessions li a').tap(function(event) {
event.preventDefault();
- var session = $(this).attr('rel');
json_start(this);
+ var session = $(this).attr('rel');
+ if (session=="killsessions") {
+ var dataString = 'action=stopBroadcast&session=all';
+ $.getJSON("bin/backend.php",
+ dataString,
+ function(data) {
+ var status = data.status;
+ var message = data.message;
+ hide_loader();
+ getRunningSessions();
+ });
+ } else {
gen_streaming(session);
+ }
return false;
});
+
// show active sessions
$(document).ready(function(e){
getRunningSessions();
@@ -174,6 +187,7 @@ var dataString = "action=getRunningSessions"; 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>');
});
+ $('#home #runningsessions').append('<li><a rel="killsessions" href="#"><span class="menuname">Stop all sessions</span></a></li>');
}
else {
$('#home #runningsessions').append('<li><span class="menuname">No running session</span></li>');
|