-
Notifications
You must be signed in to change notification settings - Fork 468
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
On remote subtitle load error player errors out as well #1722
Comments
Hi @TheBeastLT, thanks for reporting the issue! Could you provide the error stack trace and/or media that causes the crash? |
This error code is from subtitles url, you can potentially replicate this by adding a subtitle configuration with url pointing to some non-existing file which would result in a 404. Ie:
|
Thanks! I could repro and do a bit of debugging
Lines 531 to 538 in c35a9d6
media/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/source/ProgressiveMediaPeriod.java Lines 669 to 679 in c35a9d6
media/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/upstream/Loader.java Lines 494 to 510 in c35a9d6
Assigning it to @icbaker who might know more on the issue |
Use this for sideloaded subtitles, so preparation can still complete despite an error from e.g. `DataSource.open`. In this case, no subtitle tracks will be emitted. Issue: #1722 PiperOrigin-RevId: 686888588
These events are always reported with the primary child period ID, because this is the same ID used in the parent `MergingMediaSource`'s Timeline. This ensures that e.g. loading errors from sideloaded subtitles (which uses `MergingMediaSource`) are now reported via `AnalyticsListener.onLoadError`. It results in non-error events being reported from these children too, which will result in more `onLoadStarted` and `onLoadCompleted` events being reported (one for each child). Issue: #1722 PiperOrigin-RevId: 686901439
Before this change: * With legacy subtitle decoding (at render time), load errors (e.g. HTTP 404) would result playback completely failing, while parse errors (e.g. invalid WebVTT data) would be silently ignored, so playback would continue without subtitles. * With new subtitle decoding (at extraction time), both load and parse errors would result in playback completely failing. This change means that now neither load nor parse errors in text or metadata tracks stop playback from continuing. Instead the error'd track is disabled until the end of the current period. With new subtitle decoding, both load and parse errors happen during loading/extraction, and so are emitted to the app via `MediaSourceEventListener.onLoadError` and `AnalyticsListener.onLoadError`. With legacy subtitle decoding, only load errors are emitted via these listeners and parsing errors continue to be silently ignored. Issue: #1722 PiperOrigin-RevId: 686902979
The changes linked above mean that errors from both loading and parsing subtitle (and metadata) are suppressed, allowing the rest of the playback to continue. This should work with both sideloaded subtitles (via These errors are logged when they're suppressed, and also propagated out via |
When a media item defines a remote url subtitles and when loading such a subtitle and error occurs it crashes the whole player, even tho you could argue that subtitles are not the most important part of the video and it could fail silently continuing to play the video, since potentially you could selected some other subtitle which would not fail.
Is this intentional behaviour or maybe there's some way to circumvent this to not crash the player?
The text was updated successfully, but these errors were encountered: