From 4f4dd73b19eec0d199684f2f7e6a5be9b3554881 Mon Sep 17 00:00:00 2001 From: Alib Date: Tue, 23 Mar 2010 13:11:09 +0100 Subject: now VDR VIdeo & Audio home menu appears depending of streamdev_server,video_path & audio_path value in config file. --- js/istreamdev.js | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/istreamdev.js b/js/istreamdev.js index c27e99c..d080bd7 100644 --- a/js/istreamdev.js +++ b/js/istreamdev.js @@ -56,8 +56,40 @@ $.getJSON("bin/backend.php", rec_path = data.rec_path; video_path = data.video_path; audio_path = data.audio_path; + if (streamdev_server != "") { + addVdr(); } - ); + if ( video_path != "" ) { + addVideofiles(); + } + if ( audio_path != "" ) { + addAudiofiles(); + } +}); + +function addVdr() { + vdrmenu = ' '; + $('#home #runningsessions').after(vdrmenu); +} +function addVideofiles() { + videomenu = '
  • Video
  • '; + if ( $('#home #filemenu').length == 0 ) { + $('#home').append(''); + } + $('#home #filemenu').append(videomenu); +} + +function addAudiofiles() { + audiomenu = '
  • Audio
  • '; + if ( $('#home #filemenu').length == 0 ) { + $('#home').append(''); + } + $('#home #filemenu').append(audiomenu); +} //Goto home $('#home_but').tap(function(event) { @@ -217,12 +249,12 @@ $('#runningsessions li a').tap(function(event) { // Get Active broadcast & encoding sessions function getRunningSessions() { var dataString = "action=getRunningSessions"; - $('#home #runningsessions').html(''); + $('#home #runningsessions').html('
  • SESSIONS
  • \n
  • Checking running session
  • '); //Json call to get category array $.getJSON("bin/backend.php", dataString, function(data){ - $('#home #runningsessions').append('
  • SESSIONS
  • '); + $('#home #runningsessions').html('
  • SESSIONS
  • '); if ( data.broadcast.length >= 1 ) { $.each(data.broadcast, function(i,broadcast){ session = broadcast.session; -- cgit v1.2.3