Skip to content

Commit 3e2bb33

Browse files
havlasmefacebook-github-bot
authored andcommitted
Add MEDIA_STOP, MEDIA_NEXT, and MEDIA_PREVIOUS event support to Android TV (#31837)
Summary: Add MEDIA_STOP, MEDIA_NEXT, and MEDIA_PREVIOUS event support to Android TV (TVEventHandler) ## Changelog [Android] [Added] - Add MEDIA_STOP, MEDIA_NEXT, and MEDIA_PREVIOUS event support to Android TV Pull Request resolved: #31837 Test Plan: We develop application that utilizes aforementioned events, we've made a build against react-native fork with these changes and it was working as expected. These changes just add 3 more button mappings, so I don't think it requires some extensive testing. Reviewed By: TheSavior Differential Revision: D29668706 Pulled By: yungsters fbshipit-source-id: e4bd8dcf7de6b094ffdbbca12d875b85e468d49a
1 parent d6ed1ff commit 3e2bb33

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ReactAndroid/src/main/java/com/facebook/react/ReactAndroidHWInputDeviceHelper.java

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ public class ReactAndroidHWInputDeviceHelper {
2929
.put(KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE, "playPause")
3030
.put(KeyEvent.KEYCODE_MEDIA_REWIND, "rewind")
3131
.put(KeyEvent.KEYCODE_MEDIA_FAST_FORWARD, "fastForward")
32+
.put(KeyEvent.KEYCODE_MEDIA_STOP, "stop")
33+
.put(KeyEvent.KEYCODE_MEDIA_NEXT, "next")
34+
.put(KeyEvent.KEYCODE_MEDIA_PREVIOUS, "previous")
3235
.put(KeyEvent.KEYCODE_DPAD_UP, "up")
3336
.put(KeyEvent.KEYCODE_DPAD_RIGHT, "right")
3437
.put(KeyEvent.KEYCODE_DPAD_DOWN, "down")

0 commit comments

Comments
 (0)