mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Requests: Start/Stop Streaming/Recording request now have errors
This commit is contained in:
parent
d0118c63c0
commit
d014a7ab25
@ -491,7 +491,7 @@ __Response__ : always OK. No additional fields.
|
||||
Start streaming.
|
||||
|
||||
__Request fields__ : none
|
||||
__Response__ : always OK. No additional fields.
|
||||
__Response__ : Error if streaming is already active, OK otherwise. No additional fields.
|
||||
|
||||
---
|
||||
|
||||
@ -499,7 +499,7 @@ __Response__ : always OK. No additional fields.
|
||||
Stop streaming.
|
||||
|
||||
__Request fields__ : none
|
||||
__Response__ : always OK. No additional fields.
|
||||
__Response__ : Error if streaming is already inactive, OK otherwise. No additional fields.
|
||||
|
||||
---
|
||||
|
||||
@ -507,7 +507,7 @@ __Response__ : always OK. No additional fields.
|
||||
Start recording.
|
||||
|
||||
__Request fields__ : none
|
||||
__Response__ : always OK. No additional fields.
|
||||
__Response__ : Error if recording is already active, OK otherwise. No additional fields.
|
||||
|
||||
---
|
||||
|
||||
@ -515,7 +515,7 @@ __Response__ : always OK. No additional fields.
|
||||
Stop recording.
|
||||
|
||||
__Request fields__ : none
|
||||
__Response__ : always OK. No additional fields.
|
||||
__Response__ : Error if recording is already inactive, OK otherwise. No additional fields.
|
||||
|
||||
---
|
||||
|
||||
|
@ -391,33 +391,53 @@ void WSRequestHandler::HandleStartStopRecording(WSRequestHandler *req)
|
||||
void WSRequestHandler::HandleStartStreaming(WSRequestHandler *req)
|
||||
{
|
||||
if (obs_frontend_streaming_active() == false)
|
||||
{
|
||||
obs_frontend_streaming_start();
|
||||
|
||||
req->SendOKResponse();
|
||||
}
|
||||
else
|
||||
{
|
||||
req->SendErrorResponse("streaming already active");
|
||||
}
|
||||
}
|
||||
|
||||
void WSRequestHandler::HandleStopStreaming(WSRequestHandler *req)
|
||||
{
|
||||
if (obs_frontend_streaming_active() == true)
|
||||
{
|
||||
obs_frontend_streaming_stop();
|
||||
|
||||
req->SendOKResponse();
|
||||
}
|
||||
else
|
||||
{
|
||||
req->SendErrorResponse("streaming not active");
|
||||
}
|
||||
}
|
||||
|
||||
void WSRequestHandler::HandleStartRecording(WSRequestHandler *req)
|
||||
{
|
||||
if (obs_frontend_recording_active() == false)
|
||||
{
|
||||
obs_frontend_recording_start();
|
||||
|
||||
req->SendOKResponse();
|
||||
}
|
||||
else
|
||||
{
|
||||
req->SendErrorResponse("recording already active");
|
||||
}
|
||||
}
|
||||
|
||||
void WSRequestHandler::HandleStopRecording(WSRequestHandler *req)
|
||||
{
|
||||
if (obs_frontend_recording_active() == true)
|
||||
{
|
||||
obs_frontend_recording_stop();
|
||||
|
||||
req->SendOKResponse();
|
||||
}
|
||||
else
|
||||
{
|
||||
req->SendErrorResponse("recording not active");
|
||||
}
|
||||
}
|
||||
|
||||
void WSRequestHandler::HandleGetTransitionList(WSRequestHandler *req)
|
||||
|
Loading…
x
Reference in New Issue
Block a user