Commit 70e1091
authored
Fix playback not working after player enters idle state
On some phones (e.g. Oppo and Oneplus) the video player enters the STATE_IDLE 10 minutes after being paused. This causes the play button to stop working.
This happens because once a player has become idle, we need to call prepare() before playback can happen again.
But after I added prepare(), it would just skip to the end of the video. So now I'm executing the same code that happens when ERROR_CODE_UNSPECIFIED is done. This causes playback to resume normally.1 parent 50e8189 commit 70e1091
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1752 | 1752 | | |
1753 | 1753 | | |
1754 | 1754 | | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
1755 | 1761 | | |
1756 | 1762 | | |
1757 | 1763 | | |
| |||
0 commit comments