marcosrg9 / YouTubeTV

Simple YouTube TV client for desktop based on electron.
MIT License
61 stars 12 forks source link

Request: Gamepad support #30

Open ghost opened 2 years ago

ghost commented 2 years ago

Request gamepad support to work with xbox controller, etc..map arrow keys, spacebar etc. (I can do this on my steamdeck ui through steam remapping , but would rather have it natively built in.)

marcosrg9 commented 2 years ago

Hello.

It is possible to implement an interface between controller events and YouTube keystroke events. However I don't have an xbox controller, but I can try to do some tests with my switch controllers.

I also recommend you to try this user agent of an Xbox One...

Mozilla/5.0 (Windows NT 10.0; Win64; x64; Xbox; Xbox One) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36 Edge/44.18363.8131

or this one for PlayStation 4:

Mozilla/5.0 (PlayStation; PlayStation 4/9.51) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15

You can simulate the basic behavior of YouTube TV without installing the Node environment, for this I recommend the User-Agent Switcher extension.

Then navigate to the YouTube Leanback interface and test if the buttons on your controller work as expected.

Check that in the application version it explicitly states that the app has detected that the device is an Xbox One or PlayStation 4:

Regards.

ghost commented 2 years ago

The leanback link bounces me to the regular youtube page, not tv..i guess it's not available everywhere. Also CTRL-F still isn't working. Maybe its possible to open in fullscreen option?

marcosrg9 commented 2 years ago

It's strange, I have configured the Xbox user agent and the Leanback interface loads without problems. Are you sure you're loading the user agent correctly?

In the following video I show you how I do it:

video.webm

Regarding what you tell me about the fullscreen bug, it was solved in the latest version (2.2.4), if you see that there is an unexpected behavior, please open another issue specifying the steps to reproduce the error and I will check it.

ghost commented 2 years ago

No, I mean that website redirects to the regular youtbube website from the tv one in countries/locations without Youtube TV, I guess. https://www.youtube.com/tv