mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Docs: Various updates
This commit is contained in:
parent
1f791825ef
commit
230d25fc8b
@ -44,7 +44,7 @@ These steps should be followed precisely. Failure to connect to the server as in
|
|||||||
- Initial HTTP request made to obs-websocket server.
|
- Initial HTTP request made to obs-websocket server.
|
||||||
- HTTP request headers can be used to set the websocket communication type. The default format is JSON. Example headers:
|
- HTTP request headers can be used to set the websocket communication type. The default format is JSON. Example headers:
|
||||||
- `Content-Type: application/json`
|
- `Content-Type: application/json`
|
||||||
- `Content-Type: application/msgpack` *Not currently planned for v5.0.0*
|
- `Content-Type: application/msgpack`
|
||||||
- If an invalid `Content-Type` is specified, the connection will be closed with [`WebSocketCloseCode::InvalidContentType`](#websocketclosecode-enum) after upgrade (but before [`Hello`](#hello)).
|
- If an invalid `Content-Type` is specified, the connection will be closed with [`WebSocketCloseCode::InvalidContentType`](#websocketclosecode-enum) after upgrade (but before [`Hello`](#hello)).
|
||||||
|
|
||||||
- Once the connection is upgraded, the websocket server will immediately send a [`Hello`](#hello) message to the client.
|
- Once the connection is upgraded, the websocket server will immediately send a [`Hello`](#hello) message to the client.
|
||||||
@ -193,10 +193,12 @@ enum RequestStatus {
|
|||||||
HotkeyNotFound = 615,
|
HotkeyNotFound = 615,
|
||||||
// The specified directory was not found
|
// The specified directory was not found
|
||||||
DirectoryNotFound = 616,
|
DirectoryNotFound = 616,
|
||||||
// The specified config item (obs_config_t) was not found. Could be section or parameter name
|
// The specified config item (config_t) was not found. Could be section or parameter name
|
||||||
ConfigParameterNotFound = 617,
|
ConfigParameterNotFound = 617,
|
||||||
// The specified property (obs_properties_t) was not found
|
// The specified property (obs_properties_t) was not found
|
||||||
PropertyNotFound = 618,
|
PropertyNotFound = 618,
|
||||||
|
// The specififed key (OBS_KEY_*) was not found
|
||||||
|
KeyNotFound = 619,
|
||||||
|
|
||||||
// Processing the request failed unexpectedly
|
// Processing the request failed unexpectedly
|
||||||
RequestProcessingFailed = 700,
|
RequestProcessingFailed = 700,
|
||||||
@ -212,6 +214,8 @@ enum RequestStatus {
|
|||||||
ScreenshotSaveFailed = 705,
|
ScreenshotSaveFailed = 705,
|
||||||
// Creating the directory failed
|
// Creating the directory failed
|
||||||
DirectoryCreationFailed = 706,
|
DirectoryCreationFailed = 706,
|
||||||
|
// The combination of request parameters cannot be used to perform an action
|
||||||
|
CannotAct = 707,
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -268,8 +272,14 @@ enum EventSubscription {
|
|||||||
SceneItems = (1 << 7),
|
SceneItems = (1 << 7),
|
||||||
// Receive events in the `MediaInputs` category
|
// Receive events in the `MediaInputs` category
|
||||||
MediaInputs = (1 << 8),
|
MediaInputs = (1 << 8),
|
||||||
// Receive all event categories (default subscription setting)
|
// Receive all event categories
|
||||||
All = (General | Config | Scenes | Inputs | Transitions | Filters | Outputs | SceneItems | MediaInputs),
|
All = (General | Config | Scenes | Inputs | Transitions | Filters | Outputs | SceneItems | MediaInputs),
|
||||||
|
// InputVolumeMeters event (high-volume)
|
||||||
|
InputVolumeMeters = (1 << 9),
|
||||||
|
// InputActiveStateChanged event (high-volume)
|
||||||
|
InputActiveStateChanged = (1 << 10),
|
||||||
|
// InputShowStateChanged event (high-volume)
|
||||||
|
InputShowStateChanged = (1 << 11),
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
Subscriptions are a bitmask system.
|
Subscriptions are a bitmask system.
|
||||||
@ -297,7 +307,7 @@ The following message types are the base message types which may be sent to and
|
|||||||
**Additional Base Object Fields:**
|
**Additional Base Object Fields:**
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"obsWebsocketVersion": string,
|
"obsWebSocketVersion": string,
|
||||||
"rpcVersion": number,
|
"rpcVersion": number,
|
||||||
"authentication": object(optional)
|
"authentication": object(optional)
|
||||||
}
|
}
|
||||||
@ -309,7 +319,7 @@ Authentication is required
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"messageType": "Hello",
|
"messageType": "Hello",
|
||||||
"websocketVersion": "5.0.0",
|
"obsWebSocketVersion": "5.0.0",
|
||||||
"rpcVersion": 1,
|
"rpcVersion": 1,
|
||||||
"authentication": {
|
"authentication": {
|
||||||
"challenge": "+IxH4CnCiqpX1rM9scsNynZzbOe4KhDeYcTNS3PDaeY=",
|
"challenge": "+IxH4CnCiqpX1rM9scsNynZzbOe4KhDeYcTNS3PDaeY=",
|
||||||
@ -322,7 +332,7 @@ Authentication is not required
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"messageType": "Hello",
|
"messageType": "Hello",
|
||||||
"websocketVersion": "5.0.0",
|
"obsWebSocketVersion": "5.0.0",
|
||||||
"rpcVersion": 1
|
"rpcVersion": 1
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user