diff options
author | M. Voerman <rekordc@gmail.com> | 2014-12-04 18:43:40 +0100 |
---|---|---|
committer | M. Voerman <rekordc@gmail.com> | 2014-12-04 18:43:40 +0100 |
commit | 77ba23bf2a336961b8b2e17b0abacda3987742c4 (patch) | |
tree | 396233959fe9373a148c3be9233ac0a7c1f127c1 /javascript/guide_view.js | |
parent | 2689ef0fa959cc2090008d0ebbc79bdcc1831d25 (diff) | |
download | vdr-vipclient-77ba23bf2a336961b8b2e17b0abacda3987742c4.tar.gz vdr-vipclient-77ba23bf2a336961b8b2e17b0abacda3987742c4.tar.bz2 |
Added MAC address based config file.
Renamed settings2
Diffstat (limited to 'javascript/guide_view.js')
-rw-r--r-- | javascript/guide_view.js | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/javascript/guide_view.js b/javascript/guide_view.js new file mode 100644 index 0000000..f20693f --- /dev/null +++ b/javascript/guide_view.js @@ -0,0 +1,148 @@ + +var fsList; var fsSchedList; var fsSched; + +var color_bg = "#fc5"; +var color_sched_head = "color:white"; +var color_sched_font = "color:black"; + +//var color_progress1 = "<font color=red>"; +//var color_progress2 = "<font color=white>"; + + +function setOSDscale() { + fsList = "34px"; //1080 = 34, 720 = 23, 576 = 18 + fsSchedList = "34px"; //1080 = 34, 720 = 23, 576 = 18 + fsSched = "49px"; //1080 = 49, 720 = 33, 576 = 26 +} + + +function GuideView_start() { + NowNext = 0; + videoplane.style.width = "44%"; + videoplane.style.height = "42%"; + videoplane.style.left = "53%"; + videoplane.style.top = "52%"; + isFullscreen = 0; + ClearScreen(); + channellist.style.opacity = 1; + colorkeys.innerHTML = "<pre class=colorkeys" + cssres[css_nr][Set_Res] + ">" + "<span class=redkey> " + + NN[3 + (1 - NowNext)] + " </span><span class=greenkey > " + + NN[1 - NowNext] + " </span><span class=yellowkey> " + NN[2] + " </span><span class=bluekey> " + + NN[5] + " </span></pre>"; + colorkeys.style.opacity = 1; + showChannelList(); + if(!SwitchGuide) { + preChan = currChan; + preGrp = ChanGroup; + } +} + +function GuideView_end() { + isSchedule = 0; + schedule.style.opacity = 0; + isFullscreen = 1; + FullScreen(); + if(!SwitchGuide) { + currChan = preChan; + ChanGroup = preGrp; + } +} + + + +function GetSchedule(schchan,tablelength){ + //Old style Schedule, used in Guide View. + SI = ""; + try { + StreamInfo(schchan); + + eitService = toi.statics.ToiDvbEitCacheServiceItem.create(SI[1],SI[2],SI[3]); + eitCache.addService(eitService); + event = eitCache.getPresentEvent(eitService); + events = eitCache.getEvents(eitService, (Math.round(new Date().getTime()/1000.0)), 2000000000); + + if (event.name) { + if (events.more) { + var t = eitCache.getEvents(eitService, (Math.round(new Date().getTime()/1000.0)), 2000000000); + events.infoSequence.concat(t.infoSequence); + events.more = t.more; + } + + var txt = "<table><tr>"; + var i = 0; + for (i = 0; i < events.infoSequence.length && i < tablelength; i++) { + + while ((i > 0) && (events.infoSequence[i].eventId == events.infoSequence[(i-1)].eventId)) { + i = i + 1; + } + + tijd = events.infoSequence[i].time; + date = new Date(tijd*1000); + tijd = date.toUTCString(); + tijd = new Date(tijd); + var tm = tijd.getMinutes(); + var th = tijd.getHours(); + th=addzero(th); + tm=addzero(tm); + + txt = txt + "<td style='font-size:" + fsSchedList + ";" + color_sched_font + ";'>\uE003\uE003\uE003\uE003\uE003" + th + ":" + tm + " (" + (events.infoSequence[i].duration/60).toFixed(0) + ") " + Left(events.infoSequence[i].name,30) + "</td></tr>"; + } + txt = txt + "</table>"; + schedule.innerHTML = "<p style='" + color_sched_head + ";font-size:" + fsSched + ";'>" + "\uE003" + schchan + "\uE003" + channelsnames[schchan] + txt + "</p>"; + } else { + schedule.innerHTML = "<p style='" + color_sched_head + ";font-size:" + fsSched + ";'>" + "\uE003" + schchan + "\uE003" + channelsnames[schchan] + "</p>"; + } + + } catch(e) { + alert("Get EPG problem: " + e); + schedule.innerHTML = "<p style='" + color_sched_head + ";font-size:" + fsSched + ";'>" + "\uE003" + schchan + "\uE003" + channelsnames[schchan] + "</p><p>" + Lang[6] + "</p>"; + } + +} + + +// Channelslist / EPG Guide +// +// show currchan - 5 +// highlite currchan +// show currchan + 5 +// +// check if chan is OK +// +function showChannelList() { + var liststyle = ""; + var htmlstring = "<table border='0'><tr>"; + listChan = currChan-5; + for(var i=currChan-5; i<=currChan+5; i++) { + do + { + listChan += 1; + if (listChan<minChan[ChanGroup]) { + listChan=maxChan[ChanGroup]; + } + if (listChan>maxChan[ChanGroup]) { + listChan=minChan[ChanGroup]; + } + } + + while (!channels[listChan] && (listChan<maxChan[ChanGroup])); + if (fullupdate) { GetEPG(listChan); } + if ( listChan == currChan) { + if (!fullupdate) { GetEPG(listChan); } + liststyle = "background:" + color_bg + ";"; + } else { + liststyle = ""; + } + EpgInfo[0] = EPG[0][7][listChan]; + EpgInfo[1] = EPG[1][7][listChan]; + htmlstring = htmlstring + "<td style='" + liststyle + "font-size:" + fsList + ";'>\uE003\uE003" + listChan + "\uE003</td><td style='" + liststyle + "font-size:" + fsList + ";'>" + Left(channelsnames[listChan],15) + "\uE003</td><td style='" + liststyle + "font-size:" + fsList + ";'>" + Left(EpgInfo[NowNext],64) + "</td></tr>"; + } + htmlstring = htmlstring + "</table>"; + channellist.innerHTML = htmlstring; + chanlistepg.innerHTML = "<p class=epg" + cssres[css_nr][Set_Res] + ">" + EPG[NowNext][1][currChan] + "</p><p class=list" + cssres[css_nr][Set_Res] + ">" + Left(EPG[NowNext][4][currChan],250) + "</p>" ; + +} + + +// END of Channelslist / EPG Guide + |