diff options
Diffstat (limited to 'index.html')
-rw-r--r-- | index.html | 122 |
1 files changed, 59 insertions, 63 deletions
@@ -14,7 +14,6 @@ // // TODO // -// Sound mapping for AC3 // auto epg switch language for EIT Cache // // make VDR connection @@ -28,7 +27,7 @@ // // -var Version = "0.05 2012/12/24" +var Version = "0.06 2012/12/xx" var nrChannels = channels.length; var nrMedia = recording.length - 1; @@ -37,9 +36,12 @@ for (var i = 1; i < nrChannels; i++) { EPG[0][4][i] = "";EPG[1][4][i] = "";EPG[ window.onkeydown = onKeyDown; function onLoad() { - createPlayer(); + createPlayer(); + if(Experimental){ + // Space for testing experimental parts. createRecorder(); - embedTeletextPlugin(); + } + embedTeletextPlugin(); toi.audioOutputService.setVolume(AudioOut, StartVolume); toi.audioOutputService.setMuteState(AudioOut, false); showDisplay((currChan.toString()), false, 100, 0 ); @@ -124,15 +126,8 @@ function play(uri) { mediaPlayer.close(); } uri = ServerAdres + uri; - if(Experimental){ - //Space for testing experimental parts. - - - - } else { - mediaPlayer.open(uri); - mediaPlayer.play(1000); - } + mediaPlayer.open(uri); + mediaPlayer.play(1000); if(TimeShift){ initialDelayID = setTimeout("startTimeshiftBuffering();", 5000); @@ -172,28 +167,32 @@ function onDataAvailableEvent(event) { function updateStreamInfo() { -alert("What can this stream do : " + mediaPlayer.getCapabilities()); +//alert("What can this stream do : " + mediaPlayer.getCapabilities()); var streamInfo = mediaPlayer.getStreamInfo(); var cList = streamInfo.availableComponents; var x; +xx = 0; +AudioInfo[currChan] = ""; for(x=0; x<cList.length;x++) { -alert ("Read StreamINFO " + cList[x].type); +//alert ("Read StreamINFO " + cList[x].type); if(cList[x].type == 0) { - alert("language : " + mediaPlayer.getAudioStreamInfo(cList[x]).language); - alert("audienceType : " + mediaPlayer.getAudioStreamInfo(cList[x]).audienceType); - alert("channelFormat : " + mediaPlayer.getAudioStreamInfo(cList[x]).channelFormat); - alert("channelMode : " + mediaPlayer.getAudioStreamInfo(cList[x]).channelMode); - alert("encoding : " + mediaPlayer.getAudioStreamInfo(cList[x]).encoding); - alert("sublanguage : " + mediaPlayer.getAudioStreamInfo(cList[x]).sublanguage); - alert("sampleRate : " + mediaPlayer.getAudioStreamInfo(cList[x]).sampleRate); + xx = xx + 1; + AudioInfo[currChan] = AudioInfo[currChan] + " Audio " + xx + " " + mediaPlayer.getAudioStreamInfo(cList[x]).encoding + " - " + mediaPlayer.getAudioStreamInfo(cList[x]).language + " , "; +// alert("language : " + mediaPlayer.getAudioStreamInfo(cList[x]).language); +// alert("audienceType : " + mediaPlayer.getAudioStreamInfo(cList[x]).audienceType); +// alert("channelFormat : " + mediaPlayer.getAudioStreamInfo(cList[x]).channelFormat); +// alert("channelMode : " + mediaPlayer.getAudioStreamInfo(cList[x]).channelMode); +// alert("encoding : " + mediaPlayer.getAudioStreamInfo(cList[x]).encoding); +// alert("sublanguage : " + mediaPlayer.getAudioStreamInfo(cList[x]).sublanguage); +// alert("sampleRate : " + mediaPlayer.getAudioStreamInfo(cList[x]).sampleRate); } if(cList[x].type == 1) { - alert("aspectRatio : " + mediaPlayer.getVideoStreamInfo(cList[x]).aspectRatio); - alert("activeFormatDescriptor : " + mediaPlayer.getVideoStreamInfo(cList[x]).activeFormatDescriptor); - alert("frameRate : " + mediaPlayer.getVideoStreamInfo(cList[x]).frameRate); - alert("componentTag : " + mediaPlayer.getVideoStreamInfo(cList[x]).componentTag); - alert("resolutionX : " + mediaPlayer.getVideoStreamInfo(cList[x]).resolutionX); - alert("resolutionY : " + mediaPlayer.getVideoStreamInfo(cList[x]).resolutionY); +// alert("aspectRatio : " + mediaPlayer.getVideoStreamInfo(cList[x]).aspectRatio); +// alert("activeFormatDescriptor : " + mediaPlayer.getVideoStreamInfo(cList[x]).activeFormatDescriptor); +// alert("frameRate : " + mediaPlayer.getVideoStreamInfo(cList[x]).frameRate); +// alert("componentTag : " + mediaPlayer.getVideoStreamInfo(cList[x]).componentTag); +// alert("resolutionX : " + mediaPlayer.getVideoStreamInfo(cList[x]).resolutionX); +// alert("resolutionY : " + mediaPlayer.getVideoStreamInfo(cList[x]).resolutionY); } @@ -452,6 +451,8 @@ function onKeyDown(event) { if(isFullscreen) { // fullscreen if(!count) { + updateOSDtime(currChan); + osdepg.innerHTML = "<p>" + EPG[0][7][currChan] + "</p>\n<p>" + EPG[1][7][currChan] + "</p>"; showOSD(); } else { CheckChannel(Change); @@ -743,10 +744,37 @@ function OSDhtml(){ osdtime.innerHTML = result; osdname.innerHTML = Left(channelsnames[currChan],30); osdepg.innerHTML = "<p>" + EPG[0][7][currChan] + "</p>\n<p>" + EPG[1][7][currChan] + "</p>"; - osdepginfo.innerHTML = "<center><p style='color:white;' >" + currChan + "\uE003" + channelsnames[currChan] + "</p><p style='color:white;'>" + EPG[0][7][currChan] + "</p>\n<p style='color:yellow;'>" + EPG[0][4][currChan] + "</p>\n<p>" + Left(EPG[0][5][currChan],750) + "</p></center>"; + osdepginfo.innerHTML = "<center><p style='color:white;' >" + currChan + "\uE003" + channelsnames[currChan] + "</p>" + AudioInfo[currChan] + "<p style='color:white;'>" + EPG[0][7][currChan] + "</p>\n<p style='color:yellow;'>" + EPG[0][4][currChan] + "</p>\n<p>" + Left(EPG[0][5][currChan],750) + "</p></center>"; osdepginfonext.innerHTML = "<center><p style='color:white;'>" + currChan + "\uE003" + channelsnames[currChan] + "</p><p style='color:white;'>" + EPG[1][7][currChan] + "</p>\n<p style='color:yellow;'>" + EPG[1][4][currChan] + "</p>\n<p>" + Left(EPG[1][5][currChan],750) + "</p></center>"; } +function updateOSDtime(timchan) { + + tijd = EPG[0][2][timchan]; + date = new Date(tijd*1000); + tijd = date.toUTCString(); + tijd = new Date(tijd); + dateCurrent = new Date(); + var EPGminutes = Math.floor((dateCurrent.getTime() - date.getTime()) /1000/60); + var tm = tijd.getMinutes(); + var th = tijd.getHours(); + if(th<10) + { + th = "0"+th; + } + if(tm<10) + { + tm = "0"+tm; + } + + EPG[0][7][timchan] = th + ":" + tm + " (" + EPGminutes + " / " + ((EPG[0][3][timchan])-EPGminutes).toFixed(0) + ")" + " " + EPG[0][1][timchan] + " "; + if (!EPG[0][2][timchan]) + { + EPG[0][7][timchan] = " "; + } + +} + function settimer() { if(SwitchTimer) { @@ -875,7 +903,6 @@ function GetEPG(epgchan) EPG[1][7][epgchan] = ""; EPGShortnext = ""; EPGExtnext = ""; - cds = 0; SI=""; try { @@ -915,33 +942,7 @@ function GetEPG(epgchan) } else { EPG[0][5][epgchan] = ""; } - tijd = event.time; - date = new Date(tijd*1000); - tijd = date.toUTCString(); - tijd = new Date(tijd); - dateCurrent = new Date(); - var EPGminutes = Math.floor((dateCurrent.getTime() - date.getTime()) /1000/60); - var tm = tijd.getMinutes(); - var th = tijd.getHours(); - if(th<10) - { - th = "0"+th; - } - if(tm<10) - { - tm = "0"+tm; - } - if(cds){ - // CDS has short info, other providers, a little longer. - EPG[0][7][epgchan] = th + ":" + tm + " (" + EPGminutes + " / " + ((event.duration/60)-EPGminutes).toFixed(0) + ")" + " " + event.name + " " + EPGShortnow; - } else { - EPG[0][7][epgchan] = th + ":" + tm + " (" + EPGminutes + " / " + ((event.duration/60)-EPGminutes).toFixed(0) + ")" + " " + event.name + " "; - } - if (!event.time) - { - EPG[0][7][epgchan] = " "; - } - + updateOSDtime(epgchan); event = eitCache.getFollowingEvent(eitService); if (Extok) { @@ -987,12 +988,8 @@ function GetEPG(epgchan) tm = "0"+tm; } - if(cds){ - // CDS has short info, other providers, a little longer. - EPG[1][7][epgchan] = th + ":" + tm + " (" + (event.duration/60).toFixed(0) + ")" + " " + event.name + " " + EPGShortnext; - } else { EPG[1][7][epgchan] = th + ":" + tm + " (" + (event.duration/60).toFixed(0) + ")" + " " + event.name + " "; - } + if (!event.time) { EPG[1][7][epgchan] = " "; @@ -1097,7 +1094,6 @@ function StreamInfo(si) { if(SI[1]=="3" || SI[1]=="53") { //Canal Digitaal/ TV Vlaanderen (NID:3 is used for more than only CDS/TVV on 23East) is.setObject("cfg.locale.ui","dut",is.STORAGE_VOLATILE); - cds = 1; } if((SI[0]=="S13.0E" && SI[3]=="14003") || (SI[0]=="S13.0E" && SI[3]=="14009") || (SI[0]=="S13.0E" && SI[3]=="14051") || (SI[0]=="S13.0E" && SI[3]=="951")) { |