From 24598d2d7da9dc832cac2334f820cb783170e45a Mon Sep 17 00:00:00 2001 From: "M. Voerman" Date: Mon, 16 Dec 2013 13:08:43 +0100 Subject: Channels Update Sorting recordingslist, so no more double maps are shown volume steps are 1 if volume < 10 --- index.html | 197 ++++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 115 insertions(+), 82 deletions(-) (limited to 'index.html') diff --git a/index.html b/index.html index 068f508..933c6c5 100644 --- a/index.html +++ b/index.html @@ -309,6 +309,44 @@ function decChan(step) { OSDchannr(currChan); } +function VolumeUp() { + if (Volume < 10) { + var VolStep = 1; + } else { + var VolStep = VolumeStep; + } + + Volume = Volume + VolStep; + if (Volume > 100) { + Volume = 100; + } + toi.audioOutputService.setVolume(AudioOut, Volume); + showVolume(); +} + +function VolumeDown() { + if (Volume > 10) { + var VolStep = VolumeStep; + } else { + var VolStep = 1; + } + + Volume = Volume - VolStep; + if (Volume < 0) { + Volume = 0; + } + toi.audioOutputService.setVolume(AudioOut, Volume); + showVolume(); +} + + +function VolumeMute() { + state = toi.audioOutputService.getMuteState(AudioOut); + toi.audioOutputService.setMuteState(AudioOut, !state); + mute = 1 - state; + osdmute.style.opacity = mute; +} + function createPlayer() { try { mediaPlayer = toi.mediaService.createPlayerInstance(); @@ -961,26 +999,13 @@ function onKeyDown(event) { } break; case "VolumeMute": - state = toi.audioOutputService.getMuteState(AudioOut); - toi.audioOutputService.setMuteState(AudioOut, !state); - mute = 1 - state; - osdmute.style.opacity = mute; + VolumeMute(); break; case "VolumeUp": - Volume = Volume + VolumeStep; - if (Volume > 100) { - Volume = 100; - } - toi.audioOutputService.setVolume(AudioOut, Volume); - showVolume(); + VolumeUp(); break; case "VolumeDown": - Volume = Volume - VolumeStep; - if (Volume < 0) { - Volume = 0; - } - toi.audioOutputService.setVolume(AudioOut, Volume); - showVolume(); + VolumeDown(); break; case "MediaRewind": @@ -2208,6 +2233,8 @@ function onKeyMenu(keyCode) { InitMenu(menu); break; case "Teletext": + UseNewReclist = 1 - UseNewReclist; + alert(UseNewReclist); break; case "TV": break; @@ -2413,24 +2440,13 @@ function onKeyMenu(keyCode) { } break; case "VolumeMute": - state = toi.audioOutputService.getMuteState(AudioOut); - toi.audioOutputService.setMuteState(AudioOut, !state); - mute = 1 - state; - osdmute.style.opacity = mute; + VolumeMute(); break; case "VolumeUp": - Volume = Volume + VolumeStep; - if (Volume > 100) { - Volume = 100; - } - toi.audioOutputService.setVolume(AudioOut, Volume); + VolumeUp(); break; case "VolumeDown": - Volume = Volume - VolumeStep; - if (Volume < 0) { - Volume = 0; - } - toi.audioOutputService.setVolume(AudioOut, Volume); + VolumeDown(); break; default: @@ -3084,26 +3100,13 @@ if (DelisOK) { break; case "VolumeMute": - state = toi.audioOutputService.getMuteState(AudioOut); - toi.audioOutputService.setMuteState(AudioOut, !state); - mute = 1 - state; - osdmute.style.opacity = mute; + VolumeMute(); break; case "VolumeUp": - Volume = Volume + VolumeStep; - if (Volume > 100) { - Volume = 100; - } - toi.audioOutputService.setVolume(AudioOut, Volume); - showVolume(); + VolumeUp(); break; case "VolumeDown": - Volume = Volume - VolumeStep; - if (Volume < 0) { - Volume = 0; - } - toi.audioOutputService.setVolume(AudioOut, Volume); - showVolume(); + VolumeDown(); break; case KEY_REC: @@ -3189,26 +3192,13 @@ if (DelisOK) { break; case "VolumeMute": - state = toi.audioOutputService.getMuteState(AudioOut); - toi.audioOutputService.setMuteState(AudioOut, !state); - mute = 1 - state; - osdmute.style.opacity = mute; + VolumeMute(); break; case "VolumeUp": - Volume = Volume + VolumeStep; - if (Volume > 100) { - Volume = 100; - } - toi.audioOutputService.setVolume(AudioOut, Volume); - showVolume(); + VolumeUp() break; case "VolumeDown": - Volume = Volume - VolumeStep; - if (Volume < 0) { - Volume = 0; - } - toi.audioOutputService.setVolume(AudioOut, Volume); - showVolume(); + VolumeDown(); break; @@ -3347,30 +3337,73 @@ try { xmlDoc=xmlhttp.responseXML; var x=xmlDoc.getElementsByTagName("item"); nrMedia = x.length - 1; + +if (UseNewReclist && recPath == "/recordings.xml") { for (var i=0;i