feat: add subtitle style controls - #9723
Conversation
|
Due to some of the changes in Shaka-player 5.2.x, I believe #9487 will need to be merged before this PR |
There was a problem hiding this comment.
I have still the same concerns as in #9120 (comment) even though its now only showing when subtitles are enabled.
The size of the overflow will expand allot when all the controls are added
Due to some of the changes in Shaka-player 5.2.x, I believe #9487 will need to be merged before this PR
Yup, reviewing this will be on hold
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
@efb4f5ff-1298-471a-8973-3d47447115dc hey, I'll love to know some opinions how to continue this:
More so it will keep menu smaller and give space for more subtitles options later
|
|
I would opt for option 1. Also their next minor release is closer then you think based on historical release data |
|
okay I'll start working for adding support to Shaka Player first and I think it might take a bit time so I should close this PR and open a new one later |
Sounds good to me |
Pull request was closed
Pull Request Type
Related Issue
Closes #968
Closes #5072
Description
continuation of #9120
This PR adds subtitle size and position controls to FreeTube's Shaka video player.
When subtitles are enabled, the player menu includes Subtitle Size and Subtitle Position controls. Users can
change the subtitle size and position directly from the player menu.
This PR updates Shaka Player to version 5.2.8, which includes subtitle preview support from my PR shaka-project/shaka-player#10077.
When users hover over or focus an option with the keyboard, they can preview the change without saving it. Changes are saved only after an option is selected.
FreeTube saves the selected subtitle size (
fontScaleFactor) and position (positionArea) indefaultCaptionSettings.Settings stay the same when the player restarts or you watch another video. Other caption settings are not changed.
Saved values are validated before they are applied. Invalid values are ignored safely.
Testing
Before:
Before.1.mp4
After:
After.1.mp4
Desktop
Additional Context
The hover and keyboard-focus subtitle previews were added upstream in [shaka-project/shaka-player#10077](https://
github.com/shaka-project/shaka-player/pull/10077), which has been merged and is included through the Shaka Player
5.2.8 upgrade in this PR.
The controls use Shaka Player's built-in
captions-sizeandcaptions-positionelements. This keeps theimplementation aligned with Shaka's released UI and preview behavior.