[Android] Add the channel UP/DOWN key codes to players
Nicolas Pomepuy
git at videolan.org
Mon Jul 19 06:17:47 UTC 2021
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Jul 16 07:42:01 2021 +0200| [7b91da34ad77b156f8ccceb78dc1f2a46eb5e582] | committer: Nicolas Pomepuy
Add the channel UP/DOWN key codes to players
Also use the game controller R1/L1 keys in the video player
the same way it's used in the audio player
> https://code.videolan.org/videolan/vlc-android/commit/7b91da34ad77b156f8ccceb78dc1f2a46eb5e582
---
.../org/videolan/television/ui/audioplayer/AudioPlayerActivity.kt | 4 ++--
.../vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/application/television/src/main/java/org/videolan/television/ui/audioplayer/AudioPlayerActivity.kt b/application/television/src/main/java/org/videolan/television/ui/audioplayer/AudioPlayerActivity.kt
index 46968f041..e1e822ff0 100644
--- a/application/television/src/main/java/org/videolan/television/ui/audioplayer/AudioPlayerActivity.kt
+++ b/application/television/src/main/java/org/videolan/television/ui/audioplayer/AudioPlayerActivity.kt
@@ -226,7 +226,7 @@ class AudioPlayerActivity : BaseTvActivity() {
finish()
return true
}
- KeyEvent.KEYCODE_F, KeyEvent.KEYCODE_BUTTON_R1 -> {
+ KeyEvent.KEYCODE_F, KeyEvent.KEYCODE_BUTTON_R1, KeyEvent.KEYCODE_CHANNEL_UP -> {
goNext()
return true
}
@@ -238,7 +238,7 @@ class AudioPlayerActivity : BaseTvActivity() {
seek(-10000)
return true
}
- KeyEvent.KEYCODE_R, KeyEvent.KEYCODE_BUTTON_L1 -> {
+ KeyEvent.KEYCODE_R, KeyEvent.KEYCODE_BUTTON_L1, KeyEvent.KEYCODE_CHANNEL_DOWN -> {
goPrevious()
return true
}
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
index d2d33e359..46bb48536 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
@@ -1108,11 +1108,11 @@ open class VideoPlayerActivity : AppCompatActivity(), PlaybackService.Callback,
resizeVideo()
return true
}
- KeyEvent.KEYCODE_N -> {
+ KeyEvent.KEYCODE_N, KeyEvent.KEYCODE_CHANNEL_UP, KeyEvent.KEYCODE_BUTTON_R1 -> {
next()
return true
}
- KeyEvent.KEYCODE_P -> {
+ KeyEvent.KEYCODE_P, KeyEvent.KEYCODE_CHANNEL_DOWN, KeyEvent.KEYCODE_BUTTON_L1 -> {
previous()
return true
}
More information about the Android
mailing list