Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
924 B · 37 lines
HTML
12345678910111213141516171819202122232425262728293031323334353637<!DOCTYPE html><html>
<head> <title>Screenplay - video-sync:parent</title> <style> body { margin: 0; background: black; overflow: hidden; cursor: none; } </style></head>
<body> <video id="video" preload muted src="/boot/screenplay.mp4" style="width: 100%; height: 100%; object-fit: fill;"></video> <script> const video = document.getElementById('video'); video.addEventListener('canplaythrough', () => { const ws = new WebSocket('ws://localhost:8080'); ws.onmessage = (event) => { if (event.data === 'play') { video.play(); } else if (event.data === 'restart') { video.currentTime = 0; video.play(); } }; ws.onopen = () => { ws.send('start'); }; video.addEventListener('ended', () => { ws.send('restart'); }); }); </script></body>
</html>