jellyfin / jellyfin-androidtv

Android TV Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
2.75k stars 469 forks source link

More customization options to subtitles (colors, fonts, placement) #1461

Open krutburken opened 2 years ago

krutburken commented 2 years ago

Describe the feature you'd like

Since we now (finally!) are able to set the font size and disable the background, I'd also like to request the options to customize the color, font and placement on screen, similar to what's available in Kodi.

sparky3387 commented 2 years ago

Was thinking of having a look at this, ill submit a pull request having a color picker, really i would like some opinions of colors, maybe using the Netflix subtitle colors as suggestions, what do people think? These are what i get: ffffff,000000,c80000,00c800,0000c8,eedc00,d60080,009fda

You can already change (background) color by just changing the line:

https://github.com/jellyfin/jellyfin-androidtv/blob/4c2ce100045af654a4d4217558f2315b0e55bf75/app/src/main/java/org/jellyfin/androidtv/ui/playback/CustomPlaybackOverlayFragment.java#L1487

Here is an example by changing this line to: span.setSpan(new PaddedLineBackgroundSpan(ContextCompat.getColor(requireContext(), R.color.grey_transparent), SUBTITLE_PADDING, horizontalGravity), 0, span.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); image

sparky3387 commented 2 years ago

So here is a preview of the work ive done, I will submit this today at some point after I double check all the code image image image

sparky3387 commented 2 years ago

Have now created a pull request for this, hopefully havent made any mistakes