diff options
author | TheTroll <trolldev@gmail.com> | 2010-03-17 17:34:49 +0100 |
---|---|---|
committer | TheTroll <trolldev@gmail.com> | 2010-03-17 17:34:49 +0100 |
commit | 9f94e565988c2cd5bf765b4d21584b1ac2fcb64f (patch) | |
tree | 02379b9f248ec4e403ededaf05bdf09e77f86f1c | |
parent | cb1f04cb56c6779ee09c6d2a83164c06ac2efcc9 (diff) | |
parent | 4f0f14afafed51fe7731be510853bdab0dbb3821 (diff) | |
download | istreamdev-9f94e565988c2cd5bf765b4d21584b1ac2fcb64f.tar.gz istreamdev-9f94e565988c2cd5bf765b4d21584b1ac2fcb64f.tar.bz2 |
Merge branch 'jquery' of projects.vdr-developer.org:istreamdev into jquery
* 'jquery' of projects.vdr-developer.org:istreamdev:
changed header
added killall session
-rwxr-xr-x | bin/backend.php | 2 | ||||
-rw-r--r-- | js/istreamdev.js | 18 |
2 files changed, 17 insertions, 3 deletions
diff --git a/bin/backend.php b/bin/backend.php index 1c99f7e..3eaa127 100755 --- a/bin/backend.php +++ b/bin/backend.php @@ -1,6 +1,6 @@ <?php -header('Content-type: text/html'); +header('Content-Type: application/json; charset: UTF-8'); if (file_exists('../config.php')) include ('../config.php'); diff --git a/js/istreamdev.js b/js/istreamdev.js index 0f0fd2b..9bc4a8a 100644 --- a/js/istreamdev.js +++ b/js/istreamdev.js @@ -1,4 +1,4 @@ -//INIT
+//INIT
jQT = new $.jQTouch({
icon: 'img/istreamdev.png',
addGlossToIcon: true,
@@ -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>');
|