-
-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to launch streams from outside the application (for browser integration etc) #613
Comments
Supporting the registration of custom protocol handlers on all supported OSes, namely Linux, Windows and macOS is quite challenging. The registration methods don't just dramatically differ from OS to OS, but also from OS version to OS version. On Linux there are also a few differences between desktop environments, even though the XDG standard exists. That means you don't have to just "support Linux", but individual desktop environments, and there are a lot. Unfortunately, there are no (usable) NodeJS modules available in the NPM registry for registering custom protocol handlers and they would have to be built from scratch. The only one that's available is for Windows, but it can't be used here, because it requires some dependencies being compiled for NW.js' NodeJS runtime, which can't be done with the nw-builder tool that's being used here to make the final app builds. If you want to properly implement custom protocol handlers, you have to deal with a lot of stuff and care for a lot of edge cases. As an example of an edge case, there's the problem of the application path, which isn't static for the "portable" releases and once it changes, the registered protocol needs to be re-applied. I don't think it's worth spending time on implementing custom protocol handlers unless well written and tested NodeJS modules are already available. If you want to launch streams from an external source, you can already do that via the app's AFAIK, you can also set up custom handlers in Firefox, which would make it easy to write a browser extension or even a so called "bookmarklet" that makes you launch streams listed on the Twitch website with Streamlink. |
@bastimeyer - I haven't looked into NodeJS support for protocol links, however the workaround could be Twitch GUI listening for http requests on some random port, the same could be achieved as a protocol link. Edit: I tried using the |
This seems unnecessary...
You have to enable the "allow external commands" option in the settings menu (enable advanced settings first) in order to be able to receive parameters from other application starts. However, there seems to be a bug with the parsed command line. NW.js is a bit stupid here and the passed command line gets merged with internal Chromium parameters at arbitrary positions. Those have to be filtered out and it seems that something broke here recently. I'll see if I can fix this when I get the time. |
Enabled advanced settings and enabled allow external commands - still not working from the command line if Twitch GUI is already launched, the cursor spins for a split second and nothing happens.
|
As far as I understand Twitch GUI already runs an http server for authentication to Twitch I'll fiddle around with custom protocols to get what I want working (launching streams in Twitch GUI via browser), I just hope one day something could be implemented that would allow more robust external controls of the application. |
Regarding the I'm closing the thread now, as there are no plans for implementing an HTTP server for sending commands to the GUI. |
Feature request
Description
It would be amazing if we could have an option to launch a stream externally - not using the app itself. A custom protocol handler would be the best. The use case could be browser integration - using Greasemonkey or something similar to inject buttons on Twitch with the URL such as
twitchgui://some_stream
.I find it easier to browse Twitch via the website, then I switch to the application, find the stream I was watching and launch it from there. Having a button on Twitch that would do that automatically would be so great, all we need is some kind of external interaction with the app itself.
The text was updated successfully, but these errors were encountered: