Skip to content

feat: add subtitle size and position controls#9120

Draft
aditya0155 wants to merge 2 commits into
FreeTubeApp:developmentfrom
aditya0155:feat/subtitle-style-controls
Draft

feat: add subtitle size and position controls#9120
aditya0155 wants to merge 2 commits into
FreeTubeApp:developmentfrom
aditya0155:feat/subtitle-style-controls

Conversation

@aditya0155
Copy link
Copy Markdown
Contributor

@aditya0155 aditya0155 commented May 10, 2026

Pull Request Type

  • Feature

Related Issue

Partially closes #968 (check additional context)

Description

This PR brings Shaka’s built-in subtitle style controls directly into FreeTube’s video player.

After this PR, when you’re watching a video, you can tweak the subtitle size and move the subtitles up or down—straight from the player menu. To keep things solid, this uses Shaka’s native captions-position and captions-size controls.

Also, FreeTube saves your preferences. So if you change the subtitle size or reposition them, FreeTube remembers what you picked by saving fontScaleFactor and positionArea in your defaultCaptionSettings. Next time you watch a video or restart the player, your subtitles will look just how you left them.

And to make sure nothing breaks, the app double-checks your saved settings before loading them. If anything is corrupt or doesn’t make sense, the player just skips it and keeps working as usual.

Screenshots

Before:

Before.The.Pr.mp4

After:

After.The.Pr.1.mp4

Testing

  1. Open any video that has subtitles available.
  2. Turn the subtitles on.
  3. Open the player menu.
  4. Check that the new subtitle size and position controls are showing up.
  5. Change the subtitle size (e.g., to 150%), and make sure the subtitles actually get bigger.
  6. Change the subtitle position (e.g., to Center Right), and confirm they move over.
  7. Open a different video and check that your new size and position settings carried over.
  8. Reopen the menus to make sure the right options are still checked.
  9. Test a video without captions to make sure the player still behaves normally.

Desktop

  • OS: Windows
  • OS Version: 11
  • FreeTube version: 0.24.0

Additional Context

Update on Hover Previews: I’ve sent an upstream PR to Shaka Player (shaka-project/shaka-player#10077) to add live hover previews for subtitle styles. Having this in Shaka itself means FreeTube doesn’t need to change around with the DOM anymore. Once Shaka merges that PR and FreeTube updates its Shaka version, #968 will be natively fixed.

(requiring only a one line configuration toggle in FreeTube to enable the native preview)

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) May 10, 2026 10:37
@github-actions github-actions Bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label May 10, 2026
auto-merge was automatically disabled May 10, 2026 11:57

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) May 10, 2026 11:58
@aditya0155
Copy link
Copy Markdown
Contributor Author

quick update:

I submitted the upstream PR to Shaka Player (shaka-project/shaka-player#10077) to add native live hover previews for subtitle settings! I have also updated the PR body for this.

@aditya0155
Copy link
Copy Markdown
Contributor Author

Final update:

The PR is merged now :)
shaka-project/shaka-player#10077

will make a new PR for integrating this feature when they release 5.2.0

@PikachuEXE
Copy link
Copy Markdown
Member

Just update this PR to have that when 5.2.0 is out?

@aditya0155
Copy link
Copy Markdown
Contributor Author

Just update this PR to have that when 5.2.0 is out?

Sure I'll make it draft till then

@aditya0155 aditya0155 marked this pull request as draft May 13, 2026 06:59
auto-merge was automatically disabled May 13, 2026 06:59

Pull request was converted to draft

@github-actions github-actions Bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label May 13, 2026
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.

Subtitle settings - Show example text to present selected choices

2 participants