mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 00:10:32 +05:30
Merge pull request #4560 from FineFindus/feat/show-endscreen-on-end
feat: show controls on STATE_ENDED
This commit is contained in:
commit
ab9e543291
@ -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
|
||||
)
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user