summaryrefslogtreecommitdiff
path: root/pages/remote.ecpp
blob: 6f23d9abf8b314a73bea0a1aa6013ed0587e19f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<%pre>
#include <vdr/i18n.h>
#include <vdr/keys.h>
#include "setup.h"

using namespace vdrlive;
</%pre>
<%include>page_init.eh</%include>
<%cpp>
	pageTitle = tr("Remote control");
</%cpp>
<& pageelems.doc_type &>
<html>
	<head>
		<& pageelems.ajax_js &>
		<script type="text/javascript"><!--
		var newImg = new Image();
		var imgsrc = "";
		var interval = -1;

		function StreamLoad()
		{
			uniq = new Date();
			uniq = uniq.getTime();
			document.images.vdrlive.src=newImg.src;
			newImg.src=imgsrc+"?"+uniq;
		}

		function StreamInit()
		{
			imgsrc = document.images.vdrlive.src;
			uniq = new Date();
			uniq = uniq.getTime();
			newImg.src=imgsrc+"?"+uniq;
			interval = window.setInterval("StreamLoad()", 1000);
		}

		function ChangeInterval()
		{
			var element = document.getElementsByName('interval').item(0);
			var timeout = element.value;
			window.clearInterval(interval);
			interval = window.setInterval("StreamLoad()", timeout);
		}

		function KeyPress(keycode)
		{
			LiveSimpleAjaxRequest('keypress.xml', 'keycode', keycode);
		}

		function FillIntervals()
		{
			var element = document.getElementsByName('interval').item(0);
			var items = new Array(100, 200, 500, 1000, 2000, 5000);
			element.options.length = items.length;
			for (i = 0; i < items.length; ++i) {
				element.options[i].value = items[i];
				element.options[i].text = (items[i] / 1000) + " s";
				if (items[i] == <$ LiveSetup().GetScreenshotInterval() $>)
					element.selectedIndex = i;
			}
		}
		//--></script>
		<title>VDR-Live - <$ pageTitle $></title>
		<link rel="stylesheet" type="text/css" href="/styles.css" />
	</head>
	<body onload="StreamInit(); FillIntervals();">
		<div class="left_area">
			<& pageelems.logo &>
			<& menu active="remote" &>
		</div>
	<div class="right_area"
		<div class="inhalt">
			<div class="screenshot">
				<img src="screenshot.jpg" name="vdrlive" /><br />
				<$ tr("Interval:") $> <select name="interval" onchange="ChangeInterval()"></select>
			</div>
			<table class="keypad" cellspacing="0" cellpadding="0">
				<tr>
					<td class="button"><button type="button" onclick="KeyPress(<$ k1 $>)">1</button></td>
					<td class="button"><button type="button" onclick="KeyPress(<$ k2 $>)">2</button></td>
					<td class="button"><button type="button" onclick="KeyPress(<$ k3 $>)">3</button></td>
				</tr>
				<tr>
					<td class="button"><button type="button" onclick="KeyPress(<$ k4 $>)">4</button></td>
					<td class="button"><button type="button" onclick="KeyPress(<$ k5 $>)">5</button></td>
					<td class="button"><button type="button" onclick="KeyPress(<$ k6 $>)">6</button></td>
				</tr>
				<tr>
					<td class="button"><button type="button" onclick="KeyPress(<$ k7 $>)">7</button></td>
					<td class="button"><button type="button" onclick="KeyPress(<$ k8 $>)">8</button></td>
					<td class="button"><button type="button" onclick="KeyPress(<$ k9 $>)">9</button></td>
				</tr>
				<tr>
					<td class="button">&nbsp;</td>
					<td class="button"><button type="button" onclick="KeyPress(<$ k0 $>)">0</button></td>
					<td class="button">&nbsp;</td>
				</tr>
				<tr>
					<td class="button" colspan="3">&nbsp;</td>
				</tr>
				<tr>
					<td class="button"><button type="button" onclick="KeyPress(<$ kMenu $>)"><$ tr("Menu") $></button></td>
					<td class="button">&nbsp;</button></td>
					<td class="button"><button type="button" onclick="KeyPress(<$ kBack $>)"><$ tr("Back") $></button></td>
				</tr>
				<tr>
					<td colspan="3">
						<table cellspacing="0" cellpadding="0">
							<tr>
								<td class="redbutton"><button type="button" onclick="KeyPress(<$ kRed $>)">&nbsp;</button></td>
								<td class="greenbutton"><button type="button" onclick="KeyPress(<$ kGreen $>)">&nbsp;</button></td>
								<td class="yellowbutton"><button type="button" onclick="KeyPress(<$ kYellow $>)">&nbsp;</button></td>
								<td class="bluebutton"><button type="button" onclick="KeyPress(<$ kBlue $>)">&nbsp;</button></td>
							<tr>
						</table>
					</td>
				</tr>
				<tr>
					<td class="button" colspan="3">&nbsp;</td>
				</tr>
				<tr>
					<td class="button">&nbsp;</td>
					<td class="button"><button type="button" onclick="KeyPress(<$ kUp $>)">^</button></td>
					<td class="button">&nbsp;</td>
				</tr>
				<tr>
					<td class="button" colspan="3">&nbsp;</td>
				</tr>
				<tr>
					<td class="button"><button type="button" onclick="KeyPress(<$ kLeft $>)">&lt;</button></td>
					<td class="button"><button type="button" onclick="KeyPress(<$ kOk $>)"><$ tr("Ok") $></button></td>
					<td class="button"><button type="button" onclick="KeyPress(<$ kRight $>)">&gt;</button></td>
				</tr>
				<tr>
					<td class="button" colspan="3">&nbsp;</td>
				</tr>
				<tr>
					<td class="button">&nbsp;</td>
					<td class="button"><button type="button" onclick="KeyPress(<$ kDown $>)">v</button></td>
					<td class="button">&nbsp;</td>
				</tr>
				<tr>
					<td class="button" colspan="3">&nbsp;</td>
				</tr>
				<tr>
					<td class="button"><button type="button" onclick="KeyPress(<$ kVolDn $>)"><$ tr("Vol-") $></button></td>
					<td class="button"><button type="button" onclick="KeyPress(<$ kMute $>)"><$ tr("Mute") $></button></td>
					<td class="button"><button type="button" onclick="KeyPress(<$ kVolUp $>)"><$ tr("Vol+") $></button></td>
				</tr>
			</table>
		</div>
	</div>
	</body>
</html>
<%include>page_exit.eh</%include>