I'm trying to create a website and it's going to be used on Smart TV browsers...
I would like to facilitate user's navigation only using the channel changer button, so my question is:
Is it possible to make a function to detect Channel Up or Channel Down on my website and switch the page?
For example:
If I click on the Channel Up button on the remote control, it goes to page 2.
And if I click the Channel Down button on the remote control, it returns to page 1.
Thanks!
First thing to check: Is your TV sending the "key" press? You can use simple JS+HTML
<!DOCTYPE html>
<html>
<body>
<script>
document.addEventListener("keydown", function(event) {
document.getElementById("x").innerHTML=event.which;
});
</script>
<p id="x">The keycode will appear here...</p>
</body>
</html>
Then write down the keycodes. If they aren't showing up, bad luck. Your TV isn't sending the keypress. If they are, using simple "if" you can navigate with Javascript.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With