Frontend
- Replace the Ant Design app with the shadcn/ui app as the single frontend,
keeping the portfolio side-by-side revertible in this commit.
- Drop the abandoned mdui experiment and the AntD tree so there is one app,
one router and one design system to maintain.
Live playback
- Stop racing the encoder. lowLatencyMode + liveSyncDurationCount:1 targeted a
single 4s segment, so playback ran at up to 1.10x and the forward buffer
bottomed out at 0.1s, re-buffering every segment. Measured over 40s:
buffer min 0.1s -> 8.9s, rate 1.00 constant, 0 stalls.
- Remove the 落后 labels and the page-level edge-snapping timer that fought
hls.js over two different definitions of "latency".
- Live can no longer be paused: the control is not rendered while it plays, so
the icon can never misreport state.
- Fix autoplay: muted autoplay started silently and never unmuted, and the
gesture that restored sound also toggled playback off. One owner now.
Source ("原画") rendition
- Publish the publisher's stream remuxed losslessly via -c:v copy alongside the
transcoded ones, so a source option exists even when every ladder entry
downsizes.
- Give renditions an ASCII path slug: the HLS path is part of the URL and
MediaMTX rejects non-alphanumeric paths, so 原画 could never be served.
Backend
- Supervise MediaMTX from the backend: start it at boot and restart it on exit,
never killing an origin it did not start.
- Clear stale HLS output before restarting an encoder; an ENDLIST-less playlist
left by a dead encoder hangs hls.js forever.
- Mark JSON timestamps as UTC. utcnow().isoformat() emitted a naive string that
JS read as local time, so every viewer heartbeat looked 8 hours old in UTC+8
and the live board's active-viewer count was permanently zero.
- Rebind a viewer session when it arrives on another stream instead of failing,
and survive the StrictMode double-heartbeat race on first insert.
- Replace the Linux-only /proc and os.getloadavg metrics with psutil.
- Complete MediaMTX's cookieCheck redirect inside /hls proxying, and hold the
httpx client open for the streamed body.
Housekeeping
- Ignore RainOSS (it stores accessKeySecret), runtime output, TLS keys and
.venv; remove generated screenshots, load test scripts and stray files.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
127 lines
2.8 KiB
CSS
127 lines
2.8 KiB
CSS
@tailwind base;
|
|
@tailwind components;
|
|
@tailwind utilities;
|
|
|
|
@layer base {
|
|
:root {
|
|
--background: 45 8% 11%;
|
|
--foreground: 42 24% 93%;
|
|
--card: 45 7% 14%;
|
|
--card-foreground: 42 24% 93%;
|
|
--popover: 45 7% 15%;
|
|
--popover-foreground: 42 24% 93%;
|
|
--primary: 43 90% 62%;
|
|
--primary-foreground: 40 30% 12%;
|
|
--secondary: 45 7% 18%;
|
|
--secondary-foreground: 42 24% 93%;
|
|
--muted: 45 7% 17%;
|
|
--muted-foreground: 43 12% 62%;
|
|
--accent: 45 7% 19%;
|
|
--accent-foreground: 42 24% 93%;
|
|
--destructive: 16 72% 60%;
|
|
--destructive-foreground: 42 24% 93%;
|
|
--border: 45 8% 21%;
|
|
--input: 45 8% 22%;
|
|
--ring: 43 90% 62%;
|
|
--radius: 0.625rem;
|
|
}
|
|
}
|
|
|
|
@layer base {
|
|
* {
|
|
@apply border-border;
|
|
}
|
|
body {
|
|
@apply bg-background text-foreground antialiased;
|
|
font-feature-settings: 'rlig' 1, 'calt' 1;
|
|
font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
|
}
|
|
}
|
|
|
|
@layer utilities {
|
|
.font-display {
|
|
font-family: Georgia, 'Times New Roman', ui-serif, serif;
|
|
}
|
|
.shadow-warm {
|
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 32px rgba(0, 0, 0, 0.22);
|
|
}
|
|
.shadow-warm-lg {
|
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 22px 58px rgba(0, 0, 0, 0.28);
|
|
}
|
|
.scrollbar-thin {
|
|
scrollbar-width: thin;
|
|
scrollbar-color: hsl(var(--border)) transparent;
|
|
}
|
|
.scrollbar-thin::-webkit-scrollbar {
|
|
width: 8px;
|
|
height: 8px;
|
|
}
|
|
.scrollbar-thin::-webkit-scrollbar-thumb {
|
|
background-color: hsl(var(--border));
|
|
border-radius: 8px;
|
|
}
|
|
}
|
|
|
|
/* Markdown content rendered by the viewer (description / chapters intro). */
|
|
.md-content {
|
|
font-size: 0.875rem;
|
|
line-height: 1.7;
|
|
color: hsl(var(--foreground));
|
|
}
|
|
.md-content h1,
|
|
.md-content h2,
|
|
.md-content h3,
|
|
.md-content h4 {
|
|
font-weight: 600;
|
|
margin: 1rem 0 0.5rem;
|
|
}
|
|
.md-content h1 {
|
|
font-size: 1.25rem;
|
|
}
|
|
.md-content h2 {
|
|
font-size: 1.125rem;
|
|
}
|
|
.md-content h3 {
|
|
font-size: 1rem;
|
|
}
|
|
.md-content p {
|
|
margin: 0.5rem 0;
|
|
}
|
|
.md-content ul,
|
|
.md-content ol {
|
|
padding-left: 1.25rem;
|
|
margin: 0.5rem 0;
|
|
}
|
|
.md-content ul {
|
|
list-style: disc;
|
|
}
|
|
.md-content ol {
|
|
list-style: decimal;
|
|
}
|
|
.md-content a {
|
|
color: hsl(var(--primary));
|
|
text-decoration: underline;
|
|
}
|
|
.md-content code {
|
|
background: hsl(var(--muted));
|
|
padding: 0.125rem 0.375rem;
|
|
border-radius: 0.25rem;
|
|
font-size: 0.8rem;
|
|
}
|
|
.md-content pre {
|
|
background: hsl(var(--muted));
|
|
padding: 0.75rem;
|
|
border-radius: 0.375rem;
|
|
overflow-x: auto;
|
|
}
|
|
.md-content blockquote {
|
|
border-left: 3px solid hsl(var(--border));
|
|
padding-left: 0.75rem;
|
|
color: hsl(var(--muted-foreground));
|
|
}
|
|
|
|
/* Swagger UI sits inside a dark card; keep its own theme independent. */
|
|
#swagger-container .swagger-ui {
|
|
font-family: inherit;
|
|
}
|