OBS Chapter Marker creation/naming via WebSocket

errornosignal

New Member
Trying to work out some validations on OBS chapter marker creation in Streamer.bot
It seems like OBS kicks out strictly numeric string for being not of string type.
I believe that, even though Streamer.bot sends the WebSocket request parameter for the request as a string,
OBS does some sort of auto-typing on the parameters of the incoming request.
Does anyone know if this is actually the case or not?

note: any other alphanumeric values passed in to 'chapterName' in the CreateRecordChapter WS request works without issue.

Here's the sub-actions chain:
1726355846752.png


Initial declaration for the variable:
1726355862271.png


C# code getting the variable, casting to a string, and testing if its type is string, then setting it to be used again in subsequent sub-actions.
1726355879814.png


OBS Raw request with the variable from the above C# block as the parameter for the chapter marker name.
1726355894254.png


Action History variable table showing the outputResult from the C# block and the ‘isString’ validation.
1726355910938.png


And finally, the OBS log message indicating that the WebSocket request parameter for the chapter marker name was not read as a string.
1726355929242.png
 

errornosignal

New Member
Had some help getting this solved.

If you send it using CPH.ObsSendRaw() instead, it seems to send it as a string.

C#:
string outputResult = "1";
CPH.ObsSendRaw("CreateRecordChapter", "{\"chapterName\":\"" + outputResult + "\"}", 0);
 
Top