summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorM. Voerman <rekordc@gmail.com>2013-01-23 00:49:00 +0100
committerM. Voerman <rekordc@gmail.com>2013-01-23 00:49:00 +0100
commit145021f050c2a42eb8188bcacd567efbf2b9a4e5 (patch)
tree16d3d47f91331467dfbf5589fcdbd285262f9fa6
parentd5dafe4a65a84d40f567f581711b5d930a955d79 (diff)
downloadvdr-vipclient-145021f050c2a42eb8188bcacd567efbf2b9a4e5.tar.gz
vdr-vipclient-145021f050c2a42eb8188bcacd567efbf2b9a4e5.tar.bz2
Mediamenu fixes
-rw-r--r--index.html170
1 files changed, 114 insertions, 56 deletions
diff --git a/index.html b/index.html
index 4ac1a6f..568f552 100644
--- a/index.html
+++ b/index.html
@@ -1944,22 +1944,16 @@ if (DelisOK) {
DelisOK = 0;
break;
}
-} else {
+}
+if (mediaList.style.opacity != 0) {
switch(keyCode) {
case "BrowserBack":
- if (mediaList.style.opacity !== 0 && osdepginfo.style.opacity == 1) { osdepginfo.style.opacity = 0; break; }
- if (mediaList.style.opacity == 0) {
- ShowInfo();
- osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
- break;
- }
+ if (osdepginfo.style.opacity == 1) { osdepginfo.style.opacity = 0; break; }
case "TV":
- if (mediaList.style.opacity == 0) { play(channels[currChan]);}
UnloadMediaSettings();
break;
break;
case "Right":
- if (mediaList.style.opacity != 0) {
for (var i=0;i<10;i++) {
do
{
@@ -1968,11 +1962,8 @@ if (DelisOK) {
while (!recTitl[currMed]);
}
showMediaList();
- }
-
break;
case "Left":
- if (mediaList.style.opacity != 0) {
for (var i=0;i<10;i++) {
do
{
@@ -1981,49 +1972,116 @@ if (DelisOK) {
while (!recTitl[currMed]);
}
showMediaList();
- }
break;
case "Down":
- if (mediaList.style.opacity != 0) {
do
{
incMed(1);
}
while (!recTitl[currMed]);
showMediaList();
- } else {
- mediaPlayer.play(0);
- showDisplay("PAUS", false, 100, 0 );
- }
break;
case "Up":
- if (mediaList.style.opacity != 0) {
do
{
decMed(1);
}
while (!recTitl[currMed]);
showMediaList();
- } else {
- position = position + (mediaPlayer.getPosition()/1000);
- playRec((recLink[currMed] + "?time=" + position));
- }
break;
case "Accept":
- if (mediaList.style.opacity != 0) {
+ case "MediaPlayPause":
mediaList.style.opacity = 0;
GetMarks();
position = 0;
playRec(recLink[currMed]);
- } else {
- osdmedia.style.opacity = 1 - osdmedia.style.opacity;
- ShowMediaOSD();
- }
break;
case "Red":
- if (mediaList.style.opacity != 0) {
DelRec();
- }
+ break;
+ case "Green":
+ audio = audio + 1;
+ is = toi.informationService;
+ if(audio == 1) {
+ is.setObject("cfg.media.audio.languagepriority","dut,eng",is.STORAGE_VOLATILE);
+ osdlang.style.opacity = 1;
+ osdlang.style.fontSize = fsAudio;
+ osdlang.style.color = "white";
+ osdlang.innerHTML = "<img src='unmute.png'> Nederlands ";
+ setTimeout("osdlang.style.opacity = 0; ", 3000);
+ } else if(audio == 2) {
+ is.setObject("cfg.media.audio.languagepriority","ger,deu,eng",is.STORAGE_VOLATILE);
+ osdlang.style.opacity = 1;
+ osdlang.style.fontSize = fsAudio;
+ osdlang.style.color = "red";
+ osdlang.innerHTML = "<img src='unmute.png'> Deutsch ";
+ setTimeout("osdlang.style.opacity = 0; ", 3000);
+ } else if(audio == 3) {
+ is.setObject("cfg.media.audio.languagepriority","eng",is.STORAGE_VOLATILE);
+ osdlang.style.opacity = 1;
+ osdlang.style.fontSize = fsAudio;
+ osdlang.style.color = "black";
+ osdlang.innerHTML = "<img src='unmute.png'> English ";
+ setTimeout("osdlang.style.opacity = 0; ", 3000);
+ audio = 0;
+ }
+ break;
+ case "Blue":
+ ShowInfo();
+ osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
+ break;
+
+ case "VolumeMute":
+ state = toi.audioOutputService.getMuteState(AudioOut);
+ toi.audioOutputService.setMuteState(AudioOut, !state);
+ mute = 1 - state;
+ osdmute.style.opacity = mute;
+ break;
+ case "VolumeUp":
+ Volume = Volume + VolumeStep;
+ if (Volume > 100) {
+ Volume = 100;
+ }
+ toi.audioOutputService.setVolume(AudioOut, Volume);
+ showVolume();
+ break;
+ case "VolumeDown":
+ Volume = Volume - VolumeStep;
+ if (Volume < 0) {
+ Volume = 0;
+ }
+ toi.audioOutputService.setVolume(AudioOut, Volume);
+ showVolume();
+ break;
+
+ default:
+ break;
+ }
+}
+
+if (mediaList.style.opacity == 0) {
+ switch(keyCode) {
+ case "BrowserBack":
+ ShowInfo();
+ osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
+ break;
+ case "TV":
+ play(channels[currChan]);
+ UnloadMediaSettings();
+ break;
+ break;
+ case "Down":
+ mediaPlayer.play(0);
+ showDisplay("PAUS", false, 100, 0 );
+ break;
+ case "Up":
+ position = position + (mediaPlayer.getPosition()/1000);
+ playRec((recLink[currMed] + "?time=" + position));
+ break;
+ case "Accept":
+ osdmedia.style.opacity = 1 - osdmedia.style.opacity;
+ ShowMediaOSD();
+ break;
case "Green":
audio = audio + 1;
is = toi.informationService;
@@ -2052,8 +2110,7 @@ if (DelisOK) {
}
break;
case "Yellow":
- if (mediaList.style.opacity != 0) {
- }
+ break;
case "Blue":
ShowInfo();
osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
@@ -2061,6 +2118,30 @@ if (DelisOK) {
case "Menu":
break;
+ case "VolumeMute":
+ state = toi.audioOutputService.getMuteState(AudioOut);
+ toi.audioOutputService.setMuteState(AudioOut, !state);
+ mute = 1 - state;
+ osdmute.style.opacity = mute;
+ break;
+ case "VolumeUp":
+ Volume = Volume + VolumeStep;
+ if (Volume > 100) {
+ Volume = 100;
+ }
+ toi.audioOutputService.setVolume(AudioOut, Volume);
+ showVolume();
+ break;
+ case "VolumeDown":
+ Volume = Volume - VolumeStep;
+ if (Volume < 0) {
+ Volume = 0;
+ }
+ toi.audioOutputService.setVolume(AudioOut, Volume);
+ showVolume();
+ break;
+
+
case KEY_REC:
case "MediaRecord":
recordStart(recLink[currMed]);
@@ -2079,7 +2160,6 @@ if (DelisOK) {
}
break;
case "MediaStop":
- position = 0;
osdepginfo.style.opacity = 0;
isFullscreen = 0; play(channels[currChan]); isFullscreen = 1;
if (isRecording == 1) {
@@ -2099,29 +2179,6 @@ if (DelisOK) {
playRec((recLink[currMed] + "?time=" + position));
}
break;
-
- case "VolumeMute":
- state = toi.audioOutputService.getMuteState(AudioOut);
- toi.audioOutputService.setMuteState(AudioOut, !state);
- mute = 1 - state;
- osdmute.style.opacity = mute;
- break;
- case "VolumeUp":
- Volume = Volume + VolumeStep;
- if (Volume > 100) {
- Volume = 100;
- }
- toi.audioOutputService.setVolume(AudioOut, Volume);
- showVolume();
- break;
- case "VolumeDown":
- Volume = Volume - VolumeStep;
- if (Volume < 0) {
- Volume = 0;
- }
- toi.audioOutputService.setVolume(AudioOut, Volume);
- showVolume();
- break;
case KEY_1:
position = position + (mediaPlayer.getPosition()/1000) - 30;
if (position <= 0) { position = 0;}
@@ -2188,6 +2245,7 @@ if (DelisOK) {
default:
break;
+
}
}
}