Repository navigation
[video_player] BehindLiveWindowException #100478
Copy link
Copy link
Closed
flutter/packages
#5869Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listp: video_playerThe Video Player pluginThe Video Player pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
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
*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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listp: video_playerThe Video Player pluginThe Video Player pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Activity
darshankawar commentedon Mar 22, 2022
Thanks for the report.
For reference: There was this issue which did throw the said exception: #81815.
kobe-paulo-reis commentedon Oct 25, 2022
Any updates on this issue?
[video_player_android] Handle BehindLiveWindowException (#5869)
github-actions commentedon Feb 27, 2024
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.[video_player_android] Handle BehindLiveWindowException (#5869)
[video_player_android] Handle BehindLiveWindowException (flutter#5869)
[video_player_android] Handle BehindLiveWindowException (flutter#5869)