Skip to content

Commit

Permalink
Detail the obsEvent.* variables of the OBS Event trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
WhazzItToYa authored and Whipstickgostop committed Oct 28, 2024
1 parent 33bcfec commit 750c5f4
Showing 1 changed file with 31 additions and 4 deletions.
35 changes: 31 additions & 4 deletions streamerbot/3.api/2.triggers/obs/event.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,39 @@ variables:
type: string
description: The IP Address of the OBS connection
value: 127.0.0.1
- name: obsEvent.*
type: string
description: The properties of the OBS event, as flattened JSON keys.
---

::read-more{to="https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#events"}
Explore all supported [OBS Studio Events](https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#events) on their WebSocket protocol documentation
::

::tip
The variables populated by this trigger are different depending on the `Event` parameter
The variables populated by this trigger are different depending on the `Event` parameter.
::

::bookmark{to="https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#events"}
Explore all supported [OBS Studio Events](https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#events) on their WebSocket protocol documentation
::
For example, given the following event data from OBS:

```json [example.json]
{
event: "SceneListChanged",
scenes: [
{
sceneIndex: 0,
sceneName: "Be Right Back",
sceneUuid: "1234-5678-9abcd"
}
]
}
```

The following variables will be populated:

| Name | Type | Value |
| ---- | ---- | ----- |
| `obsEvent.event`{lang=cs} | `string` | `"SceneListChanged"`{lang=cs} |
| `obsEvent.scenes[0].sceneIndex`{lang=cs} | `int` | `0`{lang=cs} |
| `obsEvent.scenes[0].sceneName`{lang=cs} | `string` | `"Be Right Back"`{lang=cs} |
| `obsEvent.scenes[0].sceneUuid`{lang=cs} | `string` | `"1234-5678-9abcd"`{lang=cs} |

0 comments on commit 750c5f4

Please sign in to comment.