-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to change subtitle font size (Dash stream) #4491
Labels
Comments
I have added the fix for this bug. It will be pushed to dev-v2 branch on the next few days. Please help us to verify the fix then. |
ojw28
pushed a commit
that referenced
this issue
Jul 17, 2018
After [] we support default font size for TTML, relative to the cellResolution of the document. However, this introduced a bug that makes TTML font-size in such case always follow the cellResolution font size, even when SubtitleView.setApplyEmbeddedStyles(false) and SubtitleView.setApplyEmbeddedFontSizes(false) were used. This CL updates the fix so that the default font-size using cellResolution works in the same way as other embedded styles, and can be turned off using setters from SubtitleView. GitHub: #4491 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=204467033
Fixed in |
ojw28
pushed a commit
that referenced
this issue
Jul 23, 2018
After [] we support default font size for TTML, relative to the cellResolution of the document. However, this introduced a bug that makes TTML font-size in such case always follow the cellResolution font size, even when SubtitleView.setApplyEmbeddedStyles(false) and SubtitleView.setApplyEmbeddedFontSizes(false) were used. This CL updates the fix so that the default font-size using cellResolution works in the same way as other embedded styles, and can be turned off using setters from SubtitleView. GitHub: #4491 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=204467033
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Issue description
I've been trying to change the subtitle font size with the following code, but it does not reflect accordingly.
playerView.getSubtitleView().setApplyEmbeddedStyles(false); playerView.getSubtitleView().setApplyEmbeddedFontSizes(false); playerView.getSubtitleView().setStyle(new CaptionStyleCompat(Color.RED, Color.TRANSPARENT, Color.TRANSPARENT, CaptionStyleCompat.EDGE_TYPE_OUTLINE,Color.BLACK,null)); playerView.getSubtitleView().setFixedTextSize(TypedValue.COMPLEX_UNIT_PX, 100);
There is no issue with changing the style, but when it comes to font sizes I realise that the player is still taking into consideration cellresolution and rawViewHeight instead of the textsize I input.
Is this intended? If so why? and how do I change the font size?
Also, when testing with sideloaded subtitle sources it has no problem showing the font size I set.
Reproduction steps
(I initially used another stream, but this stream seems to have the same issue)
Version of ExoPlayer being used
Tested on 2.8.1 and 2.8.2 (v2-dev)
The text was updated successfully, but these errors were encountered: