You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Subtitle edge (text outline) is an important part of accessibility to make text readable. However the current implementation hardcodes this to twoDpInPx and on some devices like some TV screens, this might be very small and make text unreadable. There is currently no API surface nor internal method accessible via reflection to change the subtitle outline width.
Proposed solutions/Alternatives considered
Allow for some sort of modification of this via CaptionStyleCompat. I know this might not be possible due to android.view.accessibility.CaptioningManager.CaptionStyle. But honestly, this restriction is makes no sense if I as an app developer want to deliver an specific experience.
Allow for cues to modify this so we can modify the text style in SubtitleParser.
Allow for custom subtitle painters/subtitle views. Right now the subtitle view is directly set to R.id.exo_subtitles and is a final SubtitleView, meaning that there is no possible way to modify the subtitle rendering after parsing it.
Insert a hidden reflection method/mark as non final. Even with reflection this property is currently impossible to modify as it is marked as private + final. Just adding a hidden method or marking this as non final would fix this. It is impossible to modify this one variable without forking the entire repository.
Note, this is a resubmission of google/ExoPlayer#10507 but exoplayer has been marked as deprecated.
The text was updated successfully, but these errors were encountered:
Thanks - I think my comment here about the 'right' way to implement a fully custom outline (by adding it to Cue) probably still stands (i.e. your 3) suggestion): google/ExoPlayer#10507 (comment)
We don't have plans to do this soon, but would consider a high quality PR implementing this (including rendering support in both CanvasSubtitleOutput and WebViewSubtitleOutput).
This is interesting - looking at the blame layer, it's been this way for a long time. Since this code was first published to GitHub in 2017, but internally I can see this line was added in the very first version of the SubtitleView file in 2014. So it's not something we've deliberately decided to do recently.
However, the link you posted doesn't seem to explicitly say that "text related styling" should use sp, just text size itself (which isn't quite what we're discussing here):
When defining text sizes, you can instead use scalable pixels (sp) as your units. The sp unit is the same size as a dp, by default, but it resizes based on the user's preferred text size. Never use sp for layout sizes.
Use case description
Subtitle edge (text outline) is an important part of accessibility to make text readable. However the current implementation hardcodes this to twoDpInPx and on some devices like some TV screens, this might be very small and make text unreadable. There is currently no API surface nor internal method accessible via reflection to change the subtitle outline width.
Proposed solutions/Alternatives considered
Note, this is a resubmission of google/ExoPlayer#10507 but exoplayer has been marked as deprecated.
The text was updated successfully, but these errors were encountered: