[Android] Do not use Button B in mappings + fast seek

Geoffrey Métais git at videolan.org
Tue Mar 10 14:26:59 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Mar 10 14:14:55 2015 +0100| [a84d96aadfa0c2a09390a4b8e2885e7860e57c55] | committer: Geoffrey Métais

Do not use Button B in mappings + fast seek

R1 and L1 trigger seek by 1 minute steps
Buttun B is the back button with standart gamepads

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=a84d96aadfa0c2a09390a4b8e2885e7860e57c55
---

 .../vlc/gui/video/VideoPlayerActivity.java         |   22 ++++++++++----------
 .../gui/tv/audioplayer/AudioPlayerActivity.java    |    1 -
 2 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 3305020..4419475 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -835,14 +835,18 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
         switch (keyCode) {
         case KeyEvent.KEYCODE_F:
         case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD:
-        case KeyEvent.KEYCODE_BUTTON_R1:
             seek(10000);
             return true;
         case KeyEvent.KEYCODE_R:
         case KeyEvent.KEYCODE_MEDIA_REWIND:
-        case KeyEvent.KEYCODE_BUTTON_L1:
             seek(-10000);
             return true;
+        case KeyEvent.KEYCODE_BUTTON_R1:
+            seek(60000);
+            return true;
+        case KeyEvent.KEYCODE_BUTTON_L1:
+            seek(-60000);
+            return true;
         case KeyEvent.KEYCODE_BUTTON_A:
             if (mOverlayProgress.getVisibility() == View.VISIBLE)
                 return false;
@@ -859,12 +863,12 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
         case KeyEvent.KEYCODE_BUTTON_Y:
             showAdvancedOptions(mAdvOptions);
             return true;
-        case KeyEvent.KEYCODE_B:
-            selectAudioTrack();
-            break;
+//            case KeyEvent.KEYCODE_BUTTON_X:
+//            selectAudioTrack();
+//            return true;
         case KeyEvent.KEYCODE_V:
         case KeyEvent.KEYCODE_MEDIA_AUDIO_TRACK:
-        case KeyEvent.KEYCODE_BUTTON_B:
+        case KeyEvent.KEYCODE_BUTTON_X:
             onAudioSubClick(mTracks);
             return true;
         case KeyEvent.KEYCODE_M:
@@ -875,11 +879,7 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
             resizeVideo();
             return true;
         case KeyEvent.KEYCODE_VOLUME_MUTE:
-        case KeyEvent.KEYCODE_BUTTON_X:
-            if (mIsNavMenu)
-                return navigateDvdMenu(keyCode);
-            else
-                updateMute();
+            updateMute();
             return true;
         case KeyEvent.KEYCODE_S:
         case KeyEvent.KEYCODE_MEDIA_STOP:
diff --git a/vlc-android/tv/src/org/videolan/vlc/gui/tv/audioplayer/AudioPlayerActivity.java b/vlc-android/tv/src/org/videolan/vlc/gui/tv/audioplayer/AudioPlayerActivity.java
index c8472bf..6e9bf49 100644
--- a/vlc-android/tv/src/org/videolan/vlc/gui/tv/audioplayer/AudioPlayerActivity.java
+++ b/vlc-android/tv/src/org/videolan/vlc/gui/tv/audioplayer/AudioPlayerActivity.java
@@ -159,7 +159,6 @@ public class AudioPlayerActivity extends Activity implements AudioServiceControl
             case KeyEvent.KEYCODE_MEDIA_PLAY:
             case KeyEvent.KEYCODE_MEDIA_PAUSE:
             case KeyEvent.KEYCODE_SPACE:
-            case KeyEvent.KEYCODE_BUTTON_B:
                 togglePlayPause();
                 return true;
             case KeyEvent.KEYCODE_F:



More information about the Android mailing list