Add configurable player buffering settings UI for Android TV#310
Open
annrose2277-glitch wants to merge 1 commit into
Open
Add configurable player buffering settings UI for Android TV#310annrose2277-glitch wants to merge 1 commit into
annrose2277-glitch wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 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.