Fix autoplay countdown crash

This commit is contained in:
Bnyro 2023-02-23 19:24:26 +01:00
parent fa18d26b0f
commit 7939a60698

View File

@ -1023,11 +1023,16 @@ class PlayerFragment : Fragment(R.layout.fragment_player), OnlinePlayerOptions {
binding.player.useController = false
binding.player.hideController()
binding.autoplayCountdown.setHideSelfListener {
binding.autoplayCountdown.visibility = View.GONE
binding.player.useController = true
// could fail if the video already got closed before
runCatching {
binding.autoplayCountdown.visibility = View.GONE
binding.player.useController = true
}
}
binding.autoplayCountdown.startCountdown {
playNextVideo()
runCatching {
playNextVideo()
}
}
}