-
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
Default SingleSampleMediaSource.treatLoadErrorsAsEndOfStream to true #8430
Comments
Can you provide the info about specifically how you tried to use this in 2.12.1? |
It was working in v2.11.7 and we started facing this issue after In 2.11.7, we were using SingleSampleMediaSource to set the external subtitles and then apply the error policy on it using ExternalTextTrackLoadErrorPolicy.java class and were using MergingMediaSource. Now with Please let me know if you want any demo sample code or any more info. |
Everything you describe in the original comment is expected until you get to the part about the Please can you provide enough info to reproduce this part of the problem? You haven't made it clear exactly how you're registering this policy in using 2.12.1. Please provide a minimal reproducible example that demonstrates the problem in a way that we can build locally. This could be an Android Studio project on GitHub, or zipped up and sent to dev.exoplayer@gmail.com using a subject in the format "Issue #1234", where "#1234" should be replaced with your issue number. Please also update this issue to indicate you’ve done this. |
Please check Sample for Subtitle Not Working branch and Sample for LoadErrorPolicy branch. You can see this is how we are adding load error policy. But we are not getting callback in What we can think of that the object which we are giving to exoplayer for error policy is not being retained and internally another object is being created that's why we are not getting the callback in our class. |
Thanks for the branch - using that I'm able to reproduce what you're seeing, and using the debugger I pinned down the problem - you're right that basically your policy is being accidentally dropped internally. Specifically here, it needs to be propagated down to the Lines 253 to 254 in 107fed9
I've sent a fix for this - it should be included in 2.12.3 which will be released before the end of the month. Note that even with this fix, your content doesn't play in your LoadErrorHandlingPolicy branch - but I think that's due to the implementation of your policy - the execution does now reach the |
Hi @icbaker , now the code is reaching to But there is issue that still the media is failing to play because In ExoPlayer v2.11.7, there was an api to pass I tried setting Can you help to let us know how to pass this value now ? |
Ah I see - yeah that isn't currently possible using only the I will add this as a configuration option to Until that's done you'll need to either implement your own |
treatLoadErrorsAsEndOfStream
option to MediaItem.Subtitle
treatLoadErrorsAsEndOfStream
option to MediaItem.Subtitle
Hi @icbaker |
We plan to handle We haven't made this change yet (hence this issue is still open), so yes it's not included in 2.12.3 released today. |
Issue: #8430 PiperOrigin-RevId: 351971671
Steps to reproduce:
I have appended _xyz in the vtt url.
Logcat
Some Background
Prior exoplayer 2.12.1, we were passing
DefaultLoadErrorHandlingPolicy
and here we were listening to Exception but after 2.12.1 this API does not seem to be working. We tried it but we are not getting any callback.Following class we have added to listen the callback before 2.12.1 and it was fine. It means if the subtitle does not work, we listen to it and it does not hamper the playback.
The text was updated successfully, but these errors were encountered: