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. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
89171b0b0d
commit
904020da3c
1 changed files with 4 additions and 1 deletions
|
|
@ -438,7 +438,10 @@ private fun PlayerSurface(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPlaybackStateChanged(playbackState: Int) {
|
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() {
|
override fun onRenderedFirstFrame() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue