mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 07:50:31 +05:30
Merge pull request #2886 from praveenrajput/master
Keep screen on only while video is playing #2877
This commit is contained in:
commit
30d6920fd1
@ -172,16 +172,10 @@ internal class CustomExoPlayerView(
|
|||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
updatePlayPauseButton()
|
updatePlayPauseButton()
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onPlaybackStateChanged(playbackState: Int) {
|
// keep screen on if the video is playing
|
||||||
// keep the screen on if the video is not ended or paused
|
keepScreenOn = player.isPlaying == true
|
||||||
keepScreenOn = !(
|
}
|
||||||
listOf(Player.STATE_IDLE, Player.STATE_ENDED)
|
|
||||||
.contains(playbackState)
|
|
||||||
)
|
|
||||||
super.onPlaybackStateChanged(playbackState)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user