summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorM. Voerman <rekordc@gmail.com>2013-07-17 02:23:22 +0200
committerM. Voerman <rekordc@gmail.com>2013-07-17 02:23:22 +0200
commit6295e53f95118aea8b6814932c06d318c0a65e82 (patch)
tree816d880be4bc2cc4267484e2eea830e439e5408d /index.html
parent4cf750b11b4efe5e7bb775edefa98b18a9a3aa3b (diff)
downloadvdr-vipclient-6295e53f95118aea8b6814932c06d318c0a65e82.tar.gz
vdr-vipclient-6295e53f95118aea8b6814932c06d318c0a65e82.tar.bz2
Pause Live TV on server.
OSD Time out can be set from settings
Diffstat (limited to 'index.html')
-rw-r--r--index.html48
1 files changed, 46 insertions, 2 deletions
diff --git a/index.html b/index.html
index 3825c5f..11a6645 100644
--- a/index.html
+++ b/index.html
@@ -804,6 +804,23 @@ function onKeyDown(event) {
mediaPlayer.play(mediaPlayer.PACE_FASTFORWARD);
break;
case "MediaPlayPause":
+
+ if(isFullscreen && PauseOnServer) {
+ if(mediaPlayer.getState() == mediaPlayer.STATE_PLAYING) {
+ ServerPause();
+ SetLed(1,1,10);
+ setTimeout("mediaPlayer.play(0);",5000);
+ break;
+ }
+ if(mediaPlayer.getState() == mediaPlayer.STATE_PAUSED || mediaPlayer.getState() == mediaPlayer.STATE_FASTFORWARDING ||
+ mediaPlayer.getState() == mediaPlayer.STATE_REWINDING) {
+ SetLed(1,1,0);
+ mediaPlayer.play(mediaPlayer.PACE_PLAY);
+ break;
+ }
+
+ }
+
if(TimeShift){
if(mediaPlayer.getState() == mediaPlayer.STATE_PAUSED || mediaPlayer.getState() == mediaPlayer.STATE_FASTFORWARDING || mediaPlayer.getState() == mediaPlayer.STATE_REWINDING) {
SetLed(1,1,0);
@@ -932,7 +949,7 @@ function showOSD() {
SetOsdInfo();
opacity = 1;
OSD(opacity);
- osdtimeout = setTimeout("fadeOut(); osdtimeout = 0;", 3000);
+ osdtimeout = setTimeout("fadeOut(); osdtimeout = 0;", ShowOsdTime);
}
function showVolume() {
@@ -941,7 +958,7 @@ function showVolume() {
}
osdvolume.innerHTML = Lang[1] + " : \uE007" + (new Array(Volume)).join("\uE008") + (new Array(100 - Volume)).join("\uE009") + "\uE00A";
osdvolume.style.opacity = 1;
- osdVolumetimeout = setTimeout("osdvolume.style.opacity = 0;", 3000);
+ osdVolumetimeout = setTimeout("osdvolume.style.opacity = 0;", ShowOsdTime);
}
@@ -3380,6 +3397,33 @@ SwitchTimer = ii;
//end of function
}
+function ServerPause() {
+//Instant pause on server
+
+ try {
+ xmlhttp=new XMLHttpRequest();
+ //switch server to current channel
+ xmlhttp.open("POST",(RestFulAPI + "/remote/switch/" + channels[currChan]),true);
+ xmlhttp.send();
+ //start pause
+ setTimeout("xmlhttp.open('POST',(RestFulAPI + '/remote/Record'),false);xmlhttp.send();",5000);
+
+ //Show some info on screen
+ settimer(EPG[NowNext][2][currChan],"PAUSE",0);
+ switchtimer.style.opacity = 1;
+ setTimeout("switchtimer.style.opacity = 0; ", 7000);
+
+ } catch(e) {
+ alert("Sending Pause key to server problem: " + e);
+ }
+ //Next steps:
+ //Find recording using restfulapi
+ //Open recording and pause.
+
+//end of function
+}
+
+
function ServerRecordStop() {
try {
xmlhttp=new XMLHttpRequest();