-
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
Switch rendition if the rendition which Exoplayer has chosen is not available #2981
Comments
This is already done by ExoPlayer. However some discussion is in order here. The spec says:
5xx HTTP error codes are reserved for server errors, whereas 404 and 410 explicitly speak about resource changes. If you can use 410 to indicate unavailability, that will make ExoPlayer do exactly what you aim for. If not, we should discuss whether 500 error codes are appropriate. This is because some other users have complained we should not retry if the player gets a 5xx error. E.g: #2844. But I think there are others. Hope this answers your question. Please close if so. |
Thanks for your answer and information. |
I agree that for 5xxx HTTP error codes Exoplayer should not retry but in case there are 5 renditions available and out of these 5 renditions, 3 comes from the same server and 2 comes from some other server. Consider the 3 coming from the same server, that server encountered a problem and now if exoplayer picks any one of them we will receive 5xxx error code and no point in retrying. However the remaining 2 which comes from another server, Exoplayer should try to play them instead of throwing an error. So my point is if we are sure that all the available rendition will throw 5xxx error then only Exoplayer should throw an error otherwise it should try to play the one which is good. |
Sounds like a good argument. I'll give it a thought and post any updates here. |
Thanks for giving it a thought. Just to add here AvPlayer in iOS already does this, so this functionality becomes important for us as we are trying to keep the behaviour of both platforms i.e. Android and iOS to be in sync. |
Hello Exoplayer team, Thanks |
Hi, this is still on radar, but we haven't allocated time for it yet, unfortunately. Hopefully we'll get to it soon. Many thanks for your patience! |
This is tracking enabling blacklisting for response codes other than 404 and 410, I think? |
Correct. |
Issue:#2844 Issue:#3370 Issue:#2981 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=204149284
Issue:#2844 Issue:#2981 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=204718939
Issue:#2844 Issue:#3370 Issue:#2981 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=206927295
Please give the new LoadErrorHandlingPolicy a try and let us know if it suits your needs. Thanks! |
Thanks a lot. I will give it a try. |
I am using Exoplayer 2 in my video player for playback.
When playing HSL streams is it possible to switch rendition if one of the renditions mentioned in m3u8 file is not available.
We receive a master m3u8 file from the server. This has all the available renditions. Sometimes it can happen that one of the renditions is not available and can respond with status code of 500, 501, 502, 503, 400 or 403 and if Exoplayer chooses that rendition to play it throws an error.
What I am trying to achieve here is if one of the rendition is bad rendition and exoplayer is not able to play it, then it should choose the next/other rendition to play which are available but should not throw onPlayerError callback.
I have also looked at #676 where it talks about changing video track selection using TrackSelector and TrackSelection.
I have implemented Exoplayer.EventListener where I listen for
So when Exoplayer loads and if it picks the rendition which is bad at first place, I get a callback in onPlayerError.
Is it possible for Exoplayer to choose the other rendition if the one it has picked is bad.
The text was updated successfully, but these errors were encountered: