Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
528
Issue boards
Milestones
Wiki
Code
Merge requests
15
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
fe3f6ee1
Commit
fe3f6ee1
authored
5 years ago
by
Nicolas Pomepuy
Committed by
Geoffrey Métais
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix brightness / volume gesture triggering the hud opening
parent
6f47ec7c
No related branches found
Branches containing commit
No related tags found
1 merge request
!175
More fixes for beta
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vlc-android/src/org/videolan/vlc/gui/video/VideoTouchDelegate.kt
+11
-7
11 additions, 7 deletions
...roid/src/org/videolan/vlc/gui/video/VideoTouchDelegate.kt
with
11 additions
and
7 deletions
vlc-android/src/org/videolan/vlc/gui/video/VideoTouchDelegate.kt
+
11
−
7
View file @
fe3f6ee1
...
...
@@ -12,7 +12,8 @@ import kotlinx.coroutines.ObsoleteCoroutinesApi
import
org.videolan.libvlc.MediaPlayer
import
org.videolan.medialibrary.Tools
import
org.videolan.vlc.util.AndroidDevices
import
kotlin.math.abs
import
kotlin.math.roundToInt
const
val
TOUCH_FLAG_AUDIO_VOLUME
=
1
const
val
TOUCH_FLAG_BRIGHTNESS
=
1
shl
1
...
...
@@ -157,11 +158,12 @@ class VideoTouchDelegate(private val player: VideoPlayerActivity,
}
}
MotionEvent
.
ACTION_UP
->
{
val
touchSlop
=
ViewConfiguration
.
get
(
player
).
scaledTouchSlop
if
(
touchAction
==
TOUCH_IGNORE
)
touchAction
=
TOUCH_NONE
// Mouse events for the core
player
.
sendMouseEvent
(
MotionEvent
.
ACTION_UP
,
xTouch
,
yTouch
)
// Seek
if
(
touchAction
==
TOUCH_SEEK
)
doSeekTouch
(
Math
.
round
(
deltaY
),
xgesturesize
,
true
)
if
(
touchAction
==
TOUCH_SEEK
)
doSeekTouch
(
deltaY
.
roundToInt
(
),
xgesturesize
,
true
)
touchX
=
-
1f
touchY
=
-
1f
...
...
@@ -173,10 +175,13 @@ class VideoTouchDelegate(private val player: VideoPlayerActivity,
lastTapTimeMs
=
0
}
if
(
numberOfTaps
>
0
&&
now
-
lastTapTimeMs
<
500
)
{
numberOfTaps
+=
1
}
else
{
numberOfTaps
=
1
//verify that the touch coordinate distance did not exceed the touchslop to increment the count tap
if
(
abs
(
event
.
rawX
-
initTouchX
)
<
touchSlop
&&
abs
(
event
.
rawY
-
initTouchY
)
<
touchSlop
)
{
if
(
numberOfTaps
>
0
&&
now
-
lastTapTimeMs
<
ViewConfiguration
.
getDoubleTapTimeout
())
{
numberOfTaps
+=
1
}
else
{
numberOfTaps
=
1
}
}
lastTapTimeMs
=
now
...
...
@@ -393,7 +398,6 @@ class VideoTouchDelegate(private val player: VideoPlayerActivity,
}
}
}
}
data class
ScreenConfig
(
val
metrics
:
DisplayMetrics
,
val
xRange
:
Int
,
val
yRange
:
Int
,
val
orientation
:
Int
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment