-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
42 lines (37 loc) · 1.21 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>LCC Browser example page</title>
</head>
<body>
<h1>Introduction</h1>
<p>This is an embedded web browser. It is showing the local file "index.html". You can use it for example to create a control panel for your LCC setup. The application provides an LCC interface in Javascript.<p>
<p>
<a href="https://github.com/ahaensler/lcc_browser">Source Code</a>
<br />
Adrian Haensler, 2023, MIT License
</p>
<h1>Examples</h1>
<p>LCC events are sent like this.</p>
<code>
<button onClick="LCC.sendRawEvent('0123456789AB.0000');">
<br />
Send event
<br />
</button>
</code>
<p>Try it:</p>
<button onClick="LCC.sendRawEvent('0123456789AB.0000');">Send event</button>
<p>LCC events are received like this.</p>
<code>
LCC.addEventListener("raw-event", event => {<br />
const eventId = event.detail;<br />
const nodeId = eventId.slice(0, 2*6);<br />
if (nodeId === "104265632192") {<br />
alert("Received Event!");<br />
}<br />
})
</code>
<p>Dev tools for debugging are available in the context menu.</p>
</body>
</html>