You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[video_player_android] isBuffering flag always return true after calling seekTo method - fixed (#9198)
fixes [Issue #165149](flutter/flutter#165149)
## Pre-Review Checklist
### Root Cause
The issue stems from the `onPlaybackStateChanged` callback. After calling `seekTo`, the player transitions to `Player.STATE_BUFFERING`, setting the buffering flag to `true`. Shortly after, it transitions to `Player.STATE_READY`. However, if the player was already initialized, the method returned early due to:
```java
if (isInitialized) {
return;
}
```
prevented `setBuffering(false)` from being called in the shared logic below the switch
Copy file name to clipboardExpand all lines: packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/ExoPlayerEventListener.java
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -69,11 +69,10 @@ public void onPlaybackStateChanged(final int playbackState) {
Copy file name to clipboardExpand all lines: packages/video_player/video_player_android/android/src/test/java/io/flutter/plugins/videoplayer/ExoPlayerEventListenerTest.java
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,19 @@ public void onPlaybackStateChangedEndedAfterBufferingSendsBufferingEndAndOnCompl
0 commit comments