Skip to content

Make it work for browser clients #23

Open

Description

@RasmusGodske

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

Activity

  1. liamcottle commented on May 18, 2021

    @liamcottle
    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.

  2. RasmusGodske commented on May 19, 2021

    @RasmusGodske
    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.

  3. Macil commented on Sep 19, 2023

    @Macil

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions