Showing subtitle on Exoplayer (Leanback)
See original GitHub issue💬 Questions and Help
Hello,
Previously I was using Xam.Plugins.Android.ExoPlayer.Leanback version 2.11.8. I was able to load the subtitles using the following code
` var subtitleView = RequireActivity().FindViewById(Resource.Id.leanback_subtitles) as SubtitleView;
var style = new CaptionStyleCompat(
Color.White,
Color.Transparent,
Color.Transparent,
CaptionStyleCompat.EdgeTypeDropShadow,
Color.Black,
Typeface.Default!);
var subtitleSize = GlobalSettings.GetFloat(GlobalSettings.KeySubtitleSize);
if (subtitleSize != null)
{
subtitleView?.SetFixedTextSize((int)ComplexUnitType.Sp, subtitleSize.Value);
}
subtitleView?.SetApplyEmbeddedStyles(false);
subtitleView?.SetStyle(style);
if (subtitleView != null)
{
var textComponent = _player.TextComponent;
textComponent.AddTextOutput(subtitleView);
}
`
Now after upgrading to version 2.18.9 I am not able to call textComponent.AddTextOutput(subtitleView);
Seems like AddTextOutput function isn’t available anymore. Can anyone please help how can I make subtitles work.
Thanks
Issue Analytics
- State:
- Created 7 months ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Showing subtitle on Exoplayer (Leanback) - android
Android.ExoPlayer.Leanback version 2.11.8. I was able to load the subtitles using the following code var subtitleView = RequireActivity().
Read more >Subtitles are not shown with leanback extension enabled
Hi,. i am using leanback-extension on exoplayer 2.10.5,. if i use exoplayer without leanback extensions dvbsub subtitles are shown,.
Read more >Showing Subtitles/Lyrics on Android Exoplayer | by PrepNew
When you are playing just attach one media source to audio player but when you want to display subtitle then you need one...
Read more >Supported formats
ExoPlayer supports standalone subtitle files in a variety of formats. Subtitle files can be side-loaded as described on the media items page ...
Read more >Media3 ExoPlayer
Build apps that give your users seamless experiences from phones to tablets, watches, and more. ... Learn to build for your use case...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ArchangelWTF yes it worked with the List<Cue> exposed and setting it by calling subtitleView.SetCues. Would you be able to merge your changes and update the nuget package?
@isaranghi Did you manage to get this working yet?