I am trying to check for stream status first using GetStreamStatus. and based on that stop the stream if it is active.
Immediately I am doing this:
await obs.call("SetStreamServiceSettings", streamSettings);
which is causing this error:
OBSWebSocketError: You cannot change stream service settings while streaming.
The issue is that when I stop the stream, it takes 2-3 seconds for OBS to process it and stop the stream but meanwhile I am trying to set stream service settings while the state has not changed, I have tried a lot of things and have not found any success so far.
I have even tried using events like .on and others but with no progress.
Are there any viable approaches to deal with issues like these?
I am trying to check for stream status first using
GetStreamStatus
. and based on that stop the stream if it is active.Immediately I am doing this:
await obs.call("SetStreamServiceSettings", streamSettings);
which is causing this error:
The issue is that when I stop the stream, it takes 2-3 seconds for OBS to process it and stop the stream but meanwhile I am trying to set stream service settings while the state has not changed, I have tried a lot of things and have not found any success so far.
I have even tried using events like .on and others but with no progress.
Are there any viable approaches to deal with issues like these?