mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 08:20: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("cache") val chache: Boolean = false,
|
||||||
@SerialName("s3_enabled") val s3Enabled: Boolean = false,
|
@SerialName("s3_enabled") val s3Enabled: Boolean = false,
|
||||||
@SerialName("image_proxy_url") val imageProxyUrl: String = "",
|
@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 {
|
holder.binding.apply {
|
||||||
var instanceText = "${instance.name} ${instance.locations}"
|
var instanceText = "${instance.name} ${instance.locations}"
|
||||||
if (instance.cdn) instanceText += " (\uD83C\uDF10 CDN)"
|
if (instance.cdn) instanceText += " (\uD83C\uDF10 CDN)"
|
||||||
if (instance.registrationDisabled) instanceText +=
|
if (instance.registrationDisabled) {
|
||||||
|
instanceText +=
|
||||||
" (${root.context.getString(R.string.registration_disabled)})"
|
" (${root.context.getString(R.string.registration_disabled)})"
|
||||||
|
}
|
||||||
radioButton.text = instanceText
|
radioButton.text = instanceText
|
||||||
radioButton.setOnCheckedChangeListener(null)
|
radioButton.setOnCheckedChangeListener(null)
|
||||||
radioButton.isChecked = selectedInstanceIndex == position
|
radioButton.isChecked = selectedInstanceIndex == position
|
||||||
|
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user