-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
103 lines (96 loc) · 3.73 KB
/
index.html
File metadata and controls
103 lines (96 loc) · 3.73 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Apple Remote – Web Bluetooth</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<header>
<h1>Apple Remote</h1>
<p class="subtitle">Web Bluetooth HID Listener</p>
</header>
<section id="status-section">
<div id="status" class="status disconnected">
<span class="status-dot"></span>
<span id="status-text">Disconnected</span>
</div>
<div id="device-info" class="device-info hidden">
<span id="device-name"></span>
<span id="battery-level"></span>
</div>
</section>
<section id="connect-section">
<button id="connect-btn" class="btn btn-primary">Connect Remote</button>
<button id="disconnect-btn" class="btn btn-secondary hidden">Disconnect</button>
</section>
<section id="remote-display" class="hidden">
<div class="remote-body">
<div class="touch-surface" id="touch-surface">
<div class="touch-indicator" id="touch-indicator"></div>
<div class="touch-labels">
<span class="label up">▲</span>
<span class="label right">▶</span>
<span class="label down">▼</span>
<span class="label left">◀</span>
<span class="label center">●</span>
</div>
</div>
<div class="button-row">
<div class="hw-btn" id="btn-menu" data-label="Menu"></div>
<div class="hw-btn" id="btn-playpause" data-label="Play/Pause"></div>
</div>
<div class="button-row">
<div class="hw-btn small" id="btn-volup" data-label="Vol +"></div>
<div class="hw-btn small" id="btn-voldown" data-label="Vol −"></div>
</div>
<div class="button-row">
<div class="hw-btn" id="btn-siri" data-label="Siri"></div>
<div class="hw-btn" id="btn-home" data-label="Home"></div>
</div>
</div>
</section>
<section id="last-action">
<div class="action-display">
<span class="action-label">Last action</span>
<span id="action-text" class="action-text">—</span>
</div>
</section>
<section id="event-log-section">
<h2>Event Log</h2>
<div id="event-log" class="event-log">
<div class="log-entry info">Ready. Press "Connect Remote" to begin.</div>
</div>
<button id="clear-log" class="btn btn-small">Clear Log</button>
</section>
<details class="setup-help">
<summary>Setup & Troubleshooting</summary>
<div class="help-content">
<h3>Requirements</h3>
<ul>
<li>Chrome 85+ or Edge 85+ (Web Bluetooth required)</li>
<li>Apple Siri Remote (4th gen Apple TV or newer)</li>
<li>HTTPS or localhost</li>
</ul>
<h3>Chrome HID Blocklist</h3>
<p>Chrome blocks the HID service (0x1812) by default. To use this app you must disable the blocklist:</p>
<ol>
<li>
<strong>Option A – Chrome flag:</strong><br>
Navigate to <code>chrome://flags/#enable-web-bluetooth-new-permissions-backend</code> and enable it.
</li>
<li>
<strong>Option B – Launch flag:</strong><br>
<code>open -a "Google Chrome" --args --disable-web-bluetooth-blocklist</code>
</li>
</ol>
<h3>Pairing</h3>
<p>The remote does not need to be pre-paired. The browser's Bluetooth picker will show nearby devices. Hold <strong>Menu + Volume Up</strong> for 5 seconds to put the Siri Remote into pairing mode.</p>
</div>
</details>
</div>
<script src="app.js"></script>
</body>
</html>