summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorM. Voerman <rekordc@gmail.com>2014-11-13 02:14:43 +0100
committerM. Voerman <rekordc@gmail.com>2014-11-13 02:14:43 +0100
commitbd61cc8d7fd04ecd380445281cc9aa006668bd48 (patch)
tree8c84f2c0e8dcd48295ee4739e9daaa5650accfa1
parentf37b0138a6a10adbf793844407ab6e88c153a359 (diff)
downloadvdr-vipclient-bd61cc8d7fd04ecd380445281cc9aa006668bd48.tar.gz
vdr-vipclient-bd61cc8d7fd04ecd380445281cc9aa006668bd48.tar.bz2
Timed channel change
-rw-r--r--History2
-rw-r--r--blue.css2
-rw-r--r--main.js46
-rw-r--r--settings.js2
4 files changed, 35 insertions, 17 deletions
diff --git a/History b/History
index 996f323..a555103 100644
--- a/History
+++ b/History
@@ -12,6 +12,8 @@ VDR 1.7.29+
Moved script to main.js
Display shows R/F + channelnumber ('R' for Radio, 'F' for favorite)
Skinning, CSS styling
+ In osd timeleft can't be more 24h (Gives a long number when box has no internet or time is totally wrong)
+ Timed change, set to 0 for old behavior (press ok for change)
0.25 Get recordings from Streamdev, Restfulapi or SmartTVweb.
diff --git a/blue.css b/blue.css
index e2c30a1..1e899d7 100644
--- a/blue.css
+++ b/blue.css
@@ -36,7 +36,7 @@
width : 69%;
height : 4%;
left : 3%;
- top : 18%;
+ top : 20%;
color : black;
}
diff --git a/main.js b/main.js
index 08cdbe1..983d56d 100644
--- a/main.js
+++ b/main.js
@@ -311,7 +311,7 @@ function incChan(step) {
if (currChan > maxChan[ChanGroup]) {
currChan = minChan[ChanGroup];
}
- osdnr.style.opacity = isFullscreen;
+ osdmain.style.opacity = isFullscreen;
OSDchannr(currChan);
}
@@ -320,7 +320,7 @@ function decChan(step) {
if (currChan < minChan[ChanGroup] ) {
currChan = maxChan[ChanGroup] ;
}
- osdnr.style.opacity = isFullscreen;
+ osdmain.style.opacity = isFullscreen;
OSDchannr(currChan);
}
@@ -858,7 +858,7 @@ function onKeyDown(event) {
case "BrowserBack":
if(count) {
count = 0;
- osdnr.style.opacity = 0;
+ osdmain.style.opacity = 0;
if(isFullscreen) {
showDisplay(currChan.toString(), false, 100, 0 );
}
@@ -948,7 +948,7 @@ function onKeyDown(event) {
if(isFullscreen) {
if(count) {
count = 0;
- osdnr.style.opacity = 0;
+ osdmain.style.opacity = 0;
showDisplay(currChan.toString(), false, 100, 0 );
Change = 0;
}
@@ -1069,7 +1069,7 @@ function onKeyDown(event) {
if(isFullscreen && Fav_max_channel !== 0) {
if(count) {
count = 0;
- osdnr.style.opacity = 0;
+ osdmain.style.opacity = 0;
showDisplay(currChan.toString(), false, 100, 0 );
Change = 0;
}
@@ -1218,7 +1218,7 @@ function onKeyDown(event) {
if(isFullscreen) {
if(count) {
count = 0;
- osdnr.style.opacity = 0;
+ osdmain.style.opacity = 0;
showDisplay(currChan.toString(), false, 100, 0 );
Change = 0;
}
@@ -1271,10 +1271,12 @@ function Read_Fav() {
function Makedigit() {
+ if (TimedChangeID != -1) { clearTimeout(TimedChangeID); TimedChangeID = -1; }
+
prevChan = currChan;
Change = (Change*10) + digit;
count += 1;
- osdnr.style.opacity = isFullscreen;
+ osdmain.style.opacity = isFullscreen;
OSDchannr(Change);
if(isFullscreen) {
showDisplay((Change.toString()), false, 100, 0 );
@@ -1283,7 +1285,10 @@ function Makedigit() {
if (count>channeldigits) {
CheckChannel(Change);
count = 0;
- }
+ } else {
+ TimedChangeID = setTimeout("TimedChange();",ChangeTime);
+ }
+
if(ChangeOK) {
if(isFullscreen) {
play(channels[currChan]);
@@ -1306,7 +1311,7 @@ function CheckChannel(CheckThis) {
if(prevChan == currChan) {
ChangeOK = 0 ;
}
- osdnr.style.opacity = 0;
+ osdmain.style.opacity = 0;
if(isFullscreen) {
showDisplay(currChan.toString(), false, 100, 0 );
}
@@ -1314,6 +1319,21 @@ function CheckChannel(CheckThis) {
}
+function TimedChange() {
+ if (count && ChangeTime) {
+ CheckChannel(Change);
+ count = 0;
+ if(ChangeOK) {
+ if(isFullscreen) {
+ play(channels[currChan]);
+ } else {
+ preview(channels[currChan]);
+ }
+ ChangeOK = 0;
+ }
+ }
+}
+
function showDisplay(showtxt,colonState,intensity,currentMode) {
if(!showClock){
@@ -1357,12 +1377,6 @@ function showVolume() {
function OSD(opacity) {
osdmain.style.opacity = opacity;
- osdnr.style.opacity = opacity;
- osdtime.style.opacity = opacity;
- osdname.style.opacity = opacity;
- osdepg.style.opacity = opacity;
- osdca.style.opacity = opacity;
- osdtimer.style.opacity = opacity;
}
@@ -2831,7 +2845,7 @@ if(menu == 1) { // settings menu
htmltext += "\n\n <font style='color:red;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[20];
htmltext += "<font style='color:green;'>\u25CF<font style='" + color_main_font + ";'> - " + VideoOutputModes_txt[VideoOutputModes[Set_Res]] + " ";
htmltext += "<font style='color:yellow;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[35];
- htmltext += "<font style='color:blue;'>\u25CF<font style='" + color_main_font + ";'> - " + Left(cssfile[css_nr].split("."),8) +"</pre>";
+ htmltext += "<font style='color:blue;'>\u25CF<font style='" + color_main_font + ";'> - " + Left(cssfile[css_nr].split(".")[0],8) +"</pre>";
// htmltext += "\n 0 -" + Lang[9] +"</pre>";
mainmenu.innerHTML = htmltext;
}
diff --git a/settings.js b/settings.js
index 63936f7..48ffd62 100644
--- a/settings.js
+++ b/settings.js
@@ -47,6 +47,7 @@ var fullupdate = 1; // If guideview is too slow, set it to 0 (for 1910/1960), fa
var ShowOsdTime = 5000; //Time to show OSD, in seconds * 1000
var ShowSetTimer = 3000; //Time to show set timer popup, in seconds * 1000
+var ChangeTime = 2000; // Time before the channel change happens (was only with OK)
var serverEPGdays = 3 * (60 * 60 * 24); // the higher the longer you wait while getting the epg info
@@ -271,6 +272,7 @@ var ProtectID = 0;
var SleepTimer = 0;
var SleepTimerID = -1;
var initialDelayPlayID = -1;
+var TimedChangeID = -1;
var instanttimer = new Array();
var inst_timer = 0;