mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-24 18:25:50 -05:00
Updated Websockets (markdown)
@@ -5,6 +5,14 @@ Since version 28 of OBS the obs-websocket plugin is shipped with OBS itself so t
|
||||
To receive messages the [macro](Macros) condition "Websocket" can be used.
|
||||
To send messages to other OBS instances the [macro](Macros) action "Websocket" can be used.
|
||||
|
||||
## Message types
|
||||
|
||||
The supported message types that can be used with the "Websocket" action and condition are "Requests" and "Events".
|
||||
* Requests (1) are sent to one specific target via the specified connection.
|
||||
* Events (2) are sent to all clients that are connected to the obs-websocket server the event is emitted from.
|
||||
|
||||

|
||||
|
||||
## Websocket condition
|
||||
|
||||

|
||||
@@ -26,9 +34,10 @@ First select the connection you want to send the message to (1).
|
||||
For more details on how to configure connections have a look at the upcoming sections.
|
||||
Next enter the message you want to send in the text field at (2).
|
||||
|
||||
## Connections
|
||||
### Adding new connections
|
||||
|
||||
A new connection can be added to a websocket action by clicking on the "Add new connection" entry in the connection selection menu.
|
||||
A new connection can be added to a websocket request action or websocket event condition by clicking on the "Add new connection" entry in the connection selection menu.
|
||||
|
||||

|
||||
|
||||
@@ -55,7 +64,7 @@ Next click the "Properties" entry and a dialog like described above will open in
|
||||
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
|
||||
## Sending messages to the scene switcher from external tools via websocket requests
|
||||
|
||||
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.
|
||||
@@ -79,7 +88,9 @@ To send a message with the contents `testing` one has to create a `CallVendorReq
|
||||
}
|
||||
```
|
||||
|
||||
### Example Bitfocus Companion
|
||||
### Example "Bitfocus Companion"
|
||||
|
||||
Below is an example configuration that can be used to send message Requests from "Bitfocus Companion" to the Advanced Scene Switcher plugin.
|
||||
|
||||
| Field | Value |
|
||||
| ----------- | ----------- |
|
||||
@@ -88,3 +99,23 @@ To send a message with the contents `testing` one has to create a `CallVendorReq
|
||||
|
||||

|
||||
|
||||
## Receiving messages from the scene switcher in external tools via websocket events
|
||||
|
||||
An example event emitted by the Advanced Scene Switcher containing the message "testing" would be the following:
|
||||
|
||||
```
|
||||
{
|
||||
"d": {
|
||||
"eventData": {
|
||||
"eventData": {
|
||||
"message": "testing"
|
||||
},
|
||||
"eventType": "AdvancedSceneSwitcherEvent",
|
||||
"vendorName": "AdvancedSceneSwitcher"
|
||||
},
|
||||
"eventIntent": 512,
|
||||
"eventType": "VendorEvent"
|
||||
},
|
||||
"op": 5
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user