Initial commit: LiveStream Platform

Backend: FastAPI + SQLAlchemy + SQLite
Frontend: React + Vite + Ant Design (serif Anthropic theme)
Media server: MediaMTX with edge node support
Load balancing: round-robin / weighted / least-conn
Multicast detection with automatic fallback
Transcoding support via FFmpeg (configurable quality)
hls.js player with line & quality switching
Admin panel with password auth
Windows compatible scripts
This commit is contained in:
admin committed 2026-08-07 15:02:07 +08:00
commit 2e4594fa77
43 files changed
+2196

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
import api, { setToken, getToken } from './client'
export async function login(password: string): Promise<string> {
const { data } = await api.post(`/auth/login?password=${encodeURIComponent(password)}`)
setToken(data.token)
return data.token
}
export async function verifyToken(): Promise<boolean> {
const token = getToken()
if (!token) return false
try {
await api.post(`/auth/verify?token=${encodeURIComponent(token)}`)
return true
} catch {
return false
}
}