## Summary - add a versioned playback client profile for browser/runtime protocol, container, codec, header, proxy, insecure-media, and P2P-loader capabilities - generate compatible direct and proxy resources inside each provider and return a structured incompatibility error when route policy leaves no viable result - force provider proxy delivery for browser-forbidden headers, including affected Bilibili variants, while preserving explicit direct-only failures - keep legacy clients compatible and isolate capability-aware playback cache entries - serve `/oauth2/callback` through the same Flutter SPA entry point and keep public discovery anonymous ## Reproducible Web UI - move Flutter acquisition/build, source configuration, asset manifests, Brotli/gzip compression, and compile-time embedding into the independent `synctv-web-ui` crate - support prebuilt distributions, local projects, and Git sources pinned to an immutable full commit, with an ignored local override - fingerprint source, Flutter version, build arguments, dart-defines, builder generation, output, and compression settings - validate cached Git repository/revision/commit identity, support offline cache reuse, and rebuild only when relevant inputs change - pin and checksum the Flutter SDK in the Docker Web asset stage; backend-only builds require no Flutter, Git fetch, or network - serve embedded assets with ETags, compression negotiation, CSP, cache policy, Origin/CORS handling, and SPA fallback outside API/media routes ## Verification - `cargo fmt --all -- --check` - workspace `cargo check`, test/doc-test, and all-targets Clippy with warnings denied - provider tests: 200 passed, 1 ignored - OAuth core/API tests: 72 + 16 passed - `synctv-web-ui`: 10 passed - `synctv-api-http --features web-ui`: 12 passed - default Git source cold build from the pinned App commit, followed by offline hot-cache reuse in about 1.1 seconds - `cargo check -p synctv --features web-ui` and `docker buildx build --check .` - real Chrome playback, P2P, OAuth/Casdoor, multi-user sync, chat, media, playlist, upload, settings, and playback-history flows Companion frontend PR: https://github.com/synctv-org/synctv-app/pull/52 Release pin validation: https://github.com/synctv-org/synctv-release/pull/9 |
1 month ago | |
|---|---|---|
| .cargo | 2 months ago | |
| .config | 2 months ago | |
| .github | 1 month ago | |
| .sqlx | 1 month ago | |
| docs | 1 month ago | |
| helm/synctv | 1 month ago | |
| migrations | 1 month ago | |
| scripts | 1 month ago | |
| synctv | 1 month ago | |
| synctv-adapter | 1 month ago | |
| synctv-api | 1 month ago | |
| synctv-api-common | 1 month ago | |
| synctv-api-grpc | 1 month ago | |
| synctv-api-http | 1 month ago | |
| synctv-cluster | 1 month ago | |
| synctv-common | 1 month ago | |
| synctv-core | 1 month ago | |
| synctv-livestream | 1 month ago | |
| synctv-management | 1 month ago | |
| synctv-media-providers | 1 month ago | |
| synctv-proto | 1 month ago | |
| synctv-proto-build | 1 month ago | |
| synctv-proto-main | 1 month ago | |
| synctv-proto-playback-provider | 1 month ago | |
| synctv-proto-providers | 1 month ago | |
| synctv-proxy | 1 month ago | |
| synctv-realtime | 1 month ago | |
| synctv-web-ui | 1 month ago | |
| synctv-xiu | 1 month ago | |
| .dockerignore | 1 month ago | |
| .env.postgres.example | 2 months ago | |
| .env.redis.example | 2 months ago | |
| .env.synctv.example | 1 month ago | |
| .gitattributes | 2 months ago | |
| .gitignore | 1 month ago | |
| CONTRIBUTING.md | 2 months ago | |
| Cargo.lock | 1 month ago | |
| Cargo.toml | 1 month ago | |
| Dockerfile | 1 month ago | |
| LICENSE | 2 months ago | |
| Makefile | 1 month ago | |
| README.md | 1 month ago | |
| README.zh-CN.md | 1 month ago | |
| SECURITY.md | 2 months ago | |
| deny.toml | 2 months ago | |
| docker-compose.dev.yml | 1 month ago | |
| docker-compose.yml | 1 month ago | |
| rust-toolchain.toml | 1 month ago | |
| synctv.example.yaml | 1 month ago | |
README.md
SyncTV
SyncTV is a Rust implementation of a real-time synchronized video watching platform with media provider integration, livestreaming, HTTP/gRPC APIs, and Kubernetes-ready horizontal scaling.
Highlights
- Synchronized room playback with real-time state updates.
- Media providers for Bilibili, Twitch, YouTube, Douyin, TikTok, Huya, Douyu, AcFun, CCTV, Alist, Cloudreve, Emby/Jellyfin, FNOS, QNAP, Synology, Nextcloud, Seafile, TrueNAS, direct URLs, and livestream sources.
- RTMP push/pull, HLS, and HTTP-FLV livestream support.
- RTSP external pull with TCP/UDP transport and live HLS/HTTP-FLV remuxing.
- HTTP REST, public gRPC, WebSocket, management gRPC, metrics, RTMP, and STUN runtime surfaces.
- PostgreSQL-backed durable storage with optional Redis shared state, cache, rate limiting, and cluster coordination.
- Docker Compose and Helm deployment templates.
- Built-in management CLI and optional OpenAPI/Swagger UI.
- Astro Starlight documentation site with English and Simplified Chinese content.
Discussion and Contributors
Join the SyncTV Telegram discussion to talk with users and contributors about deployment, operations, media providers, client development, and the product roadmap.
Quick Start
Development environment from a full repository checkout:
# Starts PostgreSQL and Redis, then runs SyncTV locally with development settings.
make dev-serve
# Starts optional media/auth/storage dependencies too.
make dev-stack
# Runs real CLI/curl provider smoke tests through the Makefile dev startup path.
make dev-smoke
Production Compose uses generated PostgreSQL, Redis, and application secrets:
# Requires Docker Compose and openssl.
make compose-init
# Edit SYNCTV_BOOTSTRAP_ROOT_PASSWORD in .env.synctv before starting.
make compose-up
Validate configuration:
cargo +nightly run -p synctv --bin synctv -- config validate
Optional migration preflight. The server also runs embedded SQLx migrations automatically during startup:
cargo +nightly run -p synctv --bin synctv -- db migrate
Start locally:
cargo +nightly run -p synctv --bin synctv -- serve
Embedded Web client
The optional web-ui feature embeds a Flutter Web distribution in the HTTP
server. The browser client always uses the page origin, so one deployed Web UI
belongs to one SyncTV server. Build the configured Web distribution and server:
make web-ui-build
make web-release-build
synctv-web-ui/README.md documents prebuilt,
local-project, and immutable Git sources together with cache and offline
controls. The server provides SPA fallback, content types, ETags, Brotli/gzip
variants, cache policy, and CSP. OAuth uses the normal SPA entry point, while
provider verification uses its dedicated static page. API and media routes
remain outside the application-shell cache.
Keep the app and server protobuf snapshots aligned. Browser playback sends a
versioned PlaybackClientProfile; Providers use it with the configured proxy
policy to select direct or proxy routes before returning playback output.
Documentation
Read the complete documentation at docs.syncs.tv.
Download the native client from the client downloads guide or SyncTV App releases. Store builds are distributed through the supported app stores.
License
MIT. See LICENSE.