aboutsummaryrefslogtreecommitdiff
path: root/picarones-elm/display.html
diff options
context:
space:
mode:
authorstuebinm2021-03-15 18:38:02 +0100
committerstuebinm2021-03-15 18:38:02 +0100
commit0596b9f6c561daa67945adb81570efd30650dffd (patch)
tree4e86c41cd264dd9220d24cc9fe564a93b7a84f12 /picarones-elm/display.html
parent393186f9ebf0bf43a1add8bd8d0e37be566ae8cc (diff)
Add a display view which does nothing but display the slides
(should be useful e.g. as input for a screen recorder)
Diffstat (limited to 'picarones-elm/display.html')
-rw-r--r--picarones-elm/display.html34
1 files changed, 34 insertions, 0 deletions
diff --git a/picarones-elm/display.html b/picarones-elm/display.html
new file mode 100644
index 0000000..88bebf1
--- /dev/null
+++ b/picarones-elm/display.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>Main</title>
+ <script src="Display.js"></script>
+ <link rel="stylesheet" type="text/css" href="document.css" />
+</head>
+
+<body>
+ <div id="elm"></div>
+ <script>
+ let args = location.hash.split("#").slice(1);
+
+ var app = Elm.Display.init({
+ node: document.getElementById('elm'),
+ flags: [args[0], parseInt(args[1])]
+ });
+
+ let ws = new WebSocket("{{ serverurl }}")
+
+ ws.onopen = () => ws.send (JSON.stringify ({room:args[0]}));
+
+ ws.onmessage = function(msg) {
+ console.log(msg.data)
+ app.ports.recvPort.send(msg.data)
+ }
+
+ app.ports.sendPort.subscribe(function(msg) {
+ ws.send(msg)
+ })
+ </script>
+</body>
+</html>