summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorM. Voerman <rekordc@gmail.com>2013-01-20 22:26:07 +0100
committerM. Voerman <rekordc@gmail.com>2013-01-20 22:26:07 +0100
commitd6d9ab16e3d253f9f17628947a6481154c9e8a48 (patch)
treee0494c94b2509f901f5798ae7c6faf6438164147
parentc0cd92a9e5c49ad007cc776e84a48ecc2fb75987 (diff)
downloadvdr-vipclient-d6d9ab16e3d253f9f17628947a6481154c9e8a48.tar.gz
vdr-vipclient-d6d9ab16e3d253f9f17628947a6481154c9e8a48.tar.bz2
Switch timer fix
-rw-r--r--History5
-rw-r--r--index.html50
-rw-r--r--settings.js17
3 files changed, 40 insertions, 32 deletions
diff --git a/History b/History
index 12d0e23..b8b8237 100644
--- a/History
+++ b/History
@@ -2,7 +2,8 @@
Fixed pause function with "VDR on SmartTV"
Updated to use the new function 'is_new' from "VDR on SmartTV"
Added (key '5') jump to next mark in recordings. With use of restfulapi plugin
-
+ Fixed standby problems when playing recordings.
+ Fixed switchtimer when menu / recordingsmenu / playing recordings
0.11 Switch to Scheduler services for settings timers.
Some fixes in the recorder & player routine
@@ -14,7 +15,7 @@
Recordings Menu now show maps.
Use of restfulapi
Read Timers from Server
- Delete recording // if you want to Delete a recording, change in restfulapi/recordings.ccp line 46 DELETE by POST
+ Delete recording // if you want to Delete a recording, change in restfulapi/recordings.ccp line 46 DELETE to POST
KillStream on standby can be set from settings.js
0.10 Added sub Listinges for use as Radio list / Protected List / SD/HD list etc
diff --git a/index.html b/index.html
index c92d054..6ab424a 100644
--- a/index.html
+++ b/index.html
@@ -94,6 +94,11 @@ var numObjs = event.objectNames.length;
}
} else if(event.objectNames[i] == "var.io.state" && toi.informationService.getObject(event.objectNames[i]) == "normal" && KillStream == 1){
play(channels[currChan]);
+ if(isMediaMenu) {
+ mediaList.style.opacity = 0.9;
+ showDisplay("STOP", false, 100, 0 );
+ showMediaList();
+ }
}
}
}
@@ -944,7 +949,7 @@ function settimer() {
th=addzero(th);
tm=addzero(tm);
- switchtimer.innerHTML = "<p> Name : " + EPG[NowNext][1][currChan] + "</p><p> channel : " + channelsnames[currChan] + "</p><p> Starttime : " + th + ":" + tm + "</p>";
+ switchtimer.innerHTML = "<pre> Name : " + EPG[NowNext][1][currChan] + "\n channel : " + channelsnames[currChan] + "\n Starttime : " + th + ":" + tm + "</pre>";
setOSDtimer();
} else {
//
@@ -1735,8 +1740,6 @@ if(menu == 4) { // INFO Menu
htmltext = htmltext + "\n Product name: " + is.getObject("config.productdisplayname");
htmltext = htmltext + "\n Build date : " + is.getObject("config.build.date");
-// htmltext = htmltext + "\n IO State: " + is.getObject("var.io.state");
-
htmltext = htmltext + "\n\n IP address:" + is.getObject("config.ipaddress");
var x = is.getObject("cfg.ip.eth0.mode");
if (x == "DHCP") { htmltext = htmltext + "\n \uE017 "; } else { htmltext = htmltext + "\n \uE016 "; }
@@ -1801,15 +1804,17 @@ function LoadTimers() {
function SwitchActiveTimers() {
try {
- var x = "timer_id=" + timersID[timerID] + "&flags=" + timersFlag[timerID];
+ var x = "?timer_id=" + timersID[timerID] + "&flags=" + timersFlag[timerID] ;
alert(x);
xmlhttp=new XMLHttpRequest();
- xmlhttp.open("PUT",(RestFulAPI + "/timers"),false);
-// xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- xmlhttp.setRequestHeader("Content-length", x.length);
+// xmlhttp.open("PUT",(RestFulAPI + "/timers"),false);
+// xmlhttp.open("PUT",(RestFulAPI + "/timers/" + timersID[timerID] + ".xml"),false);
+ xmlhttp.open("POST",(RestFulAPI + "/timers.xml" + x),false);
+// xmlhttp.setRequestHeader("Content-type", "text/xml; charset=utf-8");
+// xmlhttp.setRequestHeader("Content-length", x.length);
// xmlhttp.setRequestHeader("Connection", "close");
// xmlhttp.send(x);
-xmlhttp.send();
+ xmlhttp.send();
alert(xmlhttp.responseText);
} catch(e) {
alert("Updating Timers problem: " + e);
@@ -2412,14 +2417,12 @@ function onRecorderStateChanged(event) {
function ShowMediaOSD() {
// Display Name/ length
- var pos = (position + (mediaPlayer.getPosition()/1000)).toFixed(0);
- var pos2 = ((pos / Number(recDura[currMed])) * 100).toFixed(0);
+ var pos = position + (mediaPlayer.getPosition()/1000);
+ var pos2 = (pos / Number(recDura[currMed])) * 100;
if (pos2 < 1) { pos2 = 1;}
if (pos>recMark[posMark] && recMark.length>0) { posMark = posMark + 1;}
- if (recMark[posMark]) { var pos3 = "\n Next Mark : " + (recMark[posMark]/60).toFixed(0); } else { var pos3 = "\n"; }
pos2 = ((pos2 * 140) / 100).toFixed(0);
- var pos4 = Left(recTitl[currMed],50);
- osdmedia.innerHTML = "<pre style='color:white;font-size:" + fsMedia +";'> " + pos4 + "\n" + new Array(40).join("\uE003") + (pos/60).toFixed(0) + " / " + (Number(recDura[currMed])/60).toFixed(0) + pos3 + "\n \uE007" + new Array(pos2 - 1).join("\uE008") + new Array(140 - pos2).join("\uE009") + "\uE00A </pre>";
+ osdmedia.innerHTML = "<pre style='color:white;font-size:" + fsMedia +";'> " + (pos/60).toFixed(0) + " / " + (Number(recDura[currMed])/60).toFixed(0) + " " + Left(recTitl[currMed],50) + "\n \uE007" + new Array(pos2 - 1).join("\uE008") + new Array(140 - pos2).join("\uE009") + "\uE00A </pre>";
}
function ShowInfo() {
@@ -2445,17 +2448,20 @@ function onScheduledStart(event) {
var timertype = event.booking.category;
if ( timertype == "SwitchOnly") {
- isVisible = 0;
- isFullscreen = 1;
- FullScreen();
+ isVisible = 0; isSetupMenu = 0;
+ osdepginfonext.style.opacity = 0;
+ osdepginfo.style.opacity = 0;
+ mainmenu.style.opacity = 0;
+ isFullscreen = 1; FullScreen();
setVisible(isVisible);
setOSDtimer();
- // switch only if not already on that channel.
- if (currChan !== toi.schedulerService.getParameter(event.booking.id, "Channel")) {
- currChan = toi.schedulerService.getParameter(event.booking.id, "Channel");
- play(channels[currChan]);
- }
+ if (isMediaMenu) { UnloadMediaSettings(); }
+ // switch only if not already on that channel.
+ if (currChan !== toi.schedulerService.getParameter(event.booking.id, "Channel")) {
+ currChan = toi.schedulerService.getParameter(event.booking.id, "Channel");
+ play(channels[currChan]);
+ }
} else {
try {
createNewAsset()
@@ -2523,7 +2529,7 @@ function onScheduledStop(event) {
<videoplane id='videoplane' style='position:absolute; left:0px; top:0px; height: 100%; width: 100%; z-index:500;'></videoplane>
<div id="osdvolume" style="width:63%; position:absolute; left:10%; top:80%;z-index:501;fontFamily:VDRSymbolsSans;opacity:0;">Volume : </div>
- <div id="osdmedia" style="background:#3366ff;-webkit-border-radius:50px;width:80%; position:absolute; left:10%; top:60%;z-index:505;opacity:0;"></div>
+ <div id="osdmedia" style="background:#3366ff;-webkit-border-radius:50px;width:80%; position:absolute; left:10%; top:70%;z-index:505;opacity:0;"></div>
<div id="osdmain" style="background:#3366ff;width:80%; position:absolute; left:10%; top:60%; bottom:9%;z-index:505;-webkit-border-radius:50px;"></div>
<div id="osdtime" style="width:42%; position:absolute; left:58%; top:63%;z-index:505;"></div>
diff --git a/settings.js b/settings.js
index 5b3c4dc..477f3b3 100644
--- a/settings.js
+++ b/settings.js
@@ -14,7 +14,7 @@ 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 KillStream = 1; //Close stream on Standby
+var KillStream = 1; // 1 = Close stream on Standby
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');
@@ -35,9 +35,10 @@ 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 RestFulAPI = "http://192.168.3.15:8002";
-var MPDAddress = "http://192.168.3.15:8888";
+var server_ip = "http://192.168.3.15";
+var recServ = server_ip + ":8000";
+var RestFulAPI = server_ip + ":8002";
+var MPDAddress = server_ip + ":8888";
// Radio channels.js Settings
minChan[9] = 9001;
@@ -45,7 +46,7 @@ maxChan[9] = 9099; // set not too far from max rd channel to speed up zapping
defChan[9] = 9051;
baseChn[9] = 9000;
protChn[9] = 0;
-ServerAdres[9] = "http://192.168.3.15:3000/";
+ServerAdres[9] = server_ip + ":3000/";
// Protected channels.js Settings
minChan[6] = 6001;
@@ -53,7 +54,7 @@ maxChan[6] = 6040; // set not too far from max prt channel to speed up zapping
defChan[6] = 6001;
baseChn[6] = 6000;
protChn[6] = 1;
-ServerAdres[6] = "http://192.168.3.15:3000/";
+ServerAdres[6] = server_ip + ":3000/";
// TV channels.js Settings
minChan[0] = 1;
@@ -61,7 +62,7 @@ maxChan[0] = 999; // set not too far from max TV channel to speed up zapping
defChan[0] = currChan;
baseChn[0] = 0;
protChn[0] = 0;
-ServerAdres[0] = "http://192.168.3.15:3000/";
+ServerAdres[0] = server_ip + ":3000/";
//HD list
minChan[1] = 1001;
@@ -69,7 +70,7 @@ maxChan[1] = 1999; // set not too far from max HD channel to speed up zapping
defChan[1] = 1001;
baseChn[1] = 1000;
protChn[1] = 0;
-ServerAdres[1] = "http://192.168.3.15:3000/";
+ServerAdres[1] = server_ip + ":3000/";
// MultiCast
minChan[5] = 5001;