mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
Further double tap gesture improvements (#2988)
This commit is contained in:
parent
8e737afc72
commit
8017898c80
@ -118,6 +118,8 @@ internal class CustomExoPlayerView(
|
||||
|
||||
// don't let the player view hide its controls automatically
|
||||
controllerShowTimeoutMs = -1
|
||||
// don't let the player view show its controls automatically
|
||||
controllerAutoShow = false
|
||||
|
||||
// locking the player
|
||||
binding.lockPlayer.setOnClickListener {
|
||||
@ -172,6 +174,11 @@ internal class CustomExoPlayerView(
|
||||
|
||||
// keep screen on if the video is playing
|
||||
keepScreenOn = player.isPlaying == true
|
||||
|
||||
if (player.playbackState == Player.STATE_ENDED && !autoplayEnabled) {
|
||||
showController()
|
||||
cancelHideControllerTask()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -603,7 +610,8 @@ internal class CustomExoPlayerView(
|
||||
* Add extra margin to the top bar to not overlap the status bar
|
||||
*/
|
||||
private fun updateTopBarMargin() {
|
||||
val isFullscreen = resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE ||
|
||||
val isFullscreen =
|
||||
resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE ||
|
||||
playerViewModel?.isFullscreen?.value == true
|
||||
binding.topBar.updateLayoutParams<MarginLayoutParams> {
|
||||
topMargin = (if (isFullscreen) 10 else 0).dpToPx().toInt()
|
||||
|
Loading…
Reference in New Issue
Block a user