~ubuntu-branches/ubuntu/trusty/vdr-plugin-live/trusty-proposed

« back to all changes in this revision

Viewing changes to pages/remote.ecpp

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Schmidt
  • Date: 2007-07-02 21:02:17 UTC
  • Revision ID: james.westby@ubuntu.com-20070702210217-d34t69xf1qosqgvc
Tags: upstream-0.1.0
ImportĀ upstreamĀ versionĀ 0.1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<%pre>
 
2
#include <vdr/i18n.h>
 
3
#include <vdr/keys.h>
 
4
#include "setup.h"
 
5
#include "grab.h"
 
6
 
 
7
using namespace vdrlive;
 
8
</%pre>
 
9
<%session scope="global">
 
10
bool logged_in(false);
 
11
</%session>
 
12
<%include>page_init.eh</%include>
 
13
<{
 
14
if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
 
15
}>
 
16
<%cpp>
 
17
        pageTitle = tr("Remote Control");
 
18
</%cpp>
 
19
<& pageelems.doc_type &>
 
20
<html>
 
21
        <head>
 
22
                <title>VDR-Live - <$ pageTitle $></title>
 
23
                <link rel="stylesheet" type="text/css" href="/styles.css" />
 
24
                <& tooltip.javascript var=("domTT_styleClass") value=("domTTepg") &>
 
25
                <& pageelems.ajax_js &>
 
26
                <script type="text/javascript"><!--
 
27
                var newImg = new Image();
 
28
                var imgsrc = "";
 
29
                var interval = -1;
 
30
 
 
31
                function StreamLoad()
 
32
                {
 
33
                        uniq = new Date();
 
34
                        uniq = uniq.getTime();
 
35
                        document.images.vdrlive.src=newImg.src;
 
36
                        newImg.src=imgsrc+"?"+uniq;
 
37
                }
 
38
 
 
39
                function StreamInit()
 
40
                {
 
41
                        imgsrc = document.images.vdrlive.src;
 
42
                        uniq = new Date();
 
43
                        uniq = uniq.getTime();
 
44
                        newImg.src=imgsrc+"?"+uniq;
 
45
                        interval = window.setInterval("StreamLoad()", 1000);
 
46
                }
 
47
 
 
48
                function ChangeInterval()
 
49
                {
 
50
                        var element = document.getElementsByName('interval').item(0);
 
51
                        var timeout = element.value;
 
52
                        window.clearInterval(interval);
 
53
                        interval = window.setInterval("StreamLoad()", timeout);
 
54
                }
 
55
 
 
56
                function KeyPress(keycode)
 
57
                {
 
58
                        LiveSimpleAjaxRequest('keypress.xml', 'keycode', keycode);
 
59
                }
 
60
 
 
61
                function FillIntervals()
 
62
                {
 
63
                        var element = document.getElementsByName('interval').item(0);
 
64
                        var items = new Array(1000, 2000, 5000);
 
65
                        element.options.length = items.length;
 
66
                        for (i = 0; i < items.length; ++i) {
 
67
                                element.options[i].value = items[i];
 
68
                                element.options[i].text = (items[i] / 1000) + " s";
 
69
                                if (items[i] == <$ LiveSetup().GetScreenshotInterval() $>)
 
70
                                        element.selectedIndex = i;
 
71
                        }
 
72
                }
 
73
                //--></script>
 
74
        </head>
 
75
        <body onload="<& pageelems.infobox_start_update &>; StreamInit(); FillIntervals()">
 
76
                <& pageelems.logo &>
 
77
                <& menu active="remote" component=("remote.remote_actions")>
 
78
                <div class="inhalt">
 
79
                        <div class="screenshot">
 
80
<{                              if (!LiveGrabImageManager().CanGrab()) {        }>
 
81
                                        bloek
 
82
<{                              } else {                                                                        }>
 
83
                                        <img src="screenshot.jpg" name="vdrlive" /><br />
 
84
<{                              }                                                                                       }>
 
85
                        </div>
 
86
                        <div>
 
87
                        <img src="remotecontrol.jpg" width="162" height="363" border="0" usemap="#remote" alt="" />
 
88
                             <map name="remote">
 
89
                                  <area href="#" shape="circle" coords="37,36,10" alt="Power" onclick="KeyPress(<$ kPower $>)" nohref="nohref" alt="" />
 
90
                                  <area href="#" shape="rect" coords="27,60,59,75" alt="1" onclick="KeyPress(<$ k1 $>)" nohref="nohref" alt="" />
 
91
                                  <area href="#" shape="rect" coords="64,59,98,75" alt="2" onclick="KeyPress(<$ k2 $>)" nohref="nohref" alt="" />
 
92
                                  <area href="#" shape="rect" coords="103,59,137,75" alt="3" onclick="KeyPress(<$ k3 $>)" nohref="nohref" alt="" />
 
93
                                  <area href="#" shape="rect" coords="25,82,60,98" alt="4" onclick="KeyPress(<$ k4 $>)" nohref="nohref" alt="" />
 
94
                                  <area href="#" shape="rect" coords="65,82,98,99" alt="5" onclick="KeyPress(<$ k5 $>)" nohref="nohref" alt="" />
 
95
                                  <area href="#" shape="rect" coords="103,83,137,99" alt="6" onclick="KeyPress(<$ k6 $>)" nohref="nohref" alt="" />
 
96
                                  <area href="#" shape="rect" coords="26,106,60,121" alt="7"  onclick="KeyPress(<$ k7 $>)" nohref="nohref" alt="" />
 
97
                                  <area href="#" shape="rect" coords="65,105,97,121" alt="8" onclick="KeyPress(<$ k8 $>)" nohref="nohref" alt="" />
 
98
                                  <area href="#" shape="rect" coords="104,106,137,122" alt="9" onclick="KeyPress(<$ k9 $>)" nohref="nohref" alt="" />
 
99
                                  <area href="#" shape="rect" coords="66,128,98,144" alt="0" onclick="KeyPress(<$ k0 $>)" nohref="nohref" alt="" />
 
100
                                  <area href="#" shape="circle" coords="37,157,13" alt="Vol+" onclick="KeyPress(<$ kVolUp $>)" nohref="nohref" alt="" />
 
101
                                  <area href="#" shape="circle" coords="37,190,13" alt="Vol-" onclick="KeyPress(<$ kVolDn $>)" nohref="nohref" alt="" />
 
102
                                  <area href="#" shape="circle" coords="125,157,13" alt="P+" onclick="KeyPress(<$ kChanUp $>)" nohref="nohref" alt="" />
 
103
                                  <area href="#" shape="circle" coords="125,190,13" alt="P-" onclick="KeyPress(<$ kChanDn $>)" nohref="nohref" alt="" />
 
104
                                  <area href="#" shape="circle" coords="81,174,8" alt="Mute" onclick="KeyPress(<$ kMute $>)" nohref="nohref" alt="" />
 
105
                                  <area href="#" shape="circle" coords="81,202,11" alt="Record" onclick="KeyPress(<$ kRecord $>)" nohref="nohref" alt="" />
 
106
                                  <area href="#" shape="poly" coords="39,215,29,227,30,235,39,236,51,222,49,215,43,213" alt="Menu" onclick="KeyPress(<$ kMenu $>)" nohref="nohref" alt="" />
 
107
                                  <area href="#" shape="poly" coords="119,213,127,219,135,230,132,235,127,236,119,231,114,223,113,215" alt="Exit" onclick="KeyPress(<$ kBack $>)" nohref="nohref" alt="" />
 
108
                                  <area href="#" shape="poly" coords="58,230,70,223,82,223,91,223,105,231,96,240,87,237,78,236,69,240,66,241,58,232" alt="Up" onclick="KeyPress(<$ kUp $>)" nohref="nohref" alt="" />
 
109
                                  <area href="#" shape="poly" coords="111,237,119,249,121,259,119,275,113,285,109,284,101,276,104,270,107,260,106,253,101,245" alt="Right" onclick="KeyPress(<$ kRight $>)" nohref="nohref" alt="" />
 
110
                                  <area href="#" shape="poly" coords="66,281,75,285,86,285,95,281,106,291,100,295,87,300,73,300,58,291,57,289,58,289" alt="Down" onclick="KeyPress(<$ kDown $>)" nohref="nohref" alt="" />
 
111
                                  <area href="#" shape="poly" coords="51,236,61,245,56,256,57,266,61,277,52,285,47,278,42,264,43,252,49,240" alt="Left" onclick="KeyPress(<$ kLeft $>)" nohref="nohref" alt="" />
 
112
                                  <area href="#" shape="circle" coords="81,261,17" alt="Ok" onclick="KeyPress(<$ kOk $>)" nohref="nohref" alt="" />
 
113
                                  <area href="#" shape="rect" coords="25,309,52,324" alt="Red" onclick="KeyPress(<$ kRed $>)" nohref="nohref" alt="" />
 
114
                                  <area href="#" shape="rect" coords="53,309,81,324" alt="Green" onclick="KeyPress(<$ kGreen $>)" nohref="nohref" alt="" />
 
115
                                  <area href="#" shape="rect" coords="83,309,109,324" alt="Yellow" onclick="KeyPress(<$ kYellow $>)" nohref="nohref" alt="" />
 
116
                                  <area href="#" shape="rect" coords="110,310,137,323" alt="Blue" onclick="KeyPress(<$ kBlue $>)" nohref="nohref" alt="" />
 
117
                             </map>
 
118
                        </div>
 
119
                </div>
 
120
        </body>
 
121
</html>
 
122
<%include>page_exit.eh</%include>
 
123
 
 
124
<%def remote_actions>
 
125
<$ tr("Interval") $>: <select name="interval" onchange="ChangeInterval()"></select>
 
126
</%def>