Commit 9c11e9b
authored
[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 switch1 parent 6efa04b commit 9c11e9b
File tree
4 files changed
+22
-5
lines changed- packages/video_player/video_player_android
- android/src
- main/java/io/flutter/plugins/videoplayer
- test/java/io/flutter/plugins/videoplayer
4 files changed
+22
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
1 | 6 | | |
2 | 7 | | |
3 | 8 | | |
| |||
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
74 | 75 | | |
75 | | - | |
76 | | - | |
77 | 76 | | |
78 | 77 | | |
79 | 78 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
97 | 110 | | |
98 | 111 | | |
99 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
0 commit comments