File size: 774 Bytes
709c473 |
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 |
<!-- public/live.html -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Live Pairing Stream</title>
<style>
body { font-family: sans-serif; padding: 1em; }
#log { white-space: pre-wrap; font-family: monospace; }
</style>
</head>
<body>
<h1>🔁 Infinite Craft: Live Pairing</h1>
<div id="log">Waiting for stream...</div>
<script>
const logDiv = document.getElementById("log");
const es = new EventSource("/stream-pair");
es.onmessage = (event) => {
logDiv.textContent = event.data + "\n" + logDiv.textContent;
};
es.onerror = () => {
logDiv.textContent = "❌ Connection lost. Refresh to retry.\n" + logDiv.textContent;
es.close();
};
</script>
</body>
</html>
|