Skip to content

Feature/increase subtitle offset - #673

Open
AndreOliveira23 wants to merge 3 commits into
ProdigyV21:mainfrom
AndreOliveira23:feature/increase-subtitle-offset
Open

Feature/increase subtitle offset#673
AndreOliveira23 wants to merge 3 commits into
ProdigyV21:mainfrom
AndreOliveira23:feature/increase-subtitle-offset

Conversation

@AndreOliveira23

Copy link
Copy Markdown

Description

This PR increases the maximum subtitle synchronization offset from ±10 seconds to ±120 seconds, allowing users to better adjust out-of-sync subtitles while maintaining the precise 100ms adjustment steps.

Changes Included:

  • Constants Extraction: app/src/main/kotlin/com/arflix/tv/ui/screens/player/PlayerScreen.kt: Replaced hardcoded magic numbers by introducing MAX_SUBTITLE_OFFSET_MS = 120L and SUBTITLE_OFFSET_STEP_MS = 100L to improve code maintainability.

  • D-Pad Navigation: Updated the Key.DirectionLeft and Key.DirectionRight event handlers in the subtitle settings panel to use the new ±100s boundary limits (coerceAtLeast and coerceAtMost).

  • On-Screen Controls: Updated the onOffsetDecrease and onOffsetIncrease callbacks inside the PlayerSubtitleSettingsPanel invocation to match the expanded limits.

Closes #595

Currently, the max offset is 10 seconds. This PR introduces variables to control both the offset and the step (both in MS).
Currently, the max offset is 10 seconds. This PR introduces variables to control both the offset and the step (both in MS).
…' into feature/increase-subtitle-offset

# Conflicts:
#	app/src/main/kotlin/com/arflix/tv/ui/screens/player/PlayerScreen.kt
@github-actions github-actions Bot added the area: android Changes to the Android app or Gradle build label Sep 8, 2026
@ProdigyV21

Copy link
Copy Markdown
Owner

Thanks for working on this! Have you personally run into subtitles being more than 10 seconds out of sync, where choosing another subtitle track did not solve it? I have not encountered this myself, and most sources I use offer several subtitle options, so I would like to understand how often it happens and when the larger range would help. A real example would be useful. If we go ahead, please also update the mobile controls, which still stop at +/-10 seconds.

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

Labels

area: android Changes to the Android app or Gradle build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Increase or Decrease the subtitle offset for more than 10 seconds

2 participants