Skip to content

Commit

Permalink
Add MEDIA_STOP, MEDIA_NEXT, and MEDIA_PREVIOUS event support to Andro…
Browse files Browse the repository at this point in the history
…id 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
  • Loading branch information
havlasme authored and facebook-github-bot committed Jul 13, 2021
1 parent d6ed1ff commit 3e2bb33
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public class ReactAndroidHWInputDeviceHelper {
.put(KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE, "playPause")
.put(KeyEvent.KEYCODE_MEDIA_REWIND, "rewind")
.put(KeyEvent.KEYCODE_MEDIA_FAST_FORWARD, "fastForward")
.put(KeyEvent.KEYCODE_MEDIA_STOP, "stop")
.put(KeyEvent.KEYCODE_MEDIA_NEXT, "next")
.put(KeyEvent.KEYCODE_MEDIA_PREVIOUS, "previous")
.put(KeyEvent.KEYCODE_DPAD_UP, "up")
.put(KeyEvent.KEYCODE_DPAD_RIGHT, "right")
.put(KeyEvent.KEYCODE_DPAD_DOWN, "down")
Expand Down

0 comments on commit 3e2bb33

Please sign in to comment.