fix skipButton hide on click
This commit is contained in:
parent
d4e6351a2d
commit
ce9eed6344
2 changed files with 2 additions and 1 deletions
|
@ -150,6 +150,7 @@ class PlayerActivity : BasePlayerActivity() {
|
||||||
currentIntro?.let {
|
currentIntro?.let {
|
||||||
binding.playerView.player?.seekTo((it.introEnd * 1000).toLong())
|
binding.playerView.player?.seekTo((it.introEnd * 1000).toLong())
|
||||||
}
|
}
|
||||||
|
skipIntroButton.isVisible = false
|
||||||
} else if (currentCredit != null) {
|
} else if (currentCredit != null) {
|
||||||
if (binding.playerView.player?.hasNextMediaItem() == true) {
|
if (binding.playerView.player?.hasNextMediaItem() == true) {
|
||||||
binding.playerView.player?.seekToNext()
|
binding.playerView.player?.seekToNext()
|
||||||
|
|
|
@ -258,7 +258,7 @@ constructor(
|
||||||
val seconds = player.currentPosition / 1000.0
|
val seconds = player.currentPosition / 1000.0
|
||||||
if (intros.isNotEmpty()) {
|
if (intros.isNotEmpty()) {
|
||||||
intros[itemId]?.let { intro ->
|
intros[itemId]?.let { intro ->
|
||||||
if (seconds > intro.showSkipPromptAt && seconds < (intro.hideSkipPromptAt - 1)) {
|
if (seconds > intro.showSkipPromptAt && seconds < intro.hideSkipPromptAt) {
|
||||||
_uiState.update { it.copy(currentIntro = intro) }
|
_uiState.update { it.copy(currentIntro = intro) }
|
||||||
return@let
|
return@let
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue