feat: hotkey for subtitle offset - #1067
Open
alex-rans wants to merge 2 commits into
Open
Conversation
PartyDonut
requested changes
Aug 9, 2026
PartyDonut
left a comment
Collaborator
There was a problem hiding this comment.
Looks good to me thanks for helping out.
Left some small requests.
Currently the offset is remembered even when stopping/starting playback. This should probably be reset after the video is done playing?
| VideoHotKeys.takeScreenshot => context.localized.takeScreenshot, | ||
| VideoHotKeys.takeScreenshotClean => context.localized.takeScreenshotClean, | ||
| VideoHotKeys.toggleSubtitles => context.localized.toggleSubtitles, | ||
| VideoHotKeys.subtitleOffsetBackward => 'Subtitle backward', |
Collaborator
There was a problem hiding this comment.
These should be localized in the app_en.arb base translations file.
| String _subtitleDelayLabel(Duration offset) { | ||
| final absMilliseconds = offset.inMilliseconds.abs(); | ||
| final sign = offset.inMilliseconds >= 0 ? '+' : '-'; | ||
| return 'Subtitle $sign${absMilliseconds}ms'; |
Collaborator
There was a problem hiding this comment.
Should also be translated
| final mediaSegments = ref.read(playBackModel.select((value) => value?.mediaSegments)); | ||
| final position = ref.read(mediaPlaybackProvider).position; | ||
| final playing = ref.read(mediaPlaybackProvider.select((value) => value.playing)); | ||
| final subtitlesEnabled = ref.read(playBackModel)?.mediaStreams?.defaultSubStreamIndex != null && |
Collaborator
There was a problem hiding this comment.
We could just show the subtitle offset always, not sure we have to hide it if nothing is selected.
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.
Pull Request Description
Adds hotkeys to offset subtitles forwards and backwards in time in increments of 250ms. The new hotkeys are left control + left/right arrow key. Adds an indicator to display how much the subtitles are offset in ms in the video player as well. The functionality appears to be somewhat buggy on the web client.
TODO?: Localization in video_player_settings.dart is currently just written in english, but I don't think it really matters that much as there's no way to display that text (as far as im aware)
Issue Being Fixed
Resolves #670
Screenshots / Recordings
Tested On
Checklist