Merge pull request #4560 from FineFindus/feat/show-endscreen-on-end

feat: show controls on STATE_ENDED
This commit is contained in:
Bnyro 2023-08-20 13:06:58 +02:00 committed by GitHub
commit ab9e543291
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 12 deletions

View File

@ -16,5 +16,5 @@ data class Instances(
@SerialName("cache") val chache: Boolean = false,
@SerialName("s3_enabled") val s3Enabled: Boolean = false,
@SerialName("image_proxy_url") val imageProxyUrl: String = "",
@SerialName("registration_disabled") val registrationDisabled: Boolean = false,
@SerialName("registration_disabled") val registrationDisabled: Boolean = false
)

View File

@ -31,8 +31,10 @@ class InstancesAdapter(
holder.binding.apply {
var instanceText = "${instance.name} ${instance.locations}"
if (instance.cdn) instanceText += " (\uD83C\uDF10 CDN)"
if (instance.registrationDisabled) instanceText +=
" (${root.context.getString(R.string.registration_disabled)})"
if (instance.registrationDisabled) {
instanceText +=
" (${root.context.getString(R.string.registration_disabled)})"
}
radioButton.text = instanceText
radioButton.setOnCheckedChangeListener(null)
radioButton.isChecked = selectedInstanceIndex == position

View File

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