Exoplayer: Unable to change subtitle font size (Dash stream)

Created on 10 Jul 2018  路  2Comments  路  Source: google/ExoPlayer

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)

bug

All 2 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.

Fixed in dev-v2.

Was this page helpful?
0 / 5 - 0 ratings