Jump to content
Returning Members: Password Reset Required ×

Recommended Posts

  • 2 weeks later...
Posted
On 9/9/2024 at 1:01 AM, Spirited said:

I'm curious, which projects do you do that require web sockets? Also, nice use of the board's new emoji support. 👍

Sorry for the long wait on this! I only have one project at the moment, but I'm working on a music player widget to display on my streams that can be reactive to input sent from my stream deck. The widget and server have a subscribe/publish pattern, and the communication works like this:
 

Widget <-> Webserver

The websocket allows for efficient data flow keeping media player data synchronized such as current song, estimated seek position, song attributes, album art, commands such as play/pause/previous/next, far faster than API requests. The webserver's role in this relationship is to communicate desired changes to the widget where the widget will then send a response as to whether that desired change was successful or not.

 

Stream Deck <-> Webserver

The Stream Deck interacts via API to send/process my desired commands which will have a success/failure result depending on the decision made on the backend. For example if I ask for a specific song but the song for some reason isn't available, this will not be forwarded to the Widget and the Stream Deck will be given a failure response to display to me. Likewise for the opposite, if the song exists and the Widget & Player were able to have a successful interaction, I'll be given a successful response and the Stream Deck will report that to me visually as well.

 

Desired commands because I like to keep realistic expectations that I'm sure I'll have undesired outcomes at times. 😂

  • 3 weeks later...
  • 2 weeks later...
Posted
On 10/7/2024 at 3:33 PM, Omicron said:

Is there a reason you went with bun and not something else? Just curious. 

Sorry for the late reply! Honestly, I just kinda wanted to try something new. I find playing around with the bleeding edge fun and if it means I find a genuinely good replacement, that's even better! Bun is still pretty young and I still need to have Node installed for some edge cases, but my experience using it was a genuine joy and I found it easier than with Node.

  • nullgato changed the title to Removed Content

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...