androidx / media

Jetpack Media3 support libraries for media use cases, including ExoPlayer, an extensible media player for Android
https://developer.android.com/media/media3
Apache License 2.0
1.55k stars 373 forks source link

Caption positioning for 608/708 standard #1637

Closed nishantkp closed 1 week ago

nishantkp commented 3 weeks ago

Hello,

How can I adjust the caption position from the player view for a broadcast stream (embedded 608/708)?

So captions are fixated on line 10 or 11. I wasn't able to find anything for adjusting vertical positioning.

Is bottomPaddingFraction a good way to do it?

Streaming protocol: HLS

icbaker commented 3 weeks ago

If the position is coming from the source media, and you want to override it, bottomPaddingFraction won't work (because it only applies to cues with an "unset" vertical position (which sounds like isn't the case here?)).

You can instead modify the Cue objects after they've been emitted by the player and before they are consumed by PlayerView, as described in https://github.com/google/ExoPlayer/issues/7243#issuecomment-614651130

icbaker commented 1 week ago

Closing because I think the question has been answered.