Created Switching scenes for Aitum Vertical plugin (markdown)

WarmUpTill
2023-07-17 22:11:11 +02:00
parent 1bcaeca007
commit 644e418dfb

@@ -0,0 +1,45 @@
This guide will explain how to switch scenes in the vertical scene dock of the "Aitum Vertical" OBS plugin.
The "Aitum Vertical" utilizes the OBS websocket API to enable external interaction with the plugin via websocket messages.
The supported functions can be found in their [GitHub repository](https://github.com/Aitum/obs-vertical-canvas/blob/f61998e175a88a6e16d893c735b9fa6968525763/vertical-canvas.cpp#L495-L534).
To switch scenes we will have to send the `switch_scene` vendor request to the OBS websocket server.
To send such a request we first have to [create a new macro](Macros#creating-a-new-macro) and add a new action of type [websocket](Websockets#websocket-action).
![AddAction](https://github.com/WarmUpTill/SceneSwitcher/assets/19472752/289f04eb-a1af-4f1a-9b17-ed494a0420e5)
Next configure the connection, by either [adding a new connection](Websockets#adding-new-connections) or using an existing one.
In most cases a connection to the "localhost" address (meaning you want to change the scene in the same OBS instance the Advanced Scene Switch is running in) and usage of the port 4455 (default port OBS websocket communication) is desired.
![Connection](https://github.com/WarmUpTill/SceneSwitcher/assets/19472752/910823dd-d30a-48b6-bd73-f8f52450fd3c)
Please make sure the "Use the obs-websocket protocol" checkbox is ticked or otherwise the message will be be ignored by OBS.
Once the connection is set up adjust the message type to be sent from `Scene Switcher message` to `OBS websocket message`.
![SetMessageType](https://github.com/WarmUpTill/SceneSwitcher/assets/19472752/18c4c68d-687c-43be-90a8-ada6870da543)
Finally set the message body to the following content, with `Vertical Scene` being replaced with the scene name you want to switch to:
```
{
"op": 6,
"d": {
"requestType": "CallVendorRequest",
"requestId": "someRandomId",
"requestData": {
"vendorName": "aitum-vertical-canvas",
"requestType": "switch_scene",
"requestData": {
"scene": "Vertical Scene"
}
}
}
}
```
Now everything is set up and the macro should switch to the desired vertical scene.
![SetMessageBody](https://github.com/WarmUpTill/SceneSwitcher/assets/19472752/a843324d-f621-4362-a5d4-81d843baaaec)