Closed joshstovall closed 6 months ago
Thank for the feedback
Is there a reason config.env.port cannot be set from the browser client?
Not really except we never had this use case before. I will propose a fix for that
Fixed in v4.0.0-alpha.22
You can now pass serverAddress
and port
in ClientConfig.env
, it will be used to open the socket connection to server
cf. https://soundworks.dev/soundworks/client.html#.ClientConfig
Let me know if it works for you!
Is there a reason
config.env.port
cannot be set from the browser client? After a bit of troubleshooting I was able to getplugin-sync
working in my React/Next.js app. In order to have my frontend (port 3000) connect to websocket running on a seperate server (port 8000), I had to change this line in the soundworks source code. It seems right now it sets the port for the outgoing websocket connection based on it's ownwindow.location
.https://github.com/collective-soundworks/soundworks/blob/489f7488946ecbefd294f6155128013e96eadc87/src/client/Socket.js#L107
Not sure if this is done on purpose, but it seems odd to me. Thought I would point it out incase someone runs into the same problem in the future. Looking forward to trying out soundworks more!