Files
tuner/frontend/src/App.css
Scott Register 88a189de34 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.
2026-06-12 19:17:15 -07:00

473 lines
7.6 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
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 {
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: absolute;
inset: 0;
width: 100%;
height: 100%;
background: #000;
overflow: hidden;
}
.player-video {
width: 100%;
height: 100%;
display: block;
object-fit: contain;
background: #000;
}
/* Offline overlay is controlled by React state, not CSS src tricks */
.player-offline {
display: flex;
position: absolute;
inset: 0;
align-items: center;
justify-content: center;
font-size: 1.5rem;
color: #555;
letter-spacing: 0.05em;
}
/* 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: 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 {
width: 10px;
height: 10px;
border-radius: 50%;
flex-shrink: 0;
}
.status-dot.live {
background: #22c55e;
box-shadow: 0 0 6px #22c55e80;
}
.status-dot.offline {
background: #555;
}
.status-text {
font-weight: 600;
}
.status-separator {
color: #444;
}
.status-source {
color: #aaa;
}
.status-channel {
color: #67e8f9;
display: flex;
align-items: center;
gap: 8px;
}
.status-channel.channel-transitioning {
animation: channel-pulse 1.2s ease-in-out infinite;
}
.channel-switching {
font-size: 0.75rem;
font-weight: 600;
color: #fbbf24;
background: #713f12;
padding: 1px 6px;
border-radius: 3px;
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; }
}
@keyframes switching-blink {
0%, 100% { opacity: 1; }
50% { opacity: 0.4; }
}
.status-health {
display: flex;
align-items: center;
gap: 8px;
font-size: 0.8rem;
font-family: "SF Mono", "Fira Code", monospace;
}
.health-indicator {
padding: 2px 8px;
border-radius: 3px;
font-size: 0.75rem;
font-weight: 600;
}
.health-good {
background: #14532d;
color: #4ade80;
}
.health-warn {
background: #713f12;
color: #fbbf24;
}
.health-bad {
background: #7f1d1d;
color: #f87171;
}
.health-unknown {
background: #333;
color: #888;
}
.health-stats {
color: #888;
}
.health-drops {
color: #f87171;
}
/* AdminPanel */
.admin-panel {
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 {
font-size: 0.875rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
color: #888;
margin-bottom: 12px;
}
.source-buttons {
display: flex;
gap: 8px;
margin-bottom: 16px;
}
.source-btn {
flex: 1;
padding: 8px 12px;
border: 1px solid #333;
border-radius: 4px;
background: #2a2a2a;
color: #ccc;
font-size: 0.875rem;
cursor: pointer;
transition: all 0.15s;
}
.source-btn:hover {
background: #333;
}
.source-btn.active {
background: #164e63;
border-color: #22d3ee;
color: #67e8f9;
}
.reload-btn {
width: 100%;
padding: 8px 12px;
border: 1px solid #333;
border-radius: 4px;
background: #2a2a2a;
color: #ccc;
font-size: 0.8rem;
cursor: pointer;
transition: all 0.15s;
}
.reload-btn:hover {
background: #333;
}
/* ChannelList */
.channel-list {
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;
flex: 1;
min-height: 0;
}
.channel-list-title {
font-size: 0.875rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
color: #888;
margin-bottom: 12px;
}
.channel-filters {
display: flex;
flex-direction: column;
gap: 8px;
margin-bottom: 12px;
}
.channel-search {
flex: 1;
padding: 8px 10px;
border: 1px solid #333;
border-radius: 4px;
background: #2a2a2a;
color: #e0e0e0;
font-size: 0.875rem;
outline: none;
}
.channel-search:focus {
border-color: #555;
}
.channel-search::placeholder {
color: #666;
}
.channel-group-filter {
padding: 8px 10px;
border: 1px solid #333;
border-radius: 4px;
background: #2a2a2a;
color: #e0e0e0;
font-size: 0.875rem;
outline: none;
width: 100%;
}
.channel-items {
overflow-y: auto;
flex: 1;
display: flex;
flex-direction: column;
gap: 4px;
}
.channel-item {
display: flex;
align-items: center;
gap: 10px;
padding: 8px 10px;
border: 1px solid transparent;
border-radius: 4px;
background: #2a2a2a;
color: #e0e0e0;
text-align: left;
cursor: pointer;
transition: all 0.15s;
font-size: 0.875rem;
width: 100%;
}
.channel-item:hover {
background: #333;
}
.channel-item.active {
border-color: #22d3ee;
background: #164e63;
}
.channel-logo {
width: 32px;
height: 32px;
border-radius: 4px;
object-fit: contain;
background: #1a1a1a;
flex-shrink: 0;
}
.channel-info {
display: flex;
flex-direction: column;
min-width: 0;
}
.channel-name {
font-weight: 500;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.channel-group {
font-size: 0.75rem;
color: #888;
}
.channel-empty {
padding: 24px;
text-align: center;
color: #666;
}
@media (max-width: 480px) {
.sidebar {
width: 100%;
}
.sidebar-toggle.open {
right: calc(100% - 32px);
}
}