occ-ai / obs-urlsource

OBS plugin to fetch data from a URL or file, connect to an API or AI service, parse responses and display text, image or audio on scene
https://obsproject.com/forum/resources/url-api-source-fetch-live-data-and-display-it-on-screen.1756/
GNU General Public License v2.0
130 stars 18 forks source link

Settings don't update when set via a WebSocket request #84

Open Vegamm opened 3 months ago

Vegamm commented 3 months ago

I am using OBS WebSocket to remotely update the 'url' and 'request_data' settings. I notice that when observing the data in OBS, the properties are not updating. I am trying to do this to dynamically update the URL value for a stream. This is an idea I had for getting text-to-speech working with different voices from ElevenLabs but I cannot seem to dynamically update the url.

OBS: 30.1.0 obs-urlsource: 0.2.6 obs-websocket: 5.0.1

Expected Behavior: When calling 'SetInputSettings' via a WebSocket connection, the settings are updated and persist for the source.

Actual Behavior: When calling 'SetInputSettings' via a WebSocket connection, the settings do not persist and are not consumed by the source. On a call to 'GetInputSettings', I see the setting values are updated but OBS does not show the updated settings when opening the 'Properties' window.

royshil commented 3 months ago

Yes the URL setting on the source is "just for show" the actual request data (url and all the settings) are serialized in a hidden setting called "request_data"

You possibly could deserialize the data, edit the url, and serialize again and update the settings on the source. That would likely work.

The only way to make this seamless is to allow multiple inputs. I've began to implement that but the UI overhead is big... Gets messy.

Vegamm commented 3 months ago

You possibly could deserialize the data, edit the url, and serialize again and update the settings on the source. That would likely work.

I did try this too but the data did not persist in this case either. Anyways, I appreciate the response.