Skip to content

feat: Add subtitles button for videos - #2081

Merged
adrien-coye merged 3 commits into
masterfrom
feat/video-subtitles
Nov 19, 2026
Merged

adrien-coye merged 3 commits into
masterfrom
feat/video-subtitles

Conversation

@BaptGrv

@BaptGrv BaptGrv commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI balanced review requested due to automatic review settings November 16, 2026 13:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The subtitle selector’s duplicate height constraints can shrink its tap target, and its missing localized accessibility label leaves VoiceOver users without a meaningful name.

2 open issues
What changed in this PR

Adds subtitle selection to kDrive’s inline video player, connecting available subtitle tracks to a menu in the playback controls.

Changes:

  • Loads the asset’s subtitle selection group when playback becomes ready.
  • Adds a subtitles button, hidden when no subtitle options are available.
  • Builds a menu showing the selected track and an option to disable subtitles when supported.
File Description
kDriveCore/​VideoPlayer/​VideoPlayer.swift Loads and exposes subtitle options, logging loading failures.
kDrive/​UI/​View/​Files/​Preview/​VideoControlsView.swift Adds the subtitles button to the playback controls.
kDrive/​UI/​View/​Files/​Preview/​VideoCollectionViewCell.swift Configures button visibility and subtitle selection actions.

Review effort: Balanced

@BaptGrv
BaptGrv force-pushed the feat/video-subtitles branch from f47e293 to 843694e Compare November 16, 2026 13:54
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The subtitle button’s required 40-point width conflicts with the stack view’s zero-width constraint when hidden, causing unsatisfiable-layout warnings.

1 open issue
2 resolved since last review

Review effort: Balanced

@adrien-coye adrien-coye left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, works well for me 👍

@adrien-coye adrien-coye added this to the 6.3.1 milestone Nov 19, 2026
@adrien-coye
adrien-coye merged commit 83d3364 into master Nov 19, 2026
13 of 14 checks passed
@adrien-coye
adrien-coye deleted the feat/video-subtitles branch November 19, 2026 17:49
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.

3 participants