summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--History4
-rw-r--r--channels5.js18
-rw-r--r--index.html270
-rw-r--r--settings.js82
4 files changed, 226 insertions, 148 deletions
diff --git a/History b/History
index dba1fb4..d4120a2 100644
--- a/History
+++ b/History
@@ -1,7 +1,7 @@
0.11 Switch to Scheduler services for settings timers.
Some fixes in the recorder & player routine
- Better support for "VDR on SmartTV"
-
+ Better support for "VDR on SmartTV" & check if availible.
+ Lot of small fixes and changes.
0.10 Added sub Listinges for use as Radio list / Protected List / SD/HD list etc
(Use for Multicast Channels keyword MultiCast in Serveradres)
diff --git a/channels5.js b/channels5.js
index 8360e23..1d43d42 100644
--- a/channels5.js
+++ b/channels5.js
@@ -3,21 +3,21 @@
//
channelsnames[5001] = "NED1 (S)";
-channels[5001] = "S19.2E-53-1105-4011-0.1";
+channels[5001] = "S19.2E-53-1105-4011-239.255.0.1:11111";
channelsnames[5002] = "NED2 (S)";
-channels[5002] = "S19.2E-53-1105-4012-0.2";
+channels[5002] = "S19.2E-53-1105-4012-239.255.0.2:11111";
channelsnames[5003] = "NED3 (S)";
-channels[5003] = "S19.2E-53-1105-4013-0.3";
+channels[5003] = "S19.2E-53-1105-4013-239.255.0.3:11111";
channelsnames[5004] = "RTL4 (S)";
-channels[5004] = "S19.2E-53-1097-2004-0.4";
+channels[5004] = "S19.2E-53-1097-2004-239.255.0.4:11111";
channelsnames[5005] = "RTL5 (S)";
-channels[5005] = "S19.2E-53-1097-2005-0.5";
+channels[5005] = "S19.2E-53-1097-2005-239.255.0.5:11111";
channelsnames[5006] = "SBS6 (S)";
-channels[5006] = "S19.2E-53-1105-4002-0.6";
+channels[5006] = "S19.2E-53-1105-4002-239.255.0.6:11111";
channelsnames[5007] = "RTL7 (S)";
-channels[5007] = "S19.2E-53-1097-2006-0.7";
+channels[5007] = "S19.2E-53-1097-2006-239.255.0.7:11111";
channelsnames[5008] = "Veronica/DisneyXD (S)";
-channels[5008] = "S19.2E-53-1097-2031-0.8";
+channels[5008] = "S19.2E-53-1097-2031-239.255.0.8:11111";
channelsnames[5009] = "NET5 (S)";
-channels[5009] = "S19.2E-53-1105-4003-0.9";
+channels[5009] = "S19.2E-53-1105-4003-239.255.0.9:11111";
diff --git a/index.html b/index.html
index 577607e..9fdc59c 100644
--- a/index.html
+++ b/index.html
@@ -24,7 +24,7 @@
//
//
-var Version = "0.10 2013/01/xx"
+var Version = "0.11 2013/01/xx"
for (var i = minChan[0]; i < (maxChan[0]+1); i++) { EPG[0][4][i] = "";EPG[1][4][i] = "";EPG[0][5][i] = "";EPG[1][5][i] = "";EPG[0][7][i] = "";EPG[1][7][i] = ""; }
for (var i = minChan[1]; i < (maxChan[1]+1); i++) { EPG[0][4][i] = "";EPG[1][4][i] = "";EPG[0][5][i] = "";EPG[1][5][i] = "";EPG[0][7][i] = "";EPG[1][7][i] = ""; }
@@ -92,8 +92,6 @@ function onUnload() {
eitCache.removeEventListener(eitCache.ON_CACHE_UPDATED, onCacheUpdated);
mediaPlayer.removeEventListener(mediaPlayer.ON_DATA_AVAILABLE,onDataAvailableEvent);
mediaRecorder.removeEventListener(mediaRecorder.ON_STATE_CHANGED, onRecorderStateChanged);
- mediaRecorder.removeEventListener(mediaRecorder.ON_PARAMETER_CHANGED, onRecorderStateChanged);
-
} catch(e) {
alert(e);
@@ -147,7 +145,7 @@ function play(uri) {
if (ServerAdres[ChanGroup] == "MultiCast" ) {
SI=channels[currChan].split("-");
- uri = "239.255." + SI[4] + ":11111";
+ uri = SI[4];
} else {
uri = ServerAdres[ChanGroup] + uri;
}
@@ -536,10 +534,12 @@ function onKeyDown(event) {
OSD(opacity);
break;
}
+ osdepg.innerHTML = "";
+ showOSD();
GetEPG(currChan);
updateOSDtime(currChan);
osdepg.innerHTML = "<p>" + EPG[0][7][currChan] + "</p>\n<p>" + EPG[1][7][currChan] + "</p>";
- showOSD();
+// showOSD();
} else {
CheckChannel(Change);
count = 0;
@@ -605,10 +605,12 @@ function onKeyDown(event) {
case "RADIO":
if(ChanGroup !== 9) {
//Radio
+ defChan[ChanGroup] = currChan;
ChanGroup = 9;
currChan = defChan[9];
} else {
//TV
+ defChan[ChanGroup] = currChan;
ChanGroup = 0;
currChan = defChan[0];
}
@@ -713,7 +715,7 @@ function onKeyDown(event) {
} else {
try {
SetLed(1,1,0);
- mediaPlayer.playFromPosition(mediaPlayer.POSITION_LIVE,mediaPlayer.PACE_PLAY);
+ if(TimeShift){ mediaPlayer.playFromPosition(mediaPlayer.POSITION_LIVE,mediaPlayer.PACE_PLAY); }
} catch(e) {
alert(e);
}
@@ -721,11 +723,23 @@ function onKeyDown(event) {
break;
case KEY_REC:
case "MediaRecord":
+//
+//
+// if(isFullscreen) you're in guidemode, record = set timer for current item.
+//
+// if not in guidemode, set timer for current channel for x minutes, (default 180?)
+// if isRecording == 1 show REC icon E00B else E003
+//
+
if (isRecording == 1) {
- recordStop();
+ recordStop();
} else {
- createNewAsset();
- recordStart(ServerAdres + channels[currChan]);
+ if (ServerAdres[ChanGroup] == "MultiCast" ) {
+ SI=channels[currChan].split("-");
+ recordStart(SI[4]);
+ } else {
+ recordStart = (ServerAdres[ChanGroup] + channels[currChan]);
+ }
}
break;
@@ -880,7 +894,7 @@ function updateOSDtime(timchan) {
}
EPG[0][7][timchan] = th + ":" + tm + " (" + EPGminutes + " / " + ((EPG[0][3][timchan])-EPGminutes).toFixed(0) + ")" + " " + EPG[0][1][timchan] + " ";
- if (!EPG[0][2][timchan])
+ if (!EPG[0][2][timchan] || ((EPG[0][3][timchan]-EPGminutes) < 0))
{
EPG[0][7][timchan] = " ";
}
@@ -945,12 +959,12 @@ function setOSDtimer() {
osdtimer.innerHTML = "<p style='color:black;font-size:" + fsList + ";'>" + th + ":" + tm + "</p>";
SetLed(0,2,1);
switchicon = "\uE00C";
- osdca.innerHTML = CAicon + switchicon;
+ osdca.innerHTML = CAicon + switchicon + RECicon;
} else {
osdtimer.innerHTML = " ";
SetLed(0,0,0);
switchicon = '\uE003';
- osdca.innerHTML = CAicon + switchicon;
+ osdca.innerHTML = CAicon + switchicon + RECicon;
}
}
@@ -1060,7 +1074,7 @@ function GetEPG(epgchan)
CAicon = "\uE00F";
}
- osdca.innerHTML = CAicon + switchicon;
+ osdca.innerHTML = CAicon + switchicon + RECicon;
if (event.name) {
events = eitCache.getEvents(eitService, 1000000000, 2000000000);
extEventsnow = eitCache.getExtendedEventInfo(eitService, events.infoSequence[0].eventId);
@@ -1141,6 +1155,7 @@ function GetEPG(epgchan)
} catch(e) {
alert("Get EPG problem: " + e);
+ CAicon = "\uE01A";
}
}
@@ -1445,11 +1460,13 @@ function onKeyMenu(keyCode) {
switch(keyCode) {
case "BrowserBack":
if (menu !== 0) {
+ if (menu == 3 ) { isFullscreen = 0; play(channels[currChan]); isFullscreen = 1; }
menu = 0;
InitMenu(menu);
break;
}
case "Menu":
+ if (menu == 3 ) { play(channels[currChan]); }
isSetupMenu = 0;
mainmenu.style.opacity = 0;
break;
@@ -1491,43 +1508,15 @@ function onKeyMenu(keyCode) {
}
break;
case "Red":
- if (menu == 1) {
- if(showClock == 0 ) {
- showDisplay("", true, 80, 1 );
- showClock = 1;
- } else if(showClock == 1 ) {
- showClock = 0;
- showDisplay((currChan.toString()), false, 100, 0 );
- }
- }
- InitMenu(menu);
break;
case "Green":
- if (menu == 1) {
- audio = audio + 1;
- is = toi.informationService;
- if(audio == 1) {
- is.setObject("cfg.media.audio.languagepriority","dut,eng",is.STORAGE_VOLATILE);
- } else if(audio == 2) {
- is.setObject("cfg.media.audio.languagepriority","ger,deu,eng",is.STORAGE_VOLATILE);
- } else if(audio == 3) {
- is.setObject("cfg.media.audio.languagepriority","eng",is.STORAGE_VOLATILE);
- audio = 0;
- }
- }
- InitMenu(menu);
break;
case "Yellow":
break;
case "Blue":
- if (menu == 1) {
- if(SwitchGuide == 0 ) {
- SwitchGuide = 1;
- } else if(SwitchGuide == 1 ) {
- SwitchGuide = 0;
+ if (menu == 0) {
+ RestartPortal();
}
- }
- InitMenu(menu);
break;
case "MediaRewind":
break;
@@ -1559,10 +1548,10 @@ function onKeyMenu(keyCode) {
if (menu == 1) {
is = toi.informationService;
if(substype == 0 ) {
- is.setObject("cfg.media.subtitling.typepriority","hearing_impaired,normal",is.STORAGE_VOLATILE);
+ is.setObject("cfg.media.subtitling.typepriority","hearing_impaired",is.STORAGE_VOLATILE);
substype = 1;
} else {
- is.setObject("cfg.media.subtitling.typepriority","normal,hearing_impaired",is.STORAGE_VOLATILE);
+ is.setObject("cfg.media.subtitling.typepriority","normal",is.STORAGE_VOLATILE);
substype = 0;
}
}
@@ -1590,9 +1579,9 @@ function onKeyMenu(keyCode) {
audiotype = audiotype + 1;
is = toi.informationService;
if(audiotype == 1) {
- is.setObject("cfg.media.audio.typepriority","normal,hearing_impaired,visually_impaired",is.STORAGE_VOLATILE);
+ is.setObject("cfg.media.audio.typepriority","normal",is.STORAGE_VOLATILE);
} else if(audiotype == 2) {
- is.setObject("cfg.media.audio.typepriority","hearing_impaired,visually_impaired",is.STORAGE_VOLATILE);
+ is.setObject("cfg.media.audio.typepriority","hearing_impaired",is.STORAGE_VOLATILE);
} else if(audiotype == 3) {
is.setObject("cfg.media.audio.typepriority","visually_impaired",is.STORAGE_VOLATILE);
audiotype = 0;
@@ -1601,18 +1590,39 @@ function onKeyMenu(keyCode) {
InitMenu(menu);
break;
case KEY_5:
- if (menu == 1) {
- ShowProtectedChannels = 1 - ShowProtectedChannels;
- InitMenu(menu);
+ if (menu == 1) {
+ audio = audio + 1;
+ is = toi.informationService;
+ if(audio == 1) {
+ is.setObject("cfg.media.audio.languagepriority","dut,eng",is.STORAGE_VOLATILE);
+ } else if(audio == 2) {
+ is.setObject("cfg.media.audio.languagepriority","ger,deu,eng",is.STORAGE_VOLATILE);
+ } else if(audio == 3) {
+ is.setObject("cfg.media.audio.languagepriority","eng,swe",is.STORAGE_VOLATILE);
+ audio = 0;
+ }
}
+ InitMenu(menu);
break;
case KEY_6:
+ if (menu == 1) {
+ if(showClock == 0 ) {
+ showDisplay("", true, 80, 1 );
+ showClock = 1;
+ } else if(showClock == 1 ) {
+ showClock = 0;
+ showDisplay((currChan.toString()), false, 100, 0 );
+ }
+ }
+ InitMenu(menu);
break;
case KEY_7:
+ if (menu == 1) {
+ ShowProtectedChannels = 1 - ShowProtectedChannels;
+ InitMenu(menu);
+ }
break;
case KEY_8:
- break;
- case KEY_9:
if (menu == 0) {
isSetupMenu = 0;
mediaList.style.opacity = 0.9;
@@ -1620,36 +1630,93 @@ function onKeyMenu(keyCode) {
getRecList2();
LoadMediaSettings();
}
+
+ if (menu == 1) {
+ if(SwitchGuide == 0 ) {
+ SwitchGuide = 1;
+ } else if(SwitchGuide == 1 ) {
+ SwitchGuide = 0;
+ }
+ }
+ InitMenu(menu);
break;
- case KEY_0:
+ case KEY_9:
if (menu == 0) {
- RestartPortal();
- } else {
+ menu = 3;
+ playMPD(MPDAddress);
+ InitMenu(menu);
+ }
+ break;
+ case KEY_0:
+ if (menu !== 0) {
+ if (menu == 3 ) { isFullscreen = 0; play(channels[currChan]); isFullscreen = 1; }
menu = 0;
InitMenu(menu);
}
break;
+ case "VolumeMute":
+ state = toi.audioOutputService.getMuteState(AudioOut);
+ toi.audioOutputService.setMuteState(AudioOut, !state);
+ mute = 1 - state;
+ osdmute.style.opacity = mute;
+ break;
+ case "VolumeUp":
+ Volume = Volume + 10;
+ if (Volume > 100) {
+ Volume = 100;
+ }
+ toi.audioOutputService.setVolume(AudioOut, Volume);
+ break;
+ case "VolumeDown":
+ Volume = Volume - 10;
+ if (Volume < 0) {
+ Volume = 0;
+ }
+ toi.audioOutputService.setVolume(AudioOut, Volume);
+ break;
default:
break;
}
}
+
+function playMPD(uri) {
+ try {
+ if (mediaPlayer.getState() != mediaPlayer.STATE_IDLE) {
+ mediaPlayer.close();
+ }
+ mediaPlayer.open(uri);
+ mediaPlayer.play(1000);
+ showDisplay("MPD", false, 100, 0 );
+ } catch (e) {
+ alert("Failed opening recording: " + e);
+ return;
+ }
+}
+
+
+
function InitMenu(menu) {
-if(menu == 0) {
-// Main Menu
-
- mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";color:white;'> MainMenu \n ( " + Version + " )</center></h1><pre style='color:black;font-size:" + fsMenu + ";'> 1 - SettingsMenu \n 2 - Recordings \n 3 - TimersMenu\n 4 -\n 5 -\n 6 -\n 7 -\n 8 -\n 9 -\n 0 - Restart Portal </pre>";
+if(menu == 0) { // Main Menu
+ mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";color:white;'> MainMenu \n ( " + Version + " )</center></h1><pre style='color:black;font-size:" + fsMenu + ";'> 1 - SettingsMenu \n 2 - Recordings \n 3 - TimersMenu\n 4 -\n 5 -\n 6 -\n 7 -\n 8 -\n 9 - MPD Server Connection\n\n BLUE - Restart Portal </pre>";
}
-if(menu == 1) {
-// settings menu
- mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";color:white;'> Settings </center></h1><pre style='color:black;font-size:" + fsMenu + ";'><font style='color:red;font-size:" + fsMenu + ";'> Frontdisplay Clock : " + Boolean(showClock) + "</font><font style='color:green;font-size:" + fsMenu + ";'>\n Prio audio track : " + (toi.informationService.getObject("cfg.media.audio.languagepriority")) + "</font><font style='color:blue;font-size:" + fsMenu + ";'>\n Preview guide : " + Boolean(SwitchGuide) + "</font>\n 1 - Show Subs : " + Boolean(ShowSubs) + "\n 2 - Subs Type Prio : " + (toi.informationService.getObject("cfg.media.subtitling.typepriority")) + "\n 3 - Subs Mode Prio : " + (toi.informationService.getObject("cfg.media.subtitling.modepriority")) + "\n 4 - Audio Type Prio : " + (toi.informationService.getObject("cfg.media.audio.typepriority")) + "\n 5 - Protection : " + Boolean(ShowProtectedChannels) + "\n\n\n\n 0 - MainMenu </pre>";
+if(menu == 1) { // settings menu
+ var htmltext = "<h1><center style='font-size:" + fsMenuMain + ";color:white;'> Settings </center></h1><pre style='color:black;font-size:" + fsMenu + ";'> 1 - ";
+ if (ShowSubs) { htmltext = htmltext + "\uE017"; } else { htmltext = htmltext + "\uE016"; }
+ htmltext = htmltext + " Show Subs \n 2 - \uE003 Subs Type Prio\uE003\uE003\uE003: " + (toi.informationService.getObject("cfg.media.subtitling.typepriority")) + "\n 3 - \uE003 Subs Mode Prio\uE003\uE003\uE003: " + (toi.informationService.getObject("cfg.media.subtitling.modepriority")) + "\n 4 - \uE003 Audio Type Prio\uE003\uE003\uE003: " + Left(toi.informationService.getObject("cfg.media.audio.typepriority"),20) + "\n 5 - \uE003 Prio audio track\uE003\uE003\uE003: " + (toi.informationService.getObject("cfg.media.audio.languagepriority")) + "\n 6 - ";
+ if (showClock) { htmltext = htmltext + "\uE017"; } else { htmltext = htmltext + "\uE016"; }
+ htmltext = htmltext + " Frontdisplay Clock\n 7 - ";
+ if (ShowProtectedChannels) { htmltext = htmltext + "\uE017"; } else { htmltext = htmltext + "\uE016"; }
+ htmltext = htmltext + " Protection\n 8 - ";
+ if (SwitchGuide) { htmltext = htmltext + "\uE017"; } else { htmltext = htmltext + "\uE016"; }
+ htmltext = htmltext + " Preview guide\n\n\n 0 - MainMenu </pre>";
+ mainmenu.innerHTML = htmltext;
}
-if(menu == 2) {
-// Timers menu
+if(menu == 2) { // Timers menu
booking = "";
var x = timerID - 1;
var y = toi.schedulerService.getBookingIds("*", 0, 0);
@@ -1657,10 +1724,10 @@ if(menu == 2) {
for (var i=0;i<10;i++) {
if (timer.length !== 0) { do { x = x + 1; } while (!timer[x] && (x < timer.length)) }
- if ( i == 0 && timer.length > 0) {
- booking = "<pre style='background:#fc5;-webkit-border-radius:25px;color:black;font-size:" + fsMenu + ";'>";
+ if (i == 0) {
+ booking = "<font style='background:#fc5;-webkit-border-radius:25px;color:black;font-size:" + fsMenu + ";'>";
} else if (i == 1) {
- booking = booking + "<center> PRESS OK TO REMOVE </center></pre><pre style='color:black;font-size:" + fsMenu + ";'>";
+ booking = booking + "<center> PRESS OK TO REMOVE </center></font>";
}
if (timer.length > x) {
@@ -1672,8 +1739,11 @@ if(menu == 2) {
}
- mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";color:white;'> Timers </center></h1><pre style='color:black;font-size:" + fsMenu + ";'>\n 0 - MainMenu \n</pre>" + booking + "</pre>";
+ mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";color:white;'> Timers </center></h1><pre style='color:black;font-size:" + fsMenu + ";'>\n 0 - MainMenu \n" + booking + "</pre>";
+}
+if(menu == 3) { // MPD Menu
+ mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";color:white;'> MPD Connection </center></h1><pre style='color:black;font-size:" + fsMenu + ";'> MENU to exit \n 0 - back to MainMenu </pre>";
}
} // end of initmenu
@@ -1718,7 +1788,7 @@ function LoadMediaSettings() {
isMediaMenu = 1;
showDisplay("STOP", false, 100, 0 );
currMed = 0;
- showMediaList();
+ if (getRecOK) { showMediaList();}
mediaPlayer.addEventListener(mediaPlayer.ON_POSITION_CHANGED, ShowMediaOSD);
mediaPlayer.addEventListener(mediaPlayer.ON_STATE_CHANGED, onStateChanged);
}
@@ -1831,10 +1901,8 @@ function onKeyMedia(keyCode) {
break;
case KEY_REC:
case "MediaRecord":
- createNewAsset();
recordStart(recLink[currMed]);
UnloadMediaSettings();
-// setTimeout("recordStop();",((recDura[currMed] * 1000) + 5000));
break;
case "MediaRewind":
if (mediaPlayer.getState() != mediaPlayer.STATE_IDLE) {
@@ -1845,14 +1913,10 @@ function onKeyMedia(keyCode) {
case "MediaForward":
if (mediaPlayer.getState() != mediaPlayer.STATE_IDLE) {
mediaPlayer.play(4000);
-// mediaPlayer.playFromPosition(12000,1000);
showDisplay("FF", false, 100, 0 );
}
break;
case "MediaStop":
- // if (mediaPlayer.getState() != mediaPlayer.STATE_IDLE) {
- // mediaPlayer.close();
- // }
play(channels[currChan]);
if (isRecording == 1) {
recordStop();
@@ -1900,20 +1964,26 @@ function onKeyMedia(keyCode) {
}
function getRecList() {
-xmlhttp=new XMLHttpRequest();
-xmlhttp.open("GET",(recServ + "/recordings.xml?" + new Date().getTime()),false);
-xmlhttp.send();
-xmlDoc=xmlhttp.responseXML;
-var x=xmlDoc.getElementsByTagName("item");
-nrMedia = x.length - 1;
-for (i=0;i<x.length;i++)
- {
- recTitl[i] = (x[i].getElementsByTagName("title")[0].childNodes[0].nodeValue);
- recLink[i] = (x[i].getElementsByTagName("link")[0].childNodes[0].nodeValue);
- recDesc[i] = (x[i].getElementsByTagName("description")[0].childNodes[0].nodeValue);
- recDura[i] = (x[i].getElementsByTagName("duration")[0].childNodes[0].nodeValue);
+try {
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("GET",(recServ + "/recordings.xml?" + new Date().getTime()),false);
+ xmlhttp.send();
+ xmlDoc=xmlhttp.responseXML;
+ var x=xmlDoc.getElementsByTagName("item");
+ nrMedia = x.length - 1;
+ for (var i=0;i<x.length;i++)
+ {
+ recTitl[i] = (x[i].getElementsByTagName("title")[0].childNodes[0].nodeValue);
+ recLink[i] = (x[i].getElementsByTagName("link")[0].childNodes[0].nodeValue);
+ recDesc[i] = (x[i].getElementsByTagName("description")[0].childNodes[0].nodeValue);
+ recDura[i] = (x[i].getElementsByTagName("duration")[0].childNodes[0].nodeValue);
+ }
+ getRecOK = 1;
+ } catch(e) {
+ alert("Get Recordings problem: " + e);
+ getRecOK = 0;
+ mediaList.innerHTML = "<h1><center style='font-size:" + fsRec + ";color:white;'> RECORDINGS </center><pre>\n\n\nERROR getting RECORDINGS !!!</pre></h1>";
}
-
}
function getRecList2() {
@@ -1958,8 +2028,7 @@ function showMediaList() {
}
htmlstring = htmlstring + "<td" + liststyle + "font-size:" + fsReclist + ";'>\uE003\uE003" + Left(recTitl[listMed],60) + "</td></tr>";
}
- htmlstring = htmlstring + "</table>";
- mediaList.innerHTML = htmlstring;
+ mediaList.innerHTML = htmlstring + "</table>";
}
@@ -2003,6 +2072,7 @@ function createNewAsset() {
function recordStart(uri) {
alert("opening mediaRecorder...");
+ createNewAsset();
try {
mediaRecorder.open(uri, assetId);
} catch(e) {
@@ -2022,7 +2092,6 @@ function recordStop() {
try {
mediaRecorder.close();
isRecording = 0;
-
} catch(e) {
alert("Cannot stop mediaRecorder! " + e);
}
@@ -2042,7 +2111,7 @@ function onStateChanged(ev) {
function onRecorderStateChanged(event) {
alert("EVENT! " + event.reason + " *** " + event.state);
-
+ RECicon = "\uE003"; // 0xE003 0x83 Fixed width blank
switch (event.state) {
case mediaRecorder.STATE_IDLE:
// "STATE_IDLE";
@@ -2055,6 +2124,7 @@ function onRecorderStateChanged(event) {
break;
case mediaRecorder.STATE_RECORDING:
// "STATE_RECORDING";
+ RECicon = "\uE00B"; // 0xE00B 0x8B REC
break;
case mediaRecorder.STATE_FAILED:
// "STATE_FAILED";
@@ -2091,7 +2161,17 @@ function onScheduledStart(event) {
} else {
try {
createNewAsset()
- mediaRecorder.open(toi.schedulerService.getParameter(event.booking.id, "Channel"), assetId);
+
+ var recChannr = channels[toi.schedulerService.getParameter(event.booking.id, "Channel")];
+ var recChan = 0;
+ if (ServerAdres[Left(recChannr,1)] == "MultiCast" ) {
+ SI=channels[recChannr].split("-");
+ recChan = SI[4];
+ } else {
+ recChan = ServerAdres[Left(recChannr,1)] + channels[recChannr];
+ }
+
+ mediaRecorder.open(recChan, assetId);
var propList = new Array(toi.assetManagerService.PROPERTY_SYSTEM_PLAYBACKURI);
var properties = toi.assetManagerService.getProperties(assetId, propList);
@@ -2154,7 +2234,7 @@ function onScheduledStop(event) {
<div id="osdname" style="width:69%;height:4%; position:absolute; left:12%; top:65%;z-index:505;"></div>
<div id="osdepg" style="width:63%; position:absolute; left:21%; top:69%;z-index:505;"></div>
<div id="osdtimer" style="width:7%; position:absolute; left:12%; top:69%;z-index:505;"></div>
- <div id="osdca" style="width:3%; position:absolute; left:80%; top:67%;z-index:505;fontFamily:VDRSymbolsSans;"></div>
+ <div id="osdca" style="width:5%; position:absolute; left:75%; top:67%;z-index:505;fontFamily:VDRSymbolsSans;"></div>
<div id="osdnr" style="background:red;width:10%;height:9%; position:absolute; left:12%; top:56%;z-index:505;opacity:0;-webkit-border-radius:25px;"></div>
@@ -2165,7 +2245,7 @@ function onScheduledStop(event) {
<div id="osdmute" style="width:7%; position:absolute; left:76%; top:9%;z-index:515;opacity:0;"><img src="mute.png"></div>
<div id="osdlang" style="width:7%; position:absolute; left:76%; top:9%;z-index:515;opacity:0;"></div>
- <div id="mainmenu" style="background:#3366ff;width:76%; position:absolute; left:10%; top:10%; bottom:10%;z-index:520;opacity:0;-webkit-border-radius:50px;"></div>
+ <div id="mainmenu" style="background:#3366ff;width:76%; position:absolute; left:10%; top:10%; bottom:10%;z-index:520;opacity:0;-webkit-border-radius:50px;fontFamily:VDRSymbolsSans;"></div>
<div id="mediaList" style="background:#3366ff;width:76%; position:absolute; left:10%; top:10%; bottom:10%;z-index:520;opacity:0;-webkit-border-radius:50px;"></div>
</body>
diff --git a/settings.js b/settings.js
index 4ade464..8ef6a6c 100644
--- a/settings.js
+++ b/settings.js
@@ -1,6 +1,6 @@
-// static settings
-// or
-// init var settings
+//
+// Default settings
+//
// 720x576
// 1280x720
@@ -10,45 +10,31 @@ var Xfactor = 1280 / 720;
var Yfactor = 720 / 576;
-var channels = new Array();
-var channelsnames = new Array();
-var channelsepglang = new Array();
+var showClock = 0; // 0 = no, 1 = yes
+var SwitchGuide = 0; // 0 = no, 1 = yes
+var TimeShift = 0; // 0 = no, 1 = yes timeshift
+var ShowSubs = 1; // 0 = no, 1 = yes (default)
-var showClock = 0;
-var SwitchGuide = 0;
-var TimeShift = 0; // 0 = no, 1 = yes timeshift
-var ShowSubs = 1; // 0 no, 1 = yes (default)
months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'Jully', 'August', 'September', 'October', 'November', 'December');
days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
-var isFullscreen = 1; // start TV(1) or guide(0)
-var StartVolume = 50;
-var Volume = StartVolume;
-var AudioOut = 3;
-// AUDIO_CONNECTION_TYPE_ANALOG = 0
-// AUDIO_CONNECTION_TYPE_SPDIF = 1
-// AUDIO_CONNECTION_TYPE_HDMI = 2
-// AUDIO_CONNECTION_TYPE_DECODER = 3
-// AUDIO_CONNECTION_TYPE_BUFFER = 4
-// AUDIO_CONNECTION_TYPE_I2S = 5
+var NN = new Array();
+NN[0] = "Now";
+NN[1] = "Next";
+NN[2] = "Schedule";
+NN[3] = "TIMER";
+NN[4] = "-----";
+var ShowProtectedChannels = 1; // Default don't show protected channels.
+var StartVolume = 50; // Volume on (re)start of the portal.
var currChan = 10; // default channel
-var epgchan = currChan;
-var prevChan = currChan;
-
-var channeldigits = 2; // 0 - Max 9, 1 max 99, 2 max 999 or 3 max 9999 channels directly selectable by numbers (Don't set it to > 2 it crashes the player)
-var ChanGroup = 0;
-var minChan = new Array();
-var maxChan = new Array();
-var defChan = new Array();
-var baseChn = new Array();
-var protChn = new Array();
-var ServerAdres = new Array();
-var ShowProtectedChannels = 1; // Default don't show protected channels.
+var ChanGroup = 0; // default TV group
+var minChan = new Array(); var maxChan = new Array(); var defChan = new Array(); var baseChn = new Array(); var protChn = new Array(); var ServerAdres = new Array(); // Define settings for Channels.
// Server for Recordings
var recServ = "http://192.168.3.15:8000";
+var MPDAddress = "http://192.168.3.15:8888/mpd.mp3";
// Radio channels.js Settings
minChan[9] = 9001;
@@ -89,7 +75,24 @@ defChan[5] = 5001;
baseChn[5] = 5000;
protChn[5] = 0;
ServerAdres[5] = "MultiCast";
-// MultiCast, channels[x] layout DVB(Satposition, C or T)-NID-TID-SID-last digits of multicast address (239.255. is added later)
+// MultiCast, channels[x] layout DVB(Satposition, C or T)-NID-TID-SID-multicast address
+
+var channeldigits = 2; // 0 - Max 9, 1 max 99, 2 max 999 or 3 max 9999 channels directly selectable by numbers (Don't set it to > 2 it crashes the player)
+
+//
+// No need to change anything from here on.
+//
+
+var isFullscreen = 1;
+var Volume = StartVolume;
+var AudioOut = 3;
+
+var epgchan = currChan;
+var prevChan = currChan;
+
+var channels = new Array();
+var channelsnames = new Array();
+var channelsepglang = new Array();
var currMed = 0;
var listMed = 0;
@@ -127,13 +130,6 @@ var NowNext = 0;
var EpgInfo = new Array();
var EpgExtInfo = new Array();
var files = new Array();
-var NN = new Array();
-NN[0] = "Now";
-NN[1] = "Next";
-NN[2] = "Schedule";
-NN[3] = "TIMER";
-NN[4] = "-----";
-
//
//NowNext, 1 = programma naam event.name ,currchan
@@ -181,12 +177,13 @@ var SwitchTimer = 1; // No other options yet
var initialDelayID = 0;
var switchicon = "\uE003";
-var CAicon = "\uE00D";
+var CAicon = "\uE00F";
+var RECicon = "\uE003";
var fsAudio = (16*Yfactor) + "px";
var fsTime = (16*Yfactor) + "px";
var fsName = (27*Yfactor) + "px";
-var fsMenu = (20*Yfactor) + "px";
+var fsMenu = (27*Yfactor) + "px";
var fsChan = (43*Yfactor) + "px";
var fsCA = (32*Yfactor) + "px";
var fsMenuMain = (35*Yfactor) + "px";
@@ -212,6 +209,7 @@ var recTitl = new Array();
var recLink = new Array();
var recDesc = new Array();
var recDura = new Array();
+var getRecOK = 0;
var timer = new Array();
var getbookingID = 0;