Skip to content
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

Closed
islor opened this issue Jul 10, 2018 · 2 comments
Closed

Unable to change subtitle font size (Dash stream) #4491

islor opened this issue Jul 10, 2018 · 2 comments
Assignees
Labels

Comments

@islor
Copy link

islor commented Jul 10, 2018

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

  1. Insert link into demo app: http://irtdashreference-i.akamaihd.net/dash/live/901161/bfs/manifestARD.mpd
    (I initially used another stream, but this stream seems to have the same issue)
  2. Insert codes as per above

Version of ExoPlayer being used

Tested on 2.8.1 and 2.8.2 (v2-dev)

@botaydotcom botaydotcom self-assigned this Jul 12, 2018
@botaydotcom
Copy link
Contributor

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
@ojw28
Copy link
Contributor

ojw28 commented Jul 17, 2018

Fixed in dev-v2.

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
@google google locked and limited conversation to collaborators Nov 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants