This commit is contained in:
tt2468 2021-04-26 19:04:29 -07:00
commit 17f3137b40

View File

@ -38,6 +38,8 @@ obs-websocket provides a feature-rich RPC communication protocol, giving access
## Connecting to obs-websocket ## Connecting to obs-websocket
Here's info on how to connect to obs-websocket Here's info on how to connect to obs-websocket
---
### Connection steps ### Connection steps
These steps should be followed precisely. Failure to connect to the server as instructed will likely result in your client being treated in an undefined way. These steps should be followed precisely. Failure to connect to the server as instructed will likely result in your client being treated in an undefined way.
@ -252,6 +254,8 @@ The following message types are the base message types which may be sent to and
} }
``` ```
---
### Hello ### Hello
- Sent from: obs-websocket - Sent from: obs-websocket
- Sent to: Freshly connected websocket client - Sent to: Freshly connected websocket client
@ -442,7 +446,7 @@ Authentication is not required
"comment": string(optional) "comment": string(optional)
} }
``` ```
- `result` is true if the request resulted in `RequestStatus::Success`. False if otherwise. - `result` is `true` if the request resulted in `RequestStatus::Success`. False if otherwise.
- `code` is a [`RequestStatus`](#requeststatus-enum) code. - `code` is a [`RequestStatus`](#requeststatus-enum) code.
- `comment` may be provided by the server on errors to offer further details on why a request failed. - `comment` may be provided by the server on errors to offer further details on why a request failed.
@ -479,14 +483,33 @@ Failure Response
### RequestBatch ### RequestBatch
- Sent from: Identified client - Sent from: Identified client
- Sent to: obs-websocket - Sent to: obs-websocket
- Description: - Description: Client is making a batch of requests for obs-websocket. Requests are processed serially (in order) by the server.
**Additional Base Object Fields:**
```
{
"requestId": string,
"haltOnFailure": bool(optional) = false,
"requests": array<object>
}
```
- When `haltOnFailure` is `true`, the processing of requests will be halted on first failure. Returns only the processed requests in [`RequestBatchResponse`](#requestbatchresponse).
--- ---
### RequestBatchResponse ### RequestBatchResponse
- Sent from: obs-websocket - Sent from: obs-websocket
- Sent to: Identified client which made the request - Sent to: Identified client which made the request
- Description: - Description: obs-websocket is responding to a request batch coming from the client.
**Additional Base Object Fields:**
```
{
"requestId": string,
"results": array<object>
}
```