mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-26 19:26:04 -05:00
Updated Websockets (markdown)
@@ -1,5 +1,5 @@
|
||||
# Websockets
|
||||
It is possible to use the [macros](Macros) system to communicate with remote OBS instances using version 5.0 of the obs-websockets plugin.
|
||||
It is possible to use the [macro](Macros) system to communicate with remote OBS instances using version 5.0 of the obs-websockets plugin.
|
||||
Since version 28 of OBS the obs-websocket plugin is shipped with OBS itself so there is no need to install anything for this functionality.
|
||||
|
||||
To receive messages the [macro](Macros) condition "Websocket" can be used.
|
||||
@@ -127,3 +127,56 @@ So you your message must at least include an `op` and `d` field and in most case
|
||||
Here is an example who to send the websocket message to start a recording:
|
||||
|
||||

|
||||
|
||||
## Triggering macros and setting variables using VendorRequests
|
||||
|
||||
It is also possible to directly run a macro and (optionally) set variables using the `AdvancedSceneSwitcherRunMacro` vendor request:
|
||||
|
||||
```
|
||||
{
|
||||
"op": 6,
|
||||
"d": {
|
||||
"requestType": "CallVendorRequest",
|
||||
"requestId": "request-id",
|
||||
"requestData": {
|
||||
"vendorName": "AdvancedSceneSwitcher",
|
||||
"requestType": "AdvancedSceneSwitcherRunMacro",
|
||||
"requestData": {
|
||||
"name": "Macro 3",
|
||||
"variables": [
|
||||
{
|
||||
"name": "My Variable",
|
||||
"value": "Text (GDI+)"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
To just modify the value of variables you can use the `AdvancedSceneSwitcherSetVariables` vendor request:
|
||||
|
||||
```
|
||||
{
|
||||
"op": 6,
|
||||
"d": {
|
||||
"requestType": "CallVendorRequest",
|
||||
"requestId": "request-id",
|
||||
"requestData": {
|
||||
"vendorName": "AdvancedSceneSwitcher",
|
||||
"requestType": "AdvancedSceneSwitcherSetVariables",
|
||||
"requestData": {
|
||||
"variables": [
|
||||
{
|
||||
"name": "My Variable",
|
||||
"value": "Some value"
|
||||
},
|
||||
{
|
||||
"name": "Another Variable",
|
||||
"value": "Something else"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user