-
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
SubtitleDecoderException appears to prevent the video from starting #6885
Comments
I think if you enable a text track and the subtitle file is invalid as the one you tried you can not get around this exception. The DOCTYPE line at the start may indicate that the server did not find the subtitle file at all and sent an error page instead which is html. Does the server deliver that response with a HTTP 200?
No. That's not possible currently. You can sideload text tracks but you need to prepare the player for this. |
We have been making our subtitle and metadata decoders more "robust" over time (i.e., by logging an error and continuing rather than throwing). I'm not sure if this makes sense for this case. The request to add subtitle files on the fly is tracked by #1649. |
You are correct on the DOCTYPE reason. My app lets the users bring their own subtitles from many places and they often fail to load. With other devices where I do this, it just fails to load the subtitle gracefully but with ExoPlayer it is preventing the video from playing. My guess is that the best solution for me in this case is to first attempt to load the VTT file using the Webvtt parser ExoPlayer uses to make sure it will work prior to setting it on the player? |
Related because it's also due to corrupt subtitles, although the failures look to be in a slightly different bits of the code: #6640 |
issue:#6885 PiperOrigin-RevId: 295931197
@icbaker - Can we update and close this? |
Yep, good point. The commit above means these sorts of exceptions are now just logged and playback continues without the subtitles. |
issue:#6885 PiperOrigin-RevId: 295931197
I'm using ExoPlayer
2.10.8
. When I set a bad subtitle, playback fails. Is there a way to make subtitles not do that? Exception below.Also, is it possible to set subtitles on the fly without restarting the player?
Thanks.
The text was updated successfully, but these errors were encountered: