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:
Jeena 2026-10-15 14:20:44 +00:00
parent 0ca17cfd00
commit e6792a98fd

View file

@ -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() {