-
Notifications
You must be signed in to change notification settings - Fork 0
/
directv.html
152 lines (131 loc) · 4.71 KB
/
directv.html
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
<!DOCTYPE html>
<!--
Copyright (c) 2017 Mike Carlton
Released under terms of the MIT license:
http://www.opensource.org/licenses/mit-license
-->
<html>
<head>
<meta charset="UTF-8">
<title>DirecTV Commands</title>
<script src="jquery.min.js"></script>
<script src="jquery.growl.js" type="text/javascript"></script>
<link href="jquery.growl.css" rel="stylesheet" type="text/css" />
<script src="directv.js"></script>
<style>
body {
margin: 20px;
display: grid;
grid-gap: 20px;
background-color: #fff;
color: #444;
}
header,
footer {
grid-column: 1 / span 2;
}
.main-wrapper {
grid-row: 1 / span 2;
grid-column: 1;
display: grid;
grid-gap: 20px;
/* 3 equal sized columns */
grid-template-columns: 1fr 1fr 1fr;
}
.channel-wrapper {
grid-row: 1;
grid-column: 2;
display: grid;
grid-gap: 20px;
/* 4 columns, sized to button contents */
grid-template-columns: max-content max-content max-content max-content;
align-self: start;
}
.select-channel-wrapper {
grid-row: 2;
grid-column: 2;
}
.box {
text-align:center;
cursor: pointer;
background-color: #444;
color: #fff;
border-radius: 5px;
padding: 20px;
font-size: 120%;
}
</style>
<script>
remote = [
{ command: 'chanup', label: 'Channel Up', row: 1, column: 1 },
{ command: 'chandown', label: 'Channel Down', row: 2, column: 1 },
{ command: 'poweron', label: 'Power On', row: 1, column: 3 },
{ command: 'poweroff', label: 'Power Off', row: 2, column: 3 },
{ command: 'prev', label: 'Previous', row: 3, column: 1 },
{ command: 'pause', label: 'Pause', row: 3, column: 2 },
{ command: 'play', label: 'Play', row: 3, column: 3 },
{ command: 'guide', label: 'Guide', row: 4, column: 1 },
{ command: 'info', label: 'Info', row: 4, column: 2 },
{ command: 'menu', label: 'Menu', row: 5, column: 1 },
{ command: 'back', label: 'Back', row: 5, column: 2 },
{ command: 'exit', label: 'Exit', row: 5, column: 3 },
{ command: 'up', label: 'Up', row: 6, column: 2 },
{ command: 'left', label: 'Left', row: 7, column: 1 },
{ command: 'select', label: 'Select', row: 7, column: 2 },
{ command: 'right', label: 'Right', row: 7, column: 3 },
{ command: 'down', label: 'Down', row: 8, column: 2 },
]
channels = [
{ name: 'KTVU', channel: 2 },
{ name: 'KQED', channel: 9 },
{ name: 'ESPN', channel: 206 },
{ name: 'Cooking', channel: 231 },
{ name: 'CNN', channel: 202 },
]
$(document).ready(function() {
$.each(remote, function(key, val) {
var $div = $('<div/>', {
id: val['command'],
'class': 'box',
style: 'grid-row:' + val['row'] + '; grid-column:' + val['column'],
text: val['label'],
click: function() { dotv(this) }
})
$('#remote-buttons').append($div)
})
$.each(channels, function(key, val) {
var $div = $('<div/>', {
id: val['channel'],
'class': 'box',
text: val['name'],
click: function() { gotochannel(this) }
})
$('#channel-buttons').append($div)
})
})
</script>
</head>
<body>
<div id='remote-buttons' class='main-wrapper'> </div>
<div id='channel-buttons' class='channel-wrapper'> </div>
<div class='select-channel-wrapper'>
<input type='button' class='box' value="Channel:" onclick=enterchannel(this)>
<input id='channel' class='box' type='number' value='' width='5' min='1' max='9999'
style='background-color: #fff; color: #444'>
</div>
<p>
<footer>
<hr>
<table>
<tr>
<td>DirecTV DVR IP:
<!-- update with your set top IP address in field 'value' -->
<input id='ip' type='text' size='20'
value='172.16.1.25' placeholder='192.168.87.79'></td>
<td>Port: <input id='port' value='8080' size='6' disabled='true'></td>
<td><a href='./DTV-MD-0359-DIRECTV_SHEF_Command_Set-V1.3.C.pdf'>DirecTV Command Manual</td>
</tr>
</table>
</footer>
</body>
</html>