Skip to content

Add configurable player buffering settings UI for Android TV#310

Open
annrose2277-glitch wants to merge 1 commit into
ProdigyV21:mainfrom
annrose2277-glitch:features
Open

Add configurable player buffering settings UI for Android TV#310
annrose2277-glitch wants to merge 1 commit into
ProdigyV21:mainfrom
annrose2277-glitch:features

Conversation

@annrose2277-glitch
Copy link
Copy Markdown

🎯 Background / Motivation
Currently, the media player uses hardcoded buffering constraints (12s min, 45s max) and a fixed memory allocation (48 MB). While this "one-size-fits-all" approach works for standard environments, it severely degrades the user experience across edge cases:

High-Speed (Fiber/5G): Users experience unnecessary 3-second startup delays.

Unstable (IPTV/Mobile): Streams drop frequently due to insufficient buffer ceilings and timeouts.

closes #303

Low-Memory Hardware: Older TV sticks (384-512 MB RAM) face memory pressure from static cache allocations.

🛠️ Solution
Introduced a dedicated Buffering Settings screen (Playback Settings -> Buffering) built natively with Jetpack Compose for Android TV. This empowers users to tailor the ExoPlayer/media engine's network and memory footprint to their specific hardware and ISP setup.

Key Features Implemented:

Quick Presets Row: D-Pad focusable preset buttons for common scenarios: Default, High-Speed, Unstable, IPTV, Debrid, and Low-Memory.

Granular Sliders: TV-optimized slider components (with text readouts) for custom overrides:

Min Buffer: Adjustable from 3s to 30s (controls how fast a stream starts).

Max Buffer: Adjustable from 20s to 120s (controls stream resilience).

Max Memory Cache: Adjustable from 32 MB to 128 MB (controls RAM footprint).

TV Navigation: Fully integrated Material 3 / TV Compose focus modifiers to ensure smooth D-Pad navigation and visual feedback.

📁 Files Added
app/src/main/kotlin/com/arflix/tv/ui/screens/settings/BufferingSettingsScreen.kt (Note: update this path if you placed it elsewhere)

✅ Impact & Benefits
Instant Playback: Gigabit users can achieve near-instant stream startup.

Eliminates Stuttering: IPTV and mobile users can force massive buffers to survive connection drops.

Device Stability: Low-end Android TV hardware can scale down memory usage to prevent OOM (Out of Memory) crashes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configurable Player Buffering & Timeout Settings

1 participant