Skip to content

Commit

Permalink
Merge pull request #4560 from FineFindus/feat/show-endscreen-on-end
Browse files Browse the repository at this point in the history
feat: show controls on STATE_ENDED
  • Loading branch information
Bnyro authored Aug 20, 2023
2 parents 4c80e2c + a7b262b commit ab9e543
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

Expand Down

0 comments on commit ab9e543

Please sign in to comment.