mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
Refactors keepScreenOn method
This commit is contained in:
parent
6795026a94
commit
2fcaea9ad6
@ -172,7 +172,9 @@ internal class CustomExoPlayerView(
|
|||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
updatePlayPauseButton()
|
updatePlayPauseButton()
|
||||||
updateScreenOnState()
|
|
||||||
|
// keep screen on if the video is playing
|
||||||
|
keepScreenOn = player.isPlaying == true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -186,11 +188,6 @@ internal class CustomExoPlayerView(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateScreenOnState() {
|
|
||||||
// keep screen on if the video is playing
|
|
||||||
keepScreenOn = player?.isPlaying == true
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun updatePlayPauseButton() {
|
private fun updatePlayPauseButton() {
|
||||||
binding.playPauseBTN.setImageResource(
|
binding.playPauseBTN.setImageResource(
|
||||||
when {
|
when {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user