player: no spinner over the last frame when a video ends (#33)
STATE_ENDED counted as "not ready", so finishing a video brought the thumbnail and the spinner back over the picture. Only STATE_BUFFERING drives the overlay now; the initial load is already covered by the first-frame guard, so the video simply stops on its last frame with the paused controls.
This commit is contained in:
parent
0ca17cfd00
commit
e6792a98fd
1 changed files with 4 additions and 1 deletions
|
|
@ -438,7 +438,10 @@ private fun PlayerSurface(
|
|||
}
|
||||
|
||||
override fun onPlaybackStateChanged(playbackState: Int) {
|
||||
bufferingPending = playbackState != Player.STATE_READY
|
||||
// Only real buffering shows the overlay (issue #33): STATE_ENDED used
|
||||
// to count as "not ready" and brought the thumbnail + spinner back
|
||||
// over the last frame. The initial load is covered by !firstFrame.
|
||||
bufferingPending = playbackState == Player.STATE_BUFFERING
|
||||
}
|
||||
|
||||
override fun onRenderedFirstFrame() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue