1

I have a Web application which opens in "Fire TV" browser Amazon Silk & Mozilla.

The remote has a navigation button : https://developer.amazon.com/docs/fire-tv/remote-input.html#capturing-input and when clicked the mouse cursor moves in that specific direction.

However this process is very slow to navigate the webpage using remote navigation.

The

I want to focus on the anchor and when the navigation button is clicked from left to right or top to bottom. I want to jump from one anchor to other in that particular direction. How can I achieve this?

Is there any Fire TV SDK which helps connect the remote navigation with web apps?

Tried using Tab Index in HTML element but that didn't help. Also the remote navigation doesn't work the same way like the keyboard navigation works.

Here eventlistener for andriod is given : https://developer.amazon.com/docs/fire-tv/remote-input.html#capturing-input . Do we have similar eventlistner for Web Apps using Javascript?

Vivek Tankaria
  • 1,301
  • 2
  • 15
  • 35
  • The youtube.com/tv page does it, so it must be possible. I've tried capturing keypresses, but it doesn't appear that the directional buttons are being sent as keypresses. I've tried capturing mouse movement, but it doesn't register unless you 'click'. – gdw2 Dec 12 '18 at 05:35

1 Answers1

0

If the mouse moves in the direction clicked, you can just use that to do your processing. Keep a global 2-element array that stores the cursor position, and in a handler for the mousemove event, calculate the difference between the new position and the stored one; then you can jump to whatever anchor makes the most sense for that movement and replace the previous array with the new position.

IceMetalPunk
  • 5,476
  • 3
  • 19
  • 26
  • I created a simple page with all the events listed in this answer (https://stackoverflow.com/a/26848814/389812), including mouse movement events. The d-pad on the remote didn't trigger any events. – gdw2 Dec 12 '18 at 06:15