feat(design): Warm Cinema redesign + fast-start players

Full visual overhaul from Cyber-Cinematic Glass to "Warm Cinema":
warm charcoal (#0B0908), cream (#F3E9DF), ember (#D9541F).
Fraunces (editorial serif) for display, Karla for body/UI.

Design
- app_colors: new palette, all existing token names preserved,
  plus posterScrim/heroScrim gradients and lift()/emberFocus() shadows
- app_theme: new type scale, tighter radii, 20+ component themes
- mobile_theme aligned on the same tokens
- glass_container: opaque layered surfaces replace glassmorphism;
  adds GlassCard (hover + remote-focus states) and CinemaBackdrop
- players and boot splash restyled (film-leader motif, no web fonts)

Performance
- remove every BackdropFilter (33 call sites): backdrop blur forced a
  full framebuffer read per frame per card, the main scroll jank source
- bundle Fraunces/Karla as assets: google_fonts no longer fetches from
  fonts.gstatic.com at startup
- drop the blocking hls.js CDN script from index.html; no Dart code
  ever used it, only the player iframes need it
- self-host hls.js/mpegts.js and load them on demand, so ~213 KB of
  mpegts is never downloaded for HLS streams
- bound image decode size on 10 sites: a 40-poster grid drops from
  ~240 MB to a few tens of MB of GPU memory

Players (new shared engine: web/xf-player-core.js)
- event-driven start instead of a 200 ms buffer poll plus a 1.5 s wait
- initialLiveManifestSize 3 -> 1, liveSyncDurationCount 10 -> 2,
  startFragPrefetch on, testBandwidth off
- MPEG-TS initial stash 512 KB -> 64 KB
- adaptive escalation fast -> balanced -> safe on repeated stalls
  (60 s rolling window), applied live for HLS so there is no visible cut

Pre-existing build breakage fixed along the way
- undefined AppColors.shimmer, AppTheme.durationXs and spacing8/12/16/32
- broken relative imports in channel_card and quality_selector_widget
- missing GlassCard widget and hasBorder/showShadow parameters

Also resolves a leftover unmerged .claude/settings.local.json by
keeping the remote version.

Still broken (pre-existing, dead code, not reachable from main.dart):
recommendations_provider.dart and continue_watching_widget.dart import
a models/playlist.dart that no longer exists.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Opus 5 committed 2026-08-10 21:26:25 +02:00
1 parent cb5eca7547
commit 6f0f51384a
54 files changed
+2425 -1775

No files matched your search

+31 -31
View File
@@ -446,7 +446,7 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
'Unknown')
.toString()
: widget.title,
style: GoogleFonts.outfit(
style: GoogleFonts.karla(
color: AppColors.textPrimary,
fontSize: 18,
fontWeight: FontWeight.w600,
@@ -455,7 +455,7 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
),
Text(
'Live TV',
style: GoogleFonts.inter(
style: GoogleFonts.karla(
color: AppColors.primary,
fontSize: 12,
fontWeight: FontWeight.bold,
@@ -512,7 +512,7 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
_buildInlineEpg(),
const SizedBox(height: 12),
const Divider(
color: Colors.white10,
color: AppColors.onSurface06,
),
const SizedBox(height: 8),
// Control Buttons
@@ -612,10 +612,10 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
Expanded(
child: Text(
widget.title,
style: GoogleFonts.outfit(
style: GoogleFonts.karla(
fontSize: 20,
fontWeight: FontWeight.w600,
color: Colors.white,
color: AppColors.onSurface,
),
),
),
@@ -639,7 +639,7 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
right: 40,
child: GlassContainer.glass(
borderRadius: 24,
borderColor: Colors.white.withOpacity(0.1),
borderColor: AppColors.onSurface.withOpacity(0.1),
padding: const EdgeInsets.all(24),
child: Column(
mainAxisSize: MainAxisSize.min,
@@ -653,8 +653,8 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
seconds: _currentPosition.toInt(),
),
),
style: GoogleFonts.inter(
color: Colors.white70,
style: GoogleFonts.karla(
color: AppColors.onSurfaceVariant,
),
),
const SizedBox(width: 16),
@@ -664,8 +664,8 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
trackHeight: 4,
activeTrackColor: AppColors.primary,
inactiveTrackColor:
Colors.white.withOpacity(0.2),
thumbColor: Colors.white,
AppColors.onSurface.withOpacity(0.2),
thumbColor: AppColors.onSurface,
thumbShape: const RoundSliderThumbShape(
enabledThumbRadius: 8,
),
@@ -705,8 +705,8 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
seconds: _totalDuration.toInt(),
),
),
style: GoogleFonts.inter(
color: Colors.white70,
style: GoogleFonts.karla(
color: AppColors.onSurfaceVariant,
),
),
],
@@ -784,7 +784,7 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
}) {
// Button with direct Material/InkWell - PointerInterceptor is on outer container
return Material(
color: transparent ? Colors.transparent : Colors.white.withOpacity(0.1),
color: transparent ? Colors.transparent : AppColors.onSurface.withOpacity(0.1),
shape: const CircleBorder(),
child: InkWell(
onTap: () {
@@ -800,9 +800,9 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
shape: BoxShape.circle,
border: transparent
? null
: Border.all(color: Colors.white.withOpacity(0.1)),
: Border.all(color: AppColors.onSurface.withOpacity(0.1)),
),
child: Icon(icon, color: Colors.white, size: iconSize),
child: Icon(icon, color: AppColors.onSurface, size: iconSize),
),
),
);
@@ -867,7 +867,7 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
return Material(
color: highlighted
? AppColors.primary.withOpacity(0.2)
: Colors.white.withOpacity(0.1),
: AppColors.onSurface.withOpacity(0.1),
shape: const CircleBorder(),
child: InkWell(
onTap: () {
@@ -886,13 +886,13 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
border: Border.all(
color: highlighted
? AppColors.primary.withOpacity(0.5)
: Colors.white.withOpacity(0.2),
: AppColors.onSurface.withOpacity(0.2),
width: highlighted ? 2 : 1,
),
),
child: Icon(
icon,
color: highlighted ? AppColors.primary : Colors.white,
color: highlighted ? AppColors.primary : AppColors.onSurface,
size: iconSize,
),
),
@@ -930,7 +930,7 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
child: const Text(
'LIVE',
style: TextStyle(
color: Colors.white,
color: AppColors.onSurface,
fontSize: 11,
fontWeight: FontWeight.bold,
),
@@ -942,8 +942,8 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
widget.channels != null
? widget.channels![_currentIndex].name
: widget.title,
style: GoogleFonts.outfit(
color: Colors.white,
style: GoogleFonts.karla(
color: AppColors.onSurface,
fontSize: 16,
fontWeight: FontWeight.w600,
),
@@ -978,7 +978,7 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
child: const Text(
'LIVE',
style: TextStyle(
color: Colors.white,
color: AppColors.onSurface,
fontSize: 11,
fontWeight: FontWeight.bold,
),
@@ -992,8 +992,8 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
children: [
Text(
currentProgram.title,
style: GoogleFonts.outfit(
color: Colors.white,
style: GoogleFonts.karla(
color: AppColors.onSurface,
fontSize: 15,
fontWeight: FontWeight.w600,
),
@@ -1003,8 +1003,8 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
if (currentProgram.description.isNotEmpty)
Text(
currentProgram.description,
style: GoogleFonts.inter(
color: Colors.white60,
style: GoogleFonts.karla(
color: AppColors.onSurface54,
fontSize: 12,
),
maxLines: 1,
@@ -1027,7 +1027,7 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
child: const Text(
'LIVE',
style: TextStyle(
color: Colors.white,
color: AppColors.onSurface,
fontSize: 11,
fontWeight: FontWeight.bold,
),
@@ -1038,8 +1038,8 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
widget.channels != null
? widget.channels![_currentIndex].name
: widget.title,
style: GoogleFonts.outfit(
color: Colors.white,
style: GoogleFonts.karla(
color: AppColors.onSurface,
fontSize: 16,
fontWeight: FontWeight.w600,
),
@@ -1050,8 +1050,8 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
widget.channels != null
? widget.channels![_currentIndex].name
: widget.title,
style: GoogleFonts.outfit(
color: Colors.white,
style: GoogleFonts.karla(
color: AppColors.onSurface,
fontSize: 16,
fontWeight: FontWeight.w600,
),