Steps to Reproduce
- play any live video using flutter video player
- in case of any behind window exception happened due to poor internet the player will be stopped
Expected results:
According to exoplayer official documentations BehindLiveWindowException, this should be a special case and the player need to be prepared again
official docs
*Actual results:
the current implementation is considering it as a general exception, and this maybe will lead to a bad user experience
The current implementation
@Override
public void onPlaybackStateChanged(final int playbackState) {
if (playbackState == Player.STATE_BUFFERING) {
setBuffering(true);
sendBufferingUpdate();
} else if (playbackState == Player.STATE_READY) {
if (!isInitialized) {
isInitialized = true;
sendInitialized();
}
} else if (playbackState == Player.STATE_ENDED) {
Map<String, Object> event = new HashMap<>();
event.put("event", "completed");
eventSink.success(event);
}
if (playbackState != Player.STATE_BUFFERING) {
setBuffering(false);
}
}
@Override
public void onPlayerError(final ExoPlaybackException error) {
setBuffering(false);
if (eventSink != null) {
eventSink.error("VideoError", "Video player had error " + error, null);
}
}
});
I am submitting this issue because I am unable to make PR for this case. Thanks for your time
Steps to Reproduce
Expected results:
According to exoplayer official documentations BehindLiveWindowException, this should be a special case and the player need to be prepared again
official docs
*Actual results:
the current implementation is considering it as a general exception, and this maybe will lead to a bad user experience
The current implementation
I am submitting this issue because I am unable to make PR for this case. Thanks for your time