From e142f06536528e2e5c29c3747edbdf5ce76c550e Mon Sep 17 00:00:00 2001 From: "M. Voerman" Date: Thu, 22 Aug 2013 10:48:40 +0200 Subject: Audio/Video info in Infobox when playing channels updated channels3 updated with some from 42E --- index.html | 63 +++++++++++++++++++++++++++----------------------------------- 1 file changed, 27 insertions(+), 36 deletions(-) (limited to 'index.html') diff --git a/index.html b/index.html index 060aa0a..b995155 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,7 @@ // // -var Version = "0.22.2" +var Version = "0.22.3" for (var x = 0; x < 10; x++) { searchtimers[x] = "" ; // To solve displaying undefined @@ -272,12 +272,12 @@ function onDataAvailableEvent(event) { dataAvailable = event.status; //alert("onDataAvailableEvent : " + event.status); if(event.status==true) { - updateStreamInfo(); + updateStreamInfo(currChan); } } -function updateStreamInfo() { +function updateStreamInfo(currStream) { //alert("What can this stream do : " + mediaPlayer.getCapabilities()); var mpCap = ""; @@ -315,16 +315,16 @@ var streamInfo = mediaPlayer.getStreamInfo(); var cList = streamInfo.availableComponents; var x; xx = 0; -AudioInfo[currChan] = ""; +AvInfo[currStream] = ""; for(x=0; x\n

" + EPG[1][7][currChan] + "

"; - osdepginfo.innerHTML = "

" + currChan + "\uE003" + channelsnames[currChan] + "

" + AudioInfo[currChan] + "

" + EPG[0][7][currChan] + EPG[0][9][currChan] + EPG[0][8][currChan] + "

\n

" + EPG[0][4][currChan] + "

\n

" + Left(EPG[0][5][currChan],750) + "

"; + osdepginfo.innerHTML = "

" + currChan + "\uE003" + channelsnames[currChan] + "

" + AvInfo[currChan] + "

" + EPG[0][7][currChan] + EPG[0][9][currChan] + EPG[0][8][currChan] + "

\n

" + EPG[0][4][currChan] + "

\n

" + Left(EPG[0][5][currChan],750) + "

"; osdepginfonext.innerHTML = "

" + currChan + "\uE003" + channelsnames[currChan] + "

" + EPG[1][7][currChan] + EPG[1][9][currChan] + EPG[1][8][currChan] + "

\n

" + EPG[1][4][currChan] + "

\n

" + Left(EPG[1][5][currChan],750) + "

"; } @@ -2225,7 +2225,7 @@ function LoadTimers() { } -function LoadTimersServer_1() { +function LoadTimersServer() { //Get timers from SmartTVweb try { xmlhttp=new XMLHttpRequest(); @@ -2242,8 +2242,9 @@ try { timersStrt[i] = Right("000" + x[i].getElementsByTagName("start")[0].childNodes[0].nodeValue,4); timersStop[i] = Right("000" + x[i].getElementsByTagName("stop")[0].childNodes[0].nodeValue,4); - timersEvnt[i] = 0; // x[i].getElementsByTagName("eventid")[0].childNodes[0].nodeValue; // event_id - timersID[i] = x[i].getElementsByTagName("channelid")[0].childNodes[0].nodeValue; // channel_id + timersEvnt[i] = x[i].getElementsByTagName("eventid")[0].childNodes[0].nodeValue; // event_id +// timersID[i] = x[i].getElementsByTagName("channelid")[0].childNodes[0].nodeValue; // channel_id + timersChan[i] = x[i].getElementsByTagName("channelid")[0].childNodes[0].nodeValue; // channel_id timersName[i] = x[i].getElementsByTagName("channelname")[0].childNodes[0].nodeValue + fill; timersDay[i] = x[i].getElementsByTagName("day")[0].childNodes[0].nodeValue; timersDays[i] = new Date(timersDay[i]*1000); @@ -2264,9 +2265,6 @@ try { timerOK = 1; } -// timers.sort(); // sorts only timers, (so all others are way off timers[0] <> timersflag[0] etc) - - } catch(e) { timerOK = 0; alert("Get Timers problem: " + e); @@ -2280,11 +2278,11 @@ try { xmlhttp=new XMLHttpRequest(); // // SmartTVWeb -// xmlhttp.open("GET",(recServ + "/deleteTimer?guid=" + timersID[timerID] + "&dy=" + timersDay[timerID] -// + "&st=" + timersStrt[timerID] + "&sp=" + timersStop[timerID]),false); + xmlhttp.open("GET",(recServ + "/deleteTimer?guid=" + timersChan[timerID] + "&dy=" + timersDay[timerID] + + "&st=" + timersStrt[timerID] + "&sp=" + timersStop[timerID] + "&" + new Date().getTime()),false); // smarttvweb delete & restful reading - var x = timersID[timerID].split(":"); - xmlhttp.open("GET",(recServ + "/deleteTimer?guid=" + x[0] + "&dy=" + x[2] + "&st=" + x[3] + "&sp=" + x[4] + "&" + new Date().getTime()),false); +// var x = timersID[timerID].split(":"); +// xmlhttp.open("GET",(recServ + "/deleteTimer?guid=" + x[0] + "&dy=" + x[2] + "&st=" + x[3] + "&sp=" + x[4] + "&" + new Date().getTime()),false); // // xmlhttp.send(); @@ -2295,20 +2293,7 @@ try { } -function DeleteTimers_old() { -try { - xmlhttp=new XMLHttpRequest(); - xmlhttp.open("POST",(RestFulAPI + "/timers/" + timersID[timerID]),false); - xmlhttp.send(); - - } catch(e) { - alert("Deleting Timers problem: " + e); - } -} - - - -function LoadTimersServer() { +function LoadTimersServer_1() { //Get timers from RestFulApi try { xmlhttp=new XMLHttpRequest(); @@ -3637,6 +3622,7 @@ function BackToTV() { mediaList.style.opacity = 0.9; showDisplay("STOP", false, 100, 0 ); showMediaList(); + AvInfo.length = 0; } } @@ -3705,13 +3691,18 @@ function ShowInfo() { h=addzero(h); m=addzero(m); result = ''+days[day]+' '+d+' '+months[month]+' '+year+' '+h+':'+m; + if ( mediaList.style.opacity == 0 ) { updateStreamInfo(currMed);} else { AvInfo[currMed] = "";} + if (year!==1970) { - osdepginfo.innerHTML = "
" + Left(recTitl[currMed],60) + "\n " + result + "\n " 
-					+ (recDura[currMed] / 60).toFixed(0) + Lang[54] + "\n " + recChan[currMed] + "  " 
+       		osdepginfo.innerHTML = "
" + Left(recTitl[currMed],60) 
+					+ "
" + AvInfo[currMed] + "
 " 
+					+ result + "\n " 
+					+ (recDura[currMed] / 60).toFixed(0) + Lang[54] + "\n " + recChan[currMed] + "  "
 					+ "\n 

" + Left(recDesc[currMed],750) + "

"; } else { //info for non-vdr recordings - osdepginfo.innerHTML = "
" + Left(recTitl[currMed],60) + "\n \n 
"; + osdepginfo.innerHTML = "
" + Left(recTitl[currMed],60) 
+					+ "\n 

" + AvInfo[currMed] + " " + "\n \n

"; } } -- cgit v1.2.3