streamd: preview quality picker, dashboard polish, C4 wrap keys
All checks were successful
release / build-and-upload (push) Successful in 6m18s
modules-release / build-and-upload (push) Successful in 5m18s

- Preview player can select FHD/HD/SD (or ABR master) from publish links
- Embed dashboard screenshots in README; Linux streamd+agent setup guide
- C4 Widevine wrap license mode + require --wvd; prefer Widevine PSSH
- Channel 4 and My5 modules; streamd auth, variants, schedules, HLS gate
This commit is contained in:
404errordeveloper 2026-10-09 20:57:43 +02:00
parent b3955bd81e
commit 066e018749
113 changed files with 19002 additions and 1541 deletions

View file

@ -4,128 +4,102 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>streamd</title>
<meta name="color-scheme" content="light dark" />
<link rel="stylesheet" href="/static/app.css" />
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%23c47a12'/%3E%3Cpath d='M12 9l12 7-12 7z' fill='white'/%3E%3C/svg%3E" />
</head>
<body>
<header>
<h1>streamd</h1>
<div class="header-right">
<span id="uptime" class="muted"></span>
<span id="deps-status" class="muted" title="Media tool paths"></span>
<label class="token-box">token <input id="token" type="password" placeholder="STREAMD_TOKEN" autocomplete="off" /></label>
</div>
</header>
<section class="card">
<h2>Add stream</h2>
<form id="create-form" class="grid">
<label>name <input name="name" required placeholder="my-channel" /></label>
<label>title <input name="title" placeholder="My Channel" /></label>
<label>app
<select name="app" id="app-select"></select>
</label>
<label>channel
<select name="channel" id="channel-select"></select>
</label>
<label class="span2">mpd <input name="mpd" placeholder="https://…/manifest.mpd (required to start)" /></label>
<label class="span2">key <textarea name="key" rows="3" placeholder="optional — KID:KEY lines (clear streams like BBC need no keys)" spellcheck="false"></textarea></label>
<label class="span2">proxy <input name="proxy" placeholder="optional — socks5://127.0.0.1:1080 or http://127.0.0.1:8080 (origin fetch)" /></label>
<label class="span2">headers JSON <input name="headers_json" value="{}" /></label>
<fieldset class="span2 variants-field">
<legend>Output variants</legend>
<p class="hint">FHD is the source copy. Enable HD / SD to also publish scaled HLS playlists as separate streams.</p>
<div class="variant-toggles" id="create-variants">
<label class="variant-card on locked">
<input type="checkbox" data-id="fhd" checked disabled />
<span class="v-title">FHD</span>
<span class="v-meta">source · copy</span>
</label>
<label class="variant-card">
<input type="checkbox" data-id="hd" data-height="720" data-vbr="2800k" data-abr="128k" />
<span class="v-title">HD</span>
<span class="v-meta">720p · 2800k</span>
</label>
<label class="variant-card">
<input type="checkbox" data-id="sd" data-height="480" data-vbr="1200k" data-abr="96k" />
<span class="v-title">SD</span>
<span class="v-meta">480p · 1200k</span>
</label>
<!-- The shell is static; every view is rendered into #view by the router. -->
<div id="app" hidden>
<aside id="sidebar">
<div class="brand">
<span class="logo" aria-hidden="true"></span>
<span class="brand-name">streamd</span>
<button type="button" id="nav-close" class="icon-btn only-mobile" aria-label="Close menu">&times;</button>
</div>
<nav id="nav">
<a href="#/" data-nav="/">
<span class="ico" aria-hidden="true"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="2" y="2" width="5" height="5" rx="1"/><rect x="9" y="2" width="5" height="5" rx="1"/><rect x="2" y="9" width="5" height="5" rx="1"/><rect x="9" y="9" width="5" height="5" rx="1"/></svg></span>
Dashboard
</a>
<a href="#/streams" data-nav="/streams">
<span class="ico" aria-hidden="true"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 4h12M2 8h12M2 12h8"/></svg></span>
Streams
</a>
<a href="#/schedule" data-nav="/schedule">
<span class="ico" aria-hidden="true"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="8" cy="8" r="5.5"/><path d="M8 5v3.5l2.5 1.5"/></svg></span>
Schedule
</a>
<a href="#/settings" data-nav="/settings" data-admin>
<span class="ico" aria-hidden="true"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="8" cy="8" r="2.2"/><path d="M8 1.8v1.6M8 12.6v1.6M1.8 8h1.6M12.6 8h1.6M3.4 3.4l1.1 1.1M11.5 11.5l1.1 1.1M3.4 12.6l1.1-1.1M11.5 4.5l1.1-1.1"/></svg></span>
Settings
</a>
<a href="#/people" data-nav="/people" data-admin>
<span class="ico" aria-hidden="true"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="6" cy="5.5" r="2.2"/><path d="M1.8 13c0-2.3 1.9-4.2 4.2-4.2s4.2 1.9 4.2 4.2"/><path d="M11 7.2a2 2 0 1 0 0-4"/><path d="M12.8 13c0-1.5-.7-2.8-1.8-3.5"/></svg></span>
People &amp; keys
</a>
<a href="#/audit" data-nav="/audit" data-admin>
<span class="ico" aria-hidden="true"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M4 2.5h6.5L13 5v8.5H4z"/><path d="M10.5 2.5V5H13"/><path d="M6 8h4M6 10.5h3"/></svg></span>
Audit log
</a>
</nav>
<div class="sidebar-foot">
<div id="agent-chip" class="chip" title="Capture agents connected">
<span class="chip-label">Agents</span>
<span class="chip-val">—</span>
</div>
</fieldset>
<div class="span2 actions">
<button type="submit">Create</button>
</div>
</form>
<p id="form-msg" class="msg"></p>
</section>
<section class="card">
<div class="row-between">
<h2>Streams</h2>
<div class="row-actions">
<span id="agents-status" class="muted">agents: —</span>
<button type="button" id="refresh" class="ghost">Refresh</button>
</div>
</div>
<div class="table-wrap">
<table>
<thead>
<tr>
<th>name</th>
<th>app / channel</th>
<th>health</th>
<th>claim</th>
<th>age</th>
<th>links</th>
<th>actions</th>
</tr>
</thead>
<tbody id="rows"></tbody>
</table>
</div>
<p id="list-msg" class="msg muted">Loading…</p>
</section>
<dialog id="edit-dlg">
<form method="dialog" id="edit-form" class="grid">
<h2 class="span2">Edit stream</h2>
<input type="hidden" name="id" />
<label>title <input name="title" /></label>
<label>channel <input name="channel" /></label>
<label class="span2">mpd <input name="mpd" /></label>
<label class="span2">key <textarea name="key" rows="3" placeholder="optional — KID:KEY (one per line)" spellcheck="false"></textarea></label>
<label class="span2">proxy <input name="proxy" placeholder="socks5://127.0.0.1:1080" /></label>
<label class="span2">headers JSON <input name="headers_json" /></label>
<fieldset class="span2 variants-field">
<legend>Output variants</legend>
<p class="hint">Each enabled rung publishes its own <code>m3u8</code>. FHD stays the source; HD/SD are live-transcoded.</p>
<div class="variant-toggles" id="edit-variants">
<label class="variant-card on locked">
<input type="checkbox" data-id="fhd" checked disabled />
<span class="v-title">FHD</span>
<span class="v-meta">source · copy</span>
</label>
<label class="variant-card">
<input type="checkbox" data-id="hd" data-height="720" data-vbr="2800k" data-abr="128k" />
<span class="v-title">HD</span>
<span class="v-meta">720p · 2800k</span>
</label>
<label class="variant-card">
<input type="checkbox" data-id="sd" data-height="480" data-vbr="1200k" data-abr="96k" />
<span class="v-title">SD</span>
<span class="v-meta">480p · 1200k</span>
</label>
<div id="deps-chip" class="chip" title="Media tool availability">
<span class="chip-label">Tools</span>
<span class="chip-val">—</span>
</div>
</fieldset>
<div class="span2 actions">
<button type="submit" value="save">Save</button>
<button type="button" id="edit-cancel" class="ghost">Cancel</button>
</div>
</aside>
<div id="main">
<header id="topbar">
<button type="button" id="nav-open" class="icon-btn only-mobile" aria-label="Open menu">☰</button>
<h1 id="page-title">Dashboard</h1>
<div class="spacer"></div>
<span id="conn" class="conn" title="Live connection">Live</span>
<span id="uptime" class="muted" title="Server uptime"></span>
<button type="button" id="theme-btn" aria-label="Switch colour theme">
<span id="theme-btn-label">Dark</span>
</button>
<div class="who">
<span id="who-name" class="mono"></span>
<span id="who-role" class="pill role"></span>
<button type="button" id="logout-btn" class="ghost sm">Sign out</button>
</div>
</header>
<main id="view" tabindex="-1"></main>
</div>
</div>
<!-- Login / first-run setup. Shown before #app, so nothing leaks to an
unauthenticated visitor. -->
<div id="gate" hidden>
<form id="login-form" class="auth-card">
<span class="logo big" aria-hidden="true"></span>
<h2 id="gate-title">Sign in to streamd</h2>
<p class="auth-sub">Null DRM restream control</p>
<p id="gate-note" class="hint"></p>
<label id="setup-row" hidden>Setup token
<input name="setup_token" autocomplete="off" spellcheck="false" />
<small class="hint">Printed in the streamd startup log.</small>
</label>
<label>Username <input name="username" autocomplete="username" required /></label>
<label>Password <input name="password" type="password" autocomplete="current-password" required /></label>
<p id="gate-msg" class="msg" role="alert"></p>
<button type="submit" id="gate-submit">Sign in</button>
</form>
</div>
<div id="toast-stack" aria-live="polite"></div>
<dialog id="modal">
<div id="modal-body"></div>
</dialog>
<div id="toast" class="toast" hidden></div>
<script src="/static/app.js"></script>
<script type="module" src="/static/js/app.js"></script>
</body>
</html>