tvpipe 0.2.0

Stream a program's frames and sound, files, web pages or the screen to Apple TVs, Chromecasts and browser tabs with low latency, in process
Documentation
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>tvpipe</title>
<link rel="preload" href="/fonts/michroma.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/fonts/sixtyfour.woff2" as="font" type="font/woff2" crossorigin>
<style>
  /* The tvpipe website's type and colours, always dark (it frames video). */
  @font-face { font-family: "Sixtyfour"; src: url(/fonts/sixtyfour.woff2) format("woff2"); font-display: block; }
  @font-face { font-family: "Michroma"; src: url(/fonts/michroma.woff2) format("woff2"); font-display: block; }
  @font-face { font-family: "IBM Plex Sans"; src: url(/fonts/plex-sans.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
  @font-face { font-family: "IBM Plex Mono"; src: url(/fonts/plex-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
  :root { color-scheme: dark; --ink: #E8ECF2; --ink-2: rgba(232, 236, 242, .72); --panel: rgba(13, 24, 40, .82);
          --panel-hover: rgba(19, 34, 58, .95); --accent: #E8743B; --navy: #0D1828; }
  html, body { margin: 0; height: 100%; background: #000; overflow: hidden; }
  body { font: 400 15px/1.5 "IBM Plex Sans", system-ui, sans-serif; color: var(--ink); -webkit-font-smoothing: antialiased; }
  body.idle, body.idle * { cursor: none !important; }
  #video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
  #message { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; color: var(--ink-2); max-width: 80%; }
  #message .mark { display: block; color: var(--ink); font: 400 22px/1 "Sixtyfour", monospace; font-variation-settings: "SCAN" 60;
                   letter-spacing: -.02em; margin-bottom: 18px; }
  #message .mark i { font-style: normal; color: var(--accent); }
  #message b { display: block; color: var(--ink); font-size: 17px; font-weight: 500; margin-bottom: 2px; }
  button { font: 400 10.5px/1 "Michroma", sans-serif; letter-spacing: .12em; text-transform: uppercase;
           border: 0; border-radius: 3px; padding: 13px 18px; cursor: pointer; background: var(--panel); color: var(--ink);
           -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  button:hover { background: var(--panel-hover); }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  #sound { position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%); background: var(--accent); color: var(--navy); }
  #sound:hover { filter: brightness(1.08); }
  #controls { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 8px; transition: opacity .3s; }
  body.idle #controls { opacity: 0; pointer-events: none; }
  #stats { position: absolute; left: 12px; top: 12px; margin: 0; padding: 10px 14px; border-radius: 3px; background: var(--panel);
           color: var(--ink); font: 400 12px/1.55 "IBM Plex Mono", ui-monospace, monospace; white-space: pre; pointer-events: none;
           font-variant-numeric: tabular-nums; }
  [hidden] { display: none !important; }
</style>
</head>
<body>
<canvas id="video" width="2" height="2"></canvas>
<div id="message"><span class="mark">tv<i>pipe</i></span><b>Connecting…</b><span id="detail"></span></div>
<button id="sound" hidden>Click for sound</button>
<div id="controls">
  <button id="statsButton" title="Statistics (S)">Stats</button>
  <button id="fullscreen" title="Fullscreen (F, double-click)">Fullscreen</button>
</div>
<pre id="stats" hidden><span id="statsText"></span>
now     <span id="clock">–</span></pre>
<script src="/player.js"></script>
</body>
</html>