obs-websocket/docs/partials/introduction.md

82 lines
2.3 KiB
Markdown
Raw Normal View History

2021-04-26 16:55:50 +00:00
# obs-websocket 5.0.0 protocol reference
2021-03-08 11:56:43 +00:00
2021-04-26 16:55:50 +00:00
## General Introduction
obs-websocket provides a feature-rich RPC communication protocol, giving access to much of OBS's feature set. This document contains everything you should know in order to make a connection and use obs-websocket's functionality to the fullest.
2021-03-08 11:56:43 +00:00
2021-04-26 16:55:50 +00:00
## Table of Contents
- [Connecting to obs-websocket](#connecting_to_obs-websocket)
- [Connection steps](#connecting_steps)
- [Creating an authentication string](#connecting_authentication_string)
- [Base message types](#message_types)
- [Hello](#basemessage_hello)
- [Identify](#basemessage_identify)
- [Identified](#basemessage_identified)
- [Reidentify](#basemessage_reidentify)
- [Event](#basemessage_event)
- [Request](#basemessage_request)
- [RequestResponse](#basemessage_requestresponse)
- [RequestBatch](#basemessage_requestbatch)
- [RequestBatchResponse](#basemessage_requestbatchresponse)
- [Requests](#requests)
- [Events](#events)
2021-03-08 11:56:43 +00:00
## Connecting to obs-websocket
2021-04-26 16:55:50 +00:00
Here's info on how to connect to obs-websocket
2021-03-08 11:56:43 +00:00
### Connection steps
2021-04-26 16:55:50 +00:00
- Step 1
2021-03-08 11:56:43 +00:00
### Creating an authentication string
2021-04-26 16:55:50 +00:00
- Start by
2021-03-08 11:56:43 +00:00
2021-04-26 16:55:50 +00:00
## Message Types
2021-04-26 16:55:50 +00:00
The following message types (`messageType`) are the base message types which may be sent to and from obs-websocket. Sending a message with a `messageType` that is not recognized to the obs-websocket server will result in your connection being closed with `WebsocketCloseCode::UnknownMessageType`.
### Hello
2021-04-26 16:55:50 +00:00
- Sent from: obs-websocket
- Sent to: Freshly connected websocket client
- Description:
### Identify
2021-04-26 16:55:50 +00:00
- Sent from: Freshly connected websocket client
- Sent to: obs-websocket
- Description:
### Identified
2021-04-26 16:55:50 +00:00
- Sent from: obs-websocket
- Sent to: Freshly identified client
- Description:
### Reidentify
2021-04-26 16:55:50 +00:00
- Sent from: Identified client
- Sent to: obs-websocket
- Description:
### Event
2021-04-26 16:55:50 +00:00
- Sent from: obs-websocket
- Sent to: All subscribed and identified clients
- Description:
### Request
2021-04-26 16:55:50 +00:00
- Sent from: Identified client
- Sent to: obs-websocket
- Description:
### RequestResponse
2021-04-26 16:55:50 +00:00
- Sent from: obs-websocket
- Sent to: Identified client which made the request
- Description:
### RequestBatch
2021-04-26 16:55:50 +00:00
- Sent from: Identified client
- Sent to: obs-websocket
- Description:
### RequestBatchResponse
2021-04-26 16:55:50 +00:00
- Sent from: obs-websocket
- Sent to: Identified client which made the request
- Description: