From bc8c624294d0413299d69f263da9b14b0f11146c Mon Sep 17 00:00:00 2001 From: "M. Voerman" Date: Thu, 5 Jun 2014 01:12:34 +0200 Subject: Update for delayed zap --- History | 2 +- index.html | 18 +++++++++++------- settings.js | 6 +++++- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/History b/History index f566837..ce1d4cf 100644 --- a/History +++ b/History @@ -22,7 +22,7 @@ VDR 1.7.29+ Updated channels script, now adds timestamp to list which is shown in info menu. EPG Mode can be set (Now/Next only or Full EPG from stream) Client for MPD (http://www.musicpd.org/) turned off by default (settings.js) - Timeout before playing the stream. Some times after fast zapping you get an connection error. Now play has 500 ms delay. + Timeout before playing the stream. Some times after fast zapping you get an connection error. Now play has 300 ms delay. support for reccmds.conf (max 9 options can be used) and must be enabled in smarttvweb plugin in recordings menu key_1 selects reccmds.conf option 1 (In my case move to other HDD script) diff --git a/index.html b/index.html index b9d3cb6..dbece5a 100644 --- a/index.html +++ b/index.html @@ -467,14 +467,13 @@ function play(uri) { uri = ServerAdres[ChanGroup] + uri; } - mediaPlayer.open(uri); - if (initialDelayPlayID != -1) { clearTimeout(initialDelayPlayID); initialDelayPlayID = -1; } - initialDelayPlayID = setTimeout("mediaPlayer.play(1000);GetEPG(currChan);",500); + URL = uri; + initialDelayPlayID = setTimeout("mediaPlayer.open(URL);mediaPlayer.play(1000);GetEPG(currChan);",initialDelayPlay); SetLed(1,1,0); if(TimeShift){ @@ -494,7 +493,7 @@ function play(uri) { //Show info if set nonfree switchtimer.innerHTML = "
\n" + Lang[90] +"\n\n
"; // Non free channel message switchtimer.style.opacity = 1; - CAdelayID = setTimeout("switchtimer.style.opacity = 0; ", (ShowSetTimer + ShowOsdTime) ); + CAdelayID = setTimeout("switchtimer.style.opacity = 0; ",ShowSetTimer); } } @@ -856,6 +855,7 @@ function onKeyDown(event) { epgactive = 0; } mediaList.style.opacity = 0.9; + set_yellow_key = 1; setTimeout("getSchedule(currChan);LoadMediaSettings();",100); } else { GetSchedule(currChan,15); @@ -3307,6 +3307,7 @@ function UnloadMediaSettings() { isMediaMenu = 0; isFullscreen = 1; isPause = 0; + set_yellow_key = 0; if (mediaPlayer.getState() != mediaPlayer.STATE_PLAYING ) { play(channels[currChan]); } @@ -3336,12 +3337,15 @@ if (DelisOK) { break; } if (osdepginfo.style.opacity == 1) { osdepginfo.style.opacity = 0; break; } - case "Yellow": - //hide/display schedule with same button case "TV": UnloadMediaSettings(); break; - break; + case "Yellow": + if (set_yellow_key) { + //hide/display schedule with same button + UnloadMediaSettings(); + } + break; case "Right": if (getRecOK !== 0) { for (var i=0;i<10;i++) { diff --git a/settings.js b/settings.js index 2c70ccd..8acabe6 100644 --- a/settings.js +++ b/settings.js @@ -2,7 +2,7 @@ // Default settings // -var Version = "0.24.19"; +var Version = "0.24.21"; server_ip_array = new Array("http://192.168.1.15","http://192.168.3.15","http://192.168.3.100","http://192.168.178.19","http://192.168.1.21"); @@ -346,3 +346,7 @@ minChan[Fav_group] = Fav_base + 1; // var Chan_Ver = "Not set"; var Fav_key1; +var set_yellow_key = 0; +var URL; +var initialDelayPlay = 300; // wait 300 ms before zap to next channel; + -- cgit v1.2.3