Skip to content
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

Make it work for browser clients #23

Open
RasmusGodske opened this issue May 17, 2021 · 3 comments
Open

Make it work for browser clients #23

RasmusGodske opened this issue May 17, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@RasmusGodske
Copy link

Would be nice to use it directly through a browser client instead of a Node backend

@liamcottle
Copy link
Owner

This is a nice idea. However, as far as I know, the nodejs and web browser websocket apis are different. So I'd need to find an existing wrapper, or write a custom one to be able to use the correct apis based on if the code is running in nodejs or in the browser.

@liamcottle liamcottle added the enhancement New feature or request label May 18, 2021
@RasmusGodske
Copy link
Author

Yeah I noticed that myself, after playing around with it. I got to the point where I could connect to the server, and someone decode the received messages. However I kept getting a "not found" message back, so I'm guessing I didn't encode it correctly.

@Macil
Copy link

Macil commented Sep 19, 2023

After studying this project and using its .proto file, I previously made a webpage-based Stream Deck plugin that connects to the Rust+ API. It's not super clean code as the parts for connecting to the Rust+ API aren't separated at all from handling the Stream Deck API, but I figure it might be helpful to someone trying to use Rust+ in a webpage to study its code. code.js is where most of the code lives. The connection to the Rust+ API happens in the handleConnect function. You can look for uses of AppRequest and AppMessage to see how messages are sent and received for the Rust+ API. (code.html is where code.js and its dependency scripts are loaded from.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants