From c46a516fe54867f31a331031a0d83503a83432fb Mon Sep 17 00:00:00 2001 From: Alib Date: Wed, 17 Mar 2010 17:09:08 +0100 Subject: added killall session --- js/istreamdev.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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('
  • *Live: ' + name + '
  • '); }); + $('#home #runningsessions').append('
  • Stop all sessions
  • '); } else { $('#home #runningsessions').append('
  • No running session
  • '); -- cgit v1.2.3