From 020fe0a4d0613a7f34b1af30508334c50fa323a3 Mon Sep 17 00:00:00 2001 From: "M. Voerman" Date: Wed, 19 Dec 2012 01:26:53 +0100 Subject: Fixed some bugs in the now/next info. --- portal-html/History | 3 ++ portal-html/index.html | 77 ++++++++++++++++++++++++++++++++++--------------- portal-html/settings.js | 1 + 3 files changed, 58 insertions(+), 23 deletions(-) diff --git a/portal-html/History b/portal-html/History index bc4b2f8..152fd89 100644 --- a/portal-html/History +++ b/portal-html/History @@ -2,6 +2,9 @@ Media Player added. Only Play/ Pause & FF, no REW. OSD made for 576i !! + Bugfix EPG info, now it should show the now/next info of the current channel. + + Split portal into webkit (html) and svg version 0.03 Release date 2012/12/13 Try to fix Teletext crash. diff --git a/portal-html/index.html b/portal-html/index.html index 7c658bd..055c9f2 100644 --- a/portal-html/index.html +++ b/portal-html/index.html @@ -94,6 +94,7 @@ function play(uri) { showOSD(); } showDisplay((currChan.toString()), false, 100, 0 ); + GetEPG(currChan); } catch (e) { alert("Failed opening stream: " + e); return; @@ -266,10 +267,19 @@ function onKeyDown(event) { case "Yellow": if(isFullscreen) { if(!epgactive) { - GetSchedule(currChan,15); - schedule.style.opacity = 1; - schedule.style.height = "75%"; - setTimeout("schedule.style.opacity = 0;schedule.style.height = '45%';", 3000); + if(!isSchedule) { + schedule.style.zIndex = 505; + schedule.style.opacity = 1; + schedule.style.height = "75%"; + GetSchedule(currChan,15); + isSchedule = 1; + } else { + isSchedule = 0; + schedule.style.zIndex = 450; + schedule.style.opacity = 0; + schedule.style.height = "45%"; + } +// setTimeout("schedule.style.opacity = 0;schedule.style.height = '45%';schedule.style.zIndex = 450;", 3000); } } else { GetSchedule(currChan,10); @@ -301,11 +311,17 @@ function onKeyDown(event) { } else { if(isFullscreen) { //SHOW epg info - SetOsdInfo(); - osdepginfo.style.opacity = 1; - osdepginfonext.style.opacity = 0; - epgactive = 1; - setTimeout("epgactive = 0; osdepginfo.style.opacity = 0; osdepginfonext.style.opacity = 0;", 5000); + if(!epgactive){ + SetOsdInfo(); + osdepginfo.style.opacity = 1; + osdepginfonext.style.opacity = 0; + epgactive = 1; + } else { + osdepginfo.style.opacity = 0; + osdepginfonext.style.opacity = 0; + epgactive = 0; + } +// setTimeout("epgactive = 0; osdepginfo.style.opacity = 0; osdepginfonext.style.opacity = 0;", 5000); } else if(!isFullscreen){ isFullscreen = 1; FullScreen(); @@ -561,14 +577,15 @@ function OSD(opacity) { function SetOsdInfo() { OSDchannr(currChan); date_time(); - GetEPG(currChan); +// GetEPG(currChan); OSDhtml(); return; } function onCacheUpdated() { + GetEPG(currChan); if (osdtimeout) { - GetEPG(currChan); +// GetEPG(currChan); SetOsdInfo(); } // if (!isFullscreen) { @@ -588,8 +605,8 @@ function OSDhtml(){ osdtime.innerHTML = "" + result +""; osdname.innerHTML = "" + Left(channelsnames[currChan],30) + ""; osdepg.innerHTML = "

" + EPG[0][7][currChan] + "

\n

" + EPG[1][7][currChan] + "

"; - osdepginfo.innerHTML = "

" + EPG[0][7][currChan] + "

\n

" + EPG[0][4][currChan] + "

\n

" + Left(EPG[0][5][epgchan],750) + "

"; - osdepginfonext.innerHTML = "

" + EPG[1][7][currChan] + "

\n

" + EPG[1][4][currChan] + "

\n

" + Left(EPG[1][5][epgchan],750) + "

"; + osdepginfo.innerHTML = "

" + EPG[0][7][currChan] + "

\n

" + EPG[0][4][currChan] + "

\n

" + Left(EPG[0][5][currChan],750) + "

"; + osdepginfonext.innerHTML = "

" + EPG[1][7][currChan] + "

\n

" + EPG[1][4][currChan] + "

\n

" + Left(EPG[1][5][currChan],750) + "

"; } @@ -743,16 +760,13 @@ function GetEPG(epgchan) osdca.innerHTML = "\uE00F"; } - if (event.name) - { + if (event.name) { events = eitCache.getEvents(eitService, 1000000000, 2000000000); extEventsnow = eitCache.getExtendedEventInfo(eitService, events.infoSequence[0].eventId); - extEventsnext = eitCache.getExtendedEventInfo(eitService, events.infoSequence[1].eventId); EPGShortnow = extEventsnow.shortInfo; - EPGShortnext = extEventsnext.shortInfo; EPGExtnow = extEventsnow.extendedInfo; - EPGExtnext = extEventsnext.extendedInfo; - } + Extok = 1; + } else { Extok = 0; } EPG[0][1][epgchan] = event.name; EPG[0][2][epgchan] = event.time; @@ -762,11 +776,14 @@ function GetEPG(epgchan) if(EPGShortnow) { EPG[0][4][epgchan] = EPGShortnow; + } else { + EPG[0][4][epgchan] = ""; } if(EPGExtnow) { EPG[0][5][epgchan] = EPGExtnow; + } else { + EPG[0][5][epgchan] = ""; } - tijd = event.time; date = new Date(tijd*1000); tijd = date.toUTCString(); @@ -796,6 +813,15 @@ function GetEPG(epgchan) event = eitCache.getFollowingEvent(eitService); + if (Extok) { + for (var i = 0; i < events.infoSequence.length && i < 4; i++) { + extEvents = eitCache.getExtendedEventInfo(eitService, events.infoSequence[i].eventId); + if (extEvents.eventId == event.eventId) { + EPGShortnext = extEvents.shortInfo; + EPGExtnext = extEvents.extendedInfo; + } + } + } EPG[1][1][epgchan] = event.name; EPG[1][2][epgchan] = event.time; @@ -803,13 +829,18 @@ function GetEPG(epgchan) EPG[1][4][epgchan] = ""; EPG[1][5][epgchan] = ""; + + if(EPGShortnext) { EPG[1][4][epgchan] = EPGShortnext; + } else { + EPG[1][4][epgchan] = ""; } if(EPGExtnext) { EPG[1][5][epgchan] = EPGExtnext; + } else { + EPG[1][5][epgchan] = ""; } - tijd = event.time; date = new Date(tijd*1000); tijd = date.toUTCString(); @@ -895,7 +926,7 @@ function GetSchedule(schchan,tablelength){ txt = txt + "" + th + ":" + tm + " (" + events.infoSequence[i].duration/60 + ") " + events.infoSequence[i].name + ""; } txt = txt + ""; - schedule.innerHTML = channelsnames[schchan] + txt; + schedule.innerHTML = "" + schchan + "\uE003" + channelsnames[schchan] + "" + txt; } else { schedule.innerHTML = "

" + channelsnames[schchan] + "

"; } @@ -1366,7 +1397,7 @@ function ShowMediaOSD() {
-
+
----- Next Schedule INFO
diff --git a/portal-html/settings.js b/portal-html/settings.js index fc3737e..415b237 100644 --- a/portal-html/settings.js +++ b/portal-html/settings.js @@ -42,6 +42,7 @@ var isSchedule = 0; var mediaPlayer = null; var Change = 0; var ChangeOK = 0; +var Extok = 0; var count = 0; var KEY_0 = "U+0030"; var KEY_1 = "U+0031"; -- cgit v1.2.3