From 890ddae84d31fc27de9f811e13896068092fbe39 Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Wed, 31 Aug 2022 17:42:16 +0200 Subject: [PATCH] Updated Websockets (markdown) --- Websockets.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/Websockets.md b/Websockets.md index 4fc1b0b..dc0bca5 100644 --- a/Websockets.md +++ b/Websockets.md @@ -52,4 +52,29 @@ If the status message reports "Connected and authenticated" all is well. To modify the connection details of an existing connection simply select it in the drop down menu of a websocket action and click the marked gear symbol. Next click the "Properties" entry and a dialog like described above will open in which you can modify the connection's settings. -The gear icon will also allow you to rename or remove existing connections. \ No newline at end of file +The gear icon will also allow you to rename or remove existing connections. + + +## Sending messages to the scene switcher from external tools via websocket messages + +The scene switcher is using the [obs-websocket protocol](https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#callvendorrequest) to send and receive messages. +This can also be used by external tools to send messages, which can be processed by the plugin and thus trigger macros. + +To send a message with the contents `testing` one has to create a `CallVendorRequest` type message using a `vendorName` of `AdvancedSceneSwitcher` and a `requestType` of `AdvancedSceneSwitcherMessage` and add the "message" field with the desired contents to the `requestData`: + +``` +{ + "d": { + "requestData": { + "requestData": { + "message": "testing" + }, + "requestType": "AdvancedSceneSwitcherMessage", + "vendorName": "AdvancedSceneSwitcher" + }, + "requestId": "someUniqueIdHere", + "requestType": "CallVendorRequest" + }, + "op": 6 +} +``` \ No newline at end of file