mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-01-06 01:20:29 +05:30
restore lock player functionality
This commit is contained in:
parent
51ef6cab24
commit
217dd9b990
@ -1520,10 +1520,10 @@ class PlayerFragment : Fragment() {
|
|||||||
// disable double tap to seek when the player is locked
|
// disable double tap to seek when the player is locked
|
||||||
if (isLocked) {
|
if (isLocked) {
|
||||||
// enable fast forward and rewind by double tapping
|
// enable fast forward and rewind by double tapping
|
||||||
binding.doubleTapOverlay.visibility = View.VISIBLE
|
enableDoubleTapToSeek()
|
||||||
} else {
|
} else {
|
||||||
// disable fast forward and rewind by double tapping
|
// disable fast forward and rewind by double tapping
|
||||||
binding.doubleTapOverlay.visibility = View.GONE
|
binding.player.setOnDoubleTapListener(null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package com.github.libretube.util
|
package com.github.libretube.util
|
||||||
|
|
||||||
import android.view.MotionEvent
|
|
||||||
|
|
||||||
interface OnCustomEventListener {
|
interface OnCustomEventListener {
|
||||||
fun onEvent(x: Float)
|
fun onEvent(x: Float)
|
||||||
}
|
}
|
||||||
|
@ -3,11 +3,8 @@ package com.github.libretube.views
|
|||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.util.Log
|
|
||||||
import android.view.GestureDetector
|
|
||||||
import android.view.MotionEvent
|
import android.view.MotionEvent
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.View.OnTouchListener
|
|
||||||
import com.github.libretube.R
|
import com.github.libretube.R
|
||||||
import com.github.libretube.databinding.ExoStyledPlayerControlViewBinding
|
import com.github.libretube.databinding.ExoStyledPlayerControlViewBinding
|
||||||
import com.github.libretube.util.DoubleTapListener
|
import com.github.libretube.util.DoubleTapListener
|
||||||
@ -28,7 +25,7 @@ internal class CustomExoPlayerView(
|
|||||||
var xPos = 0F
|
var xPos = 0F
|
||||||
|
|
||||||
fun setOnDoubleTapListener(
|
fun setOnDoubleTapListener(
|
||||||
eventListener: OnCustomEventListener
|
eventListener: OnCustomEventListener?
|
||||||
) {
|
) {
|
||||||
doubleTapListener = eventListener
|
doubleTapListener = eventListener
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user