From c733ae3547e11ffb40037c87d4c3592e69cbe8c4 Mon Sep 17 00:00:00 2001 From: "M. Voerman" Date: Sun, 16 Dec 2012 02:00:09 +0100 Subject: small bug fixes --- History | 3 +- index.html | 101 +++++++++++++++++++++++++------------------------------------ 2 files changed, 44 insertions(+), 60 deletions(-) diff --git a/History b/History index 8e925d5..bc4b2f8 100644 --- a/History +++ b/History @@ -1,7 +1,7 @@ 0.04 Volume OSD bar Media Player added. Only Play/ Pause & FF, no REW. - + OSD made for 576i !! 0.03 Release date 2012/12/13 Try to fix Teletext crash. @@ -19,3 +19,4 @@ Speed up OSD. (In fullscreen don't need to update channellist.) AudioOut can now be selected in settings.js + diff --git a/index.html b/index.html index cafc89b..7c658bd 100644 --- a/index.html +++ b/index.html @@ -28,7 +28,7 @@ var Version = "0.04 2012/12/xx" var nrChannels = channels.length; -var nrMedia = recording.length; +var nrMedia = recording.length - 1; window.onkeydown = onKeyDown; @@ -237,22 +237,19 @@ function onKeyDown(event) { is = toi.informationService; if(audio == 1) { is.setObject("cfg.media.audio.languagepriority","dut,eng",is.STORAGE_VOLATILE); - osdlang1.style.opacity = 1; - osdlang2.style.opacity = 0; - osdlang3.style.opacity = 0; - setTimeout("osdlang1.style.opacity = 0; ", 3000); + osdlang.style.opacity = 1; + osdlang.innerHTML = "Nederlands" + setTimeout("osdlang.style.opacity = 0; ", 3000); } else if(audio == 2) { is.setObject("cfg.media.audio.languagepriority","ger,deu,eng",is.STORAGE_VOLATILE); - osdlang1.style.opacity = 0; - osdlang2.style.opacity = 1; - osdlang3.style.opacity = 0; - setTimeout("osdlang2.style.opacity = 0; ", 3000); + osdlang.style.opacity = 1; + osdlang.innerHTML = "Deutsch" + setTimeout("osdlang.style.opacity = 0; ", 3000); } else if(audio == 3) { is.setObject("cfg.media.audio.languagepriority","eng",is.STORAGE_VOLATILE); - osdlang1.style.opacity = 0; - osdlang2.style.opacity = 0; - osdlang3.style.opacity = 1; - setTimeout("osdlang3.style.opacity = 0; ", 3000); + osdlang.style.opacity = 1; + osdlang.innerHTML = "English" + setTimeout("osdlang.style.opacity = 0; ", 3000); audio = 0; } } else { @@ -898,14 +895,14 @@ function GetSchedule(schchan,tablelength){ txt = txt + "" + th + ":" + tm + " (" + events.infoSequence[i].duration/60 + ") " + events.infoSequence[i].name + ""; } txt = txt + ""; - scheduletxt.innerHTML = channelsnames[schchan] + txt; + schedule.innerHTML = channelsnames[schchan] + txt; } else { - scheduletxt.innerHTML = "

" + channelsnames[schchan] + "

"; + schedule.innerHTML = "

" + channelsnames[schchan] + "

"; } } catch(e) { alert("Get EPG problem: " + e); - scheduletxt.innerHTML = "

" + channelsnames[schchan] + "

NO EPG

"; + schedule.innerHTML = "

" + channelsnames[schchan] + "

NO EPG

"; } } @@ -1172,7 +1169,7 @@ function onKeyMedia(keyCode) { play(channels[currChan]); break; break; - case "Up": + case "Down": if (mediaList.style.opacity != 0) { do { @@ -1181,12 +1178,12 @@ function onKeyMedia(keyCode) { while (!recording[currMed]); showMediaList(); } else { - speed = 1000; - mediaPlayer.play(1000); - showDisplay("PLAY", false, 100, 0 ); + speed = 0; + mediaPlayer.play(0); + showDisplay("PAUS", false, 100, 0 ); } break; - case "Down": + case "Up": if (mediaList.style.opacity != 0) { do { @@ -1195,9 +1192,9 @@ function onKeyMedia(keyCode) { while (!recording[currMed]); showMediaList(); } else { - speed = 0; - mediaPlayer.play(0); - showDisplay("PAUS", false, 100, 0 ); + speed = 1000; + mediaPlayer.play(1000); + showDisplay("PLAY", false, 100, 0 ); } break; case "Accept": @@ -1206,9 +1203,9 @@ function onKeyMedia(keyCode) { speed = 1000; playRec(recording[currMed]); } else { - osdmedia.style.opacity = 1 -osdmedia.style.opacity; + osdmedia.style.opacity = 1 - osdmedia.style.opacity; ShowMediaOSD(); - mediaPlayer.playFromPosition(60000,1000); +// mediaPlayer.playFromPosition(60000,1000); } break; case "Green": @@ -1216,22 +1213,19 @@ function onKeyMedia(keyCode) { is = toi.informationService; if(audio == 1) { is.setObject("cfg.media.audio.languagepriority","dut,eng",is.STORAGE_VOLATILE); - osdlang1.style.opacity = 1; - osdlang2.style.opacity = 0; - osdlang3.style.opacity = 0; - setTimeout("osdlang1.style.opacity = 0; ", 3000); + osdlang.style.opacity = 1; + osdlang.innerHTML = "Nederlands" + setTimeout("osdlang.style.opacity = 0; ", 3000); } else if(audio == 2) { is.setObject("cfg.media.audio.languagepriority","ger,deu,eng",is.STORAGE_VOLATILE); - osdlang1.style.opacity = 0; - osdlang2.style.opacity = 1; - osdlang3.style.opacity = 0; - setTimeout("osdlang2.style.opacity = 0; ", 3000); + osdlang.style.opacity = 1; + osdlang.innerHTML = "Deutsch" + setTimeout("osdlang.style.opacity = 0; ", 3000); } else if(audio == 3) { is.setObject("cfg.media.audio.languagepriority","eng",is.STORAGE_VOLATILE); - osdlang1.style.opacity = 0; - osdlang2.style.opacity = 0; - osdlang3.style.opacity = 1; - setTimeout("osdlang3.style.opacity = 0; ", 3000); + osdlang.style.opacity = 1; + osdlang.innerHTML = "English" + setTimeout("osdlang.style.opacity = 0; ", 3000); audio = 0; } break; @@ -1303,7 +1297,7 @@ function onKeyMedia(keyCode) { function showMediaList() { var liststyle = ""; - var htmlstring = ""; + var htmlstring = "

RECORDINGS

"; listMed = currMed-7; for(var i=currMed-7; i<=currMed+7; i++) { if (listMed<0) { @@ -1322,7 +1316,7 @@ function showMediaList() { } else { liststyle = ""; } - htmlstring = htmlstring + "" + Left(recording[listMed],60) + ""; + htmlstring = htmlstring + "\uE003\uE003" + Left(recording[listMed],60) + ""; } htmlstring = htmlstring + "
"; mediaList.innerHTML = htmlstring; @@ -1331,7 +1325,7 @@ function showMediaList() { function incMed(step) { currMed = currMed + step; - if (currMed == nrMedia) { + if (currMed == nrMedia + 1) { currMed = 0; } } @@ -1339,7 +1333,7 @@ function incMed(step) { function decMed(step) { currMed = currMed - step; if (currMed < 0) { - currMed = nrMedia - 1; + currMed = nrMedia; } } @@ -1361,7 +1355,7 @@ function playRec(uri) { function ShowMediaOSD() { // Display Name/ length - osdmedia.innerHTML = " Elapsed time : " + mediaPlayer.getPosition(); + osdmedia.innerHTML = " Elapsed time : " + mediaPlayer.getPosition() + ""; } @@ -1372,15 +1366,9 @@ function ShowMediaOSD() {
-
-
+
-
- ----- - Next - Schedule - INFO -
+
----- Next Schedule INFO
--------- GUIDE ----
@@ -1389,11 +1377,9 @@ function ShowMediaOSD() {
- - +
Volume :
-
@@ -1403,16 +1389,13 @@ function ShowMediaOSD() {
-
+
-
Nederlands
-
Deutsch
-
English
- +
-- cgit v1.2.3