feat(player): show endscreen on STATE_ENDED

This commit is contained in:
FineFindus 2023-08-20 12:40:22 +02:00
parent 0e8e6278d4
commit 420497907b
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B

View File

@ -934,17 +934,17 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
} }
// check if video has ended, next video is available and autoplay is enabled. // check if video has ended, next video is available and autoplay is enabled.
if ( if (playbackState == Player.STATE_ENDED) {
playbackState == Player.STATE_ENDED && if (!isTransitioning && PlayerHelper.autoPlayEnabled) {
!isTransitioning &&
PlayerHelper.autoPlayEnabled
) {
isTransitioning = true isTransitioning = true
if (PlayerHelper.autoPlayCountdown) { if (PlayerHelper.autoPlayCountdown) {
showAutoPlayCountdown() showAutoPlayCountdown()
} else { } else {
playNextVideo() playNextVideo()
} }
} else {
binding.player.showController()
}
} }
if (playbackState == Player.STATE_READY) { if (playbackState == Player.STATE_READY) {