Update PROTOCOL.md : better lisibility

This commit is contained in:
Stéphane L 2017-02-23 22:07:14 +01:00 committed by GitHub
parent 7ae20d8c3b
commit 94c3e5d41d

View File

@ -23,48 +23,72 @@ Additional fields will be present in the event message depending on the event ty
OBS is switching to another scene. OBS is switching to another scene.
- **scene-name** (string) : The name of the scene being switched to. - **scene-name** (string) : The name of the scene being switched to.
---
#### "ScenesChanged" #### "ScenesChanged"
The scene list has been modified (Scenes have been added, removed, or renamed). The scene list has been modified (Scenes have been added, removed, or renamed).
---
#### "SwitchTransition" #### "SwitchTransition"
The active transition has been changed. The active transition has been changed.
- **transition-name** (string) : The name of the active transition. - **transition-name** (string) : The name of the active transition.
---
#### "TransitionListChanged" #### "TransitionListChanged"
The list of available transitions has been modified (Transitions have been added, removed, or renamed). The list of available transitions has been modified (Transitions have been added, removed, or renamed).
---
#### "StreamStarting" #### "StreamStarting"
A request to start streaming has been issued. A request to start streaming has been issued.
- **preview-only** (bool) : Always false. - **preview-only** (bool) : Always false.
---
#### "StreamStarted" #### "StreamStarted"
Streaming started successfully. Streaming started successfully.
*New in OBS Studio* *New in OBS Studio*
---
#### "StreamStopping" #### "StreamStopping"
A request to stop streaming has been issued. A request to stop streaming has been issued.
- **preview-only** (bool) : Always false. - **preview-only** (bool) : Always false.
---
#### "StreamStopped" #### "StreamStopped"
Streaming stopped successfully. Streaming stopped successfully.
*New in OBS Studio* *New in OBS Studio*
---
#### "RecordingStarting" #### "RecordingStarting"
A request to start recording has been issued. A request to start recording has been issued.
*New in OBS Studio* *New in OBS Studio*
---
#### "RecordingStarted" #### "RecordingStarted"
Recording started successfully. Recording started successfully.
*New in OBS Studio* *New in OBS Studio*
---
#### "RecordingStopping" #### "RecordingStopping"
A request to stop streaming has been issued. A request to stop streaming has been issued.
*New in OBS Studio* *New in OBS Studio*
---
#### "RecordingStopped" #### "RecordingStopped"
Recording stopped successfully. Recording stopped successfully.
*New in OBS Studio* *New in OBS Studio*
---
#### "StreamStatus" #### "StreamStatus"
Sent every 2 seconds with the following information : Sent every 2 seconds with the following information :
- **streaming** (bool) : Current Streaming state. - **streaming** (bool) : Current Streaming state.
@ -78,9 +102,13 @@ Sent every 2 seconds with the following information :
- **num-dropped-frames** (integer) : Number of frames dropped by the encoder since the stream started. - **num-dropped-frames** (integer) : Number of frames dropped by the encoder since the stream started.
- **fps** (double) : Current framerate. - **fps** (double) : Current framerate.
---
#### "Exiting" #### "Exiting"
*New in OBS Studio*
OBS is exiting. OBS is exiting.
*New in OBS Studio*
---
## Requests ## Requests
@ -108,6 +136,8 @@ __Response__ : always OK, with these additional fields :
- **"obs-websocket-version"** (string) : obs-websocket version string - **"obs-websocket-version"** (string) : obs-websocket version string
- **"obs-studio-version"** (string) : OBS Studio version string - **"obs-studio-version"** (string) : OBS Studio version string
---
#### "GetAuthRequired" #### "GetAuthRequired"
Tells the client if authentication is required. If it is, authentication parameters "challenge" and "salt" are passed in the response fields (see "Authentication"). Tells the client if authentication is required. If it is, authentication parameters "challenge" and "salt" are passed in the response fields (see "Authentication").
@ -117,6 +147,8 @@ __Response__ : always OK, with these additional fields :
- **"challenge"** (string) - **"challenge"** (string)
- **"salt"** (string) - **"salt"** (string)
---
#### "Authenticate" #### "Authenticate"
Try to authenticate the client on the server. Try to authenticate the client on the server.
@ -125,6 +157,8 @@ __Request fields__ :
__Response__ : OK if auth succeeded, error if invalid credentials. No additional fields. __Response__ : OK if auth succeeded, error if invalid credentials. No additional fields.
---
#### "GetCurrentScene" #### "GetCurrentScene"
Get the current scene's name and items. Get the current scene's name and items.
@ -144,6 +178,8 @@ Objects in the "sources" array have the following fields :
- **"cx"** (double) : width of the item (with scale applied) - **"cx"** (double) : width of the item (with scale applied)
- **"cy"** (double) : height of the item (with scale applied) - **"cy"** (double) : height of the item (with scale applied)
---
#### "SetCurrentScene" #### "SetCurrentScene"
Switch to the scene specified in "scene-name". Switch to the scene specified in "scene-name".
@ -152,6 +188,8 @@ __Request fields__ :
__Response__ : always OK if scene exists, error if it doesn't. No additional fields __Response__ : always OK if scene exists, error if it doesn't. No additional fields
---
#### "GetSceneList" #### "GetSceneList"
List OBS' scenes. List OBS' scenes.
@ -160,6 +198,8 @@ __Response__ : always OK, with these additional fields :
- **"current-scene"** (string) : name of the currently active scene - **"current-scene"** (string) : name of the currently active scene
- **"scenes"** (array of objects) : ordered list of scene descriptions (see `GetCurrentScene` for reference) - **"scenes"** (array of objects) : ordered list of scene descriptions (see `GetCurrentScene` for reference)
---
#### "SetSourceRender" #### "SetSourceRender"
Show or hide a specific source in the current scene. Show or hide a specific source in the current scene.
@ -169,12 +209,16 @@ __Request fields__ :
__Response__ : OK if source exists in the current scene, error otherwise. __Response__ : OK if source exists in the current scene, error otherwise.
---
#### "StartStopStreaming" #### "StartStopStreaming"
Toggle streaming on or off. Toggle streaming on or off.
__Request fields__ : none __Request fields__ : none
__Response__ : always OK. No additional fields. __Response__ : always OK. No additional fields.
---
#### "StartStopRecording" #### "StartStopRecording"
Toggle recording on or off. Toggle recording on or off.
@ -182,6 +226,8 @@ __Request fields__ : none
__Response__ : always OK. No additional fields. __Response__ : always OK. No additional fields.
*New in OBS Studio* *New in OBS Studio*
---
#### "GetStreamingStatus" #### "GetStreamingStatus"
Get current streaming and recording status. Get current streaming and recording status.
@ -191,6 +237,8 @@ __Response__ : always OK, with these additional fields :
- **"recording"** (bool) : recording status (active or not) - **"recording"** (bool) : recording status (active or not)
- **"preview-only"** (bool) : always false. Retrocompat with OBSRemote. - **"preview-only"** (bool) : always false. Retrocompat with OBSRemote.
---
#### "GetTransitionList" #### "GetTransitionList"
List all transitions available in the frontend's dropdown menu. List all transitions available in the frontend's dropdown menu.
@ -204,6 +252,8 @@ Objects in the "transitions" array have only one field :
*New in OBS Studio* *New in OBS Studio*
---
#### "GetCurrentTransition" #### "GetCurrentTransition"
Get the name of the currently selected transition in the frontend's dropdown menu. Get the name of the currently selected transition in the frontend's dropdown menu.
@ -213,6 +263,8 @@ __Response__ : always OK, with these additional fields :
*New in OBS Studio* *New in OBS Studio*
---
#### "SetCurrentTransition" #### "SetCurrentTransition"
__Request fields__ : __Request fields__ :
- **"transition-name"** (string) : The name of the transition. - **"transition-name"** (string) : The name of the transition.
@ -221,6 +273,8 @@ __Response__ : OK if specified transition exists, error otherwise.
*New in OBS Studio* *New in OBS Studio*
---
#### "SetVolume" #### "SetVolume"
Set the volume of a specific source. Set the volume of a specific source.
@ -232,6 +286,8 @@ __Response__ : OK if specified source exists, error otherwise.
*Updated for OBS Studio* *Updated for OBS Studio*
---
#### "GetVolume" #### "GetVolume"
Get the volume of a specific source. Get the volume of a specific source.
@ -243,7 +299,9 @@ __Response__ : OK if source exists, with these additional fields :
- **"volume"** (double) : volume of the requested source, on a linear scale (0.0 to 1.0) - **"volume"** (double) : volume of the requested source, on a linear scale (0.0 to 1.0)
- **"muted"** (bool) : mute status of the requested source - **"muted"** (bool) : mute status of the requested source
*Update for OBS Studio* *Updated for OBS Studio*
---
#### "SetMute" #### "SetMute"
Mutes or unmutes a specific source. Mutes or unmutes a specific source.
@ -256,6 +314,8 @@ __Response__ : OK if specified source exists, error otherwise.
*Updated for OBS Studio* *Updated for OBS Studio*
---
#### "ToggleMute" #### "ToggleMute"
Inverts the mute status of a specific source. Inverts the mute status of a specific source.
@ -266,6 +326,8 @@ __Response__ : OK if specified source exists, error otherwise.
*Updated for OBS Studio* *Updated for OBS Studio*
---
#### "SetSceneItemPosition" #### "SetSceneItemPosition"
__Request fields__ : __Request fields__ :
- **"item"** (string) : The name of the scene item. - **"item"** (string) : The name of the scene item.
@ -276,6 +338,8 @@ __Response__ : OK if specified item exists, error otherwise.
*New in OBS Studio* *New in OBS Studio*
---
#### "SetSceneItemTransform" #### "SetSceneItemTransform"
__Request fields__ : __Request fields__ :
- **"item"** (string) : The name of the scene item. - **"item"** (string) : The name of the scene item.
@ -287,6 +351,8 @@ __Response__ : OK if specified item exists, error otherwise.
*New in OBS Studio* *New in OBS Studio*
---
### Authentication ### Authentication
A call to `GetAuthRequired` gives the client two elements : A call to `GetAuthRequired` gives the client two elements :
- A challenge : a random string that will be used to generate the auth response - A challenge : a random string that will be used to generate the auth response