manucabral / YoutubeMusicRPC

A Youtube Music Rich Presence application for Discord.
https://manucabral.github.io/YoutubeMusicRPC/
MIT License
45 stars 6 forks source link

<feat> Mozilla Firefox support #14

Open Werameli opened 1 year ago

Werameli commented 1 year ago

Can you please add Mozilla Firefox support?

manucabral commented 11 months ago

Hi, I will work on it. Thank you for your issue.

larayavrs commented 9 months ago

24 maybe will be added in a future :-)

PickleUpADoodle commented 4 months ago

Looked into adding Firefox support. Starting the Firefox browser using a subprocess with remote debugging enabled seems to work fine. Cannot seem to create a connection to the web socket however. Getting "The handshake request has incorrect Origin header" error. Assuming the flag --remote-allow-origins" when starting the browser process does not work but no clue how to fix

PickleUpADoodle commented 4 months ago

Update: by setting --remote-allow-origins=http://127.0.0.1:9222/ it is possible to establish a websocket connection. Issue now is that the command evaluate.runtime returns context is null error. Have not been able to track the context id of the window, although omitting the "contextId" parameter should just take the regular window as default, like with the current Chrome implementation, but that is not working for Firefox.