Commit ed78327c authored by Sébastien Toque's avatar Sébastien Toque

video player: disable scale gestures if locked

parent cab5a1fe
......@@ -281,7 +281,7 @@ class VideoTouchDelegate(private val player: VideoPlayerActivity,
}
override fun onScale(detector: ScaleGestureDetector): Boolean {
if (player.fov != 0f) {
if (player.fov != 0f && !player.isLocked) {
val diff = VideoPlayerActivity.DEFAULT_FOV * (1 - detector.scaleFactor)
if (player.updateViewpoint(0f, 0f, diff)) {
player.fov = Math.min(Math.max(MIN_FOV, player.fov + diff), MAX_FOV)
......@@ -292,7 +292,7 @@ class VideoTouchDelegate(private val player: VideoPlayerActivity,
}
override fun onScaleEnd(detector: ScaleGestureDetector) {
if (player.fov == 0f) {
if (player.fov == 0f && !player.isLocked) {
val grow = detector.scaleFactor > 1.0f
if (grow && player.currentSize != VideoPlayerActivity.SURFACE_FIT_SCREEN) {
savedSize = player.currentSize
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment