Open bypass112 opened 6 days ago
I've been looking how native iOS Player libs handle the AVPlayerItemFailedToPlayToEndTimeNotification event. Most of them seem to be just throwing an error and letting the dev/app decide how the error should be handled. This is an example. Regarding the Android Exoplayer not throwing a similar error after a while, I've just noticed that after a long while you get a stream disconnect error. So I guess even on Android you have a similar situation. I'll work on my fork on this issue, and eventually open a PR, but I'm starting to believe that this bug is originating from the fact that onFailToComplete isn't throwing any errors from the native side. Hopefully tomorrow I'll return with a proper solution for this, so that custom native behaviour isn't that noticeable on the Flutter side. Any feedback would be apreciated. Thank you!
This is the final result of my investigation on this topic.
@ryanheise please let me know if the changes are ok with you and you want me to open a PR.
Thank you!
Which API doesn't behave as documented, and how does it misbehave?
Minimal reproduction project Provide a link here using one of two options:
To Reproduce (i.e. user steps, not code) Steps to reproduce the behavior:
Error messages
Expected behavior Similar to the ExoPlayer Android native side, iOS AVPlayer should also reconnect automatically, regardless of how much the player stays in buffer mode.
Smartphone (please complete the following information):
Flutter SDK version
Additional context From my point of view, this is partially treated in the changes I have on the fork for the onItemStalled call, but there still needs an edge case treaded when onFailToComplete get triggered during a network disconnect.
Please, see this threads for more info, as this issue is persistent on multiple native solutions:
Thank you for the help and this awesome Flutter package!