mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Bugfix: wrong behaviour in TransitionToProgram with a specif. transition
This commit is contained in:
parent
841de2f752
commit
03c8c6385c
@ -363,13 +363,9 @@ void WSRequestHandler::HandleGetStreamingStatus(WSRequestHandler *req)
|
|||||||
void WSRequestHandler::HandleStartStopStreaming(WSRequestHandler *req)
|
void WSRequestHandler::HandleStartStopStreaming(WSRequestHandler *req)
|
||||||
{
|
{
|
||||||
if (obs_frontend_streaming_active())
|
if (obs_frontend_streaming_active())
|
||||||
{
|
|
||||||
obs_frontend_streaming_stop();
|
obs_frontend_streaming_stop();
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
obs_frontend_streaming_start();
|
obs_frontend_streaming_start();
|
||||||
}
|
|
||||||
|
|
||||||
req->SendOKResponse();
|
req->SendOKResponse();
|
||||||
}
|
}
|
||||||
@ -377,13 +373,9 @@ void WSRequestHandler::HandleStartStopStreaming(WSRequestHandler *req)
|
|||||||
void WSRequestHandler::HandleStartStopRecording(WSRequestHandler *req)
|
void WSRequestHandler::HandleStartStopRecording(WSRequestHandler *req)
|
||||||
{
|
{
|
||||||
if (obs_frontend_recording_active())
|
if (obs_frontend_recording_active())
|
||||||
{
|
|
||||||
obs_frontend_recording_stop();
|
obs_frontend_recording_stop();
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
obs_frontend_recording_start();
|
obs_frontend_recording_start();
|
||||||
}
|
|
||||||
|
|
||||||
req->SendOKResponse();
|
req->SendOKResponse();
|
||||||
}
|
}
|
||||||
@ -983,7 +975,7 @@ void WSRequestHandler::HandleTransitionToProgram(WSRequestHandler *req)
|
|||||||
{
|
{
|
||||||
obs_data_t* transitionInfo = obs_data_get_obj(req->data, "with-transition");
|
obs_data_t* transitionInfo = obs_data_get_obj(req->data, "with-transition");
|
||||||
|
|
||||||
if (req->hasField("name"))
|
if (obs_data_has_user_value(transitionInfo, "name"))
|
||||||
{
|
{
|
||||||
const char* transitionName = obs_data_get_string(transitionInfo, "name");
|
const char* transitionName = obs_data_get_string(transitionInfo, "name");
|
||||||
if (!str_valid(transitionName))
|
if (!str_valid(transitionName))
|
||||||
@ -1001,7 +993,7 @@ void WSRequestHandler::HandleTransitionToProgram(WSRequestHandler *req)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (req->hasField("duration"))
|
if (obs_data_has_user_value(transitionInfo, "duration"))
|
||||||
{
|
{
|
||||||
int transitionDuration = obs_data_get_int(transitionInfo, "duration");
|
int transitionDuration = obs_data_get_int(transitionInfo, "duration");
|
||||||
Utils::SetTransitionDuration(transitionDuration);
|
Utils::SetTransitionDuration(transitionDuration);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user