Tuner v1: HLS pipeline with playback/ingest modes

FFmpeg -> MediaMTX -> HLS relay with runtime-configurable modes:
- PLAYBACK_MODE: standard (mpegts), fmp4 (HEVC), llhls
- INGEST_MODE: rtmp, rtsp
- INGEST_AUDIO_MODE: aac, copy
- Hourly playlist auto-refresh from upstream URL
- Fullscreen video UI with collapsible sidebar, upstream-down banner
- Same-origin HLS proxy for HTTPS deployments

Tagged as the last HLS-based version before the mpegts.js (v2) rework.
This commit is contained in:
2026-06-12 19:17:15 -07:00
parent a41c3ee56c
commit 88a189de34
20 changed files with 814 additions and 123 deletions

View File

@@ -4,25 +4,44 @@
box-sizing: border-box;
}
body {
background: #0a0a0a;
color: #e0e0e0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
html, body, #root {
height: 100%;
}
body {
background: #000;
color: #e0e0e0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
overflow: hidden;
}
/* App shell: video fills everything, UI floats on top */
.app {
max-width: 960px;
margin: 0 auto;
padding: 16px;
position: fixed;
inset: 0;
background: #000;
/* height reserved for the fixed bottom status bar */
--status-bar-height: 49px;
}
/* Fullscreen video stage: sits above the bottom status bar so the
native video controls (play button) are never hidden behind it */
.stage {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: var(--status-bar-height);
z-index: 0;
}
/* Player */
.player-container {
position: relative;
position: absolute;
inset: 0;
width: 100%;
aspect-ratio: 16 / 9;
background: #111;
border-radius: 8px;
height: 100%;
background: #000;
overflow: hidden;
}
@@ -30,39 +49,116 @@ body {
width: 100%;
height: 100%;
display: block;
object-fit: contain;
background: #000;
}
.player-video:not([src]),
.player-video[src=""] {
display: none;
}
.player-video:not([src]) ~ .player-offline,
.player-video[src=""] ~ .player-offline {
display: flex;
}
/* Offline overlay is controlled by React state, not CSS src tricks */
.player-offline {
display: none;
display: flex;
position: absolute;
inset: 0;
align-items: center;
justify-content: center;
font-size: 1.25rem;
color: #666;
font-size: 1.5rem;
color: #555;
letter-spacing: 0.05em;
}
/* StatusBar */
/* Sidebar toggle button (far right, vertically centered) */
.sidebar-toggle {
position: fixed;
top: 50%;
right: 0;
transform: translateY(-50%);
z-index: 30;
width: 32px;
height: 64px;
border: none;
border-radius: 8px 0 0 8px;
background: rgba(20, 20, 20, 0.7);
backdrop-filter: blur(8px);
color: #e0e0e0;
font-size: 1.4rem;
line-height: 1;
cursor: pointer;
/* hidden by default; shown on interaction */
opacity: 0;
pointer-events: none;
transition: right 0.25s ease, background 0.15s, opacity 0.3s ease;
}
.sidebar-toggle.visible {
opacity: 1;
pointer-events: auto;
}
.sidebar-toggle:hover {
background: rgba(40, 40, 40, 0.85);
}
.sidebar-toggle.open {
right: 340px;
}
/* Sidebar */
.sidebar {
position: fixed;
top: 0;
right: 0;
bottom: 0;
width: 340px;
z-index: 20;
background: rgba(15, 15, 15, 0.82);
backdrop-filter: blur(12px);
border-left: 1px solid rgba(255, 255, 255, 0.08);
transition: transform 0.25s ease;
overflow: hidden;
}
.sidebar.collapsed {
transform: translateX(100%);
}
.sidebar.open {
transform: translateX(0);
}
.sidebar-inner {
display: flex;
flex-direction: column;
gap: 12px;
height: 100%;
padding: 16px;
/* leave room for the bottom status bar */
padding-bottom: 64px;
overflow-y: auto;
}
/* StatusBar (fixed to bottom) */
.status-bar {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 25;
height: var(--status-bar-height);
display: flex;
align-items: center;
gap: 10px;
padding: 12px 16px;
margin-top: 8px;
background: #1a1a1a;
border-radius: 6px;
padding: 0 16px;
background: rgba(15, 15, 15, 0.85);
backdrop-filter: blur(8px);
border-top: 1px solid rgba(255, 255, 255, 0.08);
font-size: 0.875rem;
white-space: nowrap;
overflow-x: auto;
overflow-y: hidden;
scrollbar-width: none;
}
.status-bar::-webkit-scrollbar {
display: none;
}
.status-dot {
@@ -114,6 +210,19 @@ body {
animation: switching-blink 1s step-end infinite;
}
.upstream-down-banner {
color: #fecaca;
background: #7f1d1d;
border: 1px solid #ef4444;
border-radius: 4px;
padding: 3px 10px;
font-size: 0.8rem;
font-weight: 800;
letter-spacing: 0.03em;
text-transform: uppercase;
box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}
@keyframes channel-pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
@@ -167,19 +276,13 @@ body {
color: #f87171;
}
/* Controls layout */
.controls {
display: grid;
grid-template-columns: 240px 1fr;
gap: 12px;
margin-top: 12px;
}
/* AdminPanel */
.admin-panel {
background: #1a1a1a;
background: rgba(26, 26, 26, 0.7);
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 6px;
padding: 16px;
flex-shrink: 0;
}
.admin-title {
@@ -237,12 +340,14 @@ body {
/* ChannelList */
.channel-list {
background: #1a1a1a;
background: rgba(26, 26, 26, 0.7);
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 6px;
padding: 16px;
display: flex;
flex-direction: column;
max-height: 500px;
flex: 1;
min-height: 0;
}
.channel-list-title {
@@ -256,6 +361,7 @@ body {
.channel-filters {
display: flex;
flex-direction: column;
gap: 8px;
margin-bottom: 12px;
}
@@ -287,7 +393,7 @@ body {
color: #e0e0e0;
font-size: 0.875rem;
outline: none;
min-width: 140px;
width: 100%;
}
.channel-items {
@@ -356,8 +462,11 @@ body {
color: #666;
}
@media (max-width: 640px) {
.controls {
grid-template-columns: 1fr;
@media (max-width: 480px) {
.sidebar {
width: 100%;
}
.sidebar-toggle.open {
right: calc(100% - 32px);
}
}