mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Remove GetTransitionPosition
Moving it to its own PR since this PR will not make it into 4.8
This commit is contained in:
parent
64062cc879
commit
121d9f4920
@ -86,7 +86,6 @@ const QHash<QString, RpcMethodHandler> WSRequestHandler::messageMap {
|
||||
{ "GetTransitionDuration", &WSRequestHandler::GetTransitionDuration },
|
||||
{ "ReleaseTBar", &WSRequestHandler::ReleaseTBar },
|
||||
{ "SetTBarPosition", &WSRequestHandler::SetTBarPosition },
|
||||
{ "GetTransitionPosition", &WSRequestHandler::GetTransitionPosition },
|
||||
|
||||
{ "SetVolume", &WSRequestHandler::SetVolume },
|
||||
{ "GetVolume", &WSRequestHandler::GetVolume },
|
||||
|
@ -103,7 +103,6 @@ class WSRequestHandler {
|
||||
RpcResponse GetTransitionDuration(const RpcRequest&);
|
||||
RpcResponse ReleaseTBar(const RpcRequest&);
|
||||
RpcResponse SetTBarPosition(const RpcRequest&);
|
||||
RpcResponse GetTransitionPosition(const RpcRequest&);
|
||||
|
||||
RpcResponse SetVolume(const RpcRequest&);
|
||||
RpcResponse GetVolume(const RpcRequest&);
|
||||
|
@ -184,22 +184,3 @@ RpcResponse WSRequestHandler::SetTBarPosition(const RpcRequest& request) {
|
||||
|
||||
return request.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the position of the current transition.
|
||||
*
|
||||
* @return {double} `position` current transition position. This value will be between 0.0 and 1.0. Note: Transition returns 1.0 when not active.
|
||||
*
|
||||
* @api requests
|
||||
* @name GetTransitionPosition
|
||||
* @category transitions
|
||||
* @since 4.8.0
|
||||
*/
|
||||
RpcResponse WSRequestHandler::GetTransitionPosition(const RpcRequest& request) {
|
||||
OBSSourceAutoRelease currentTransition = obs_frontend_get_current_transition();
|
||||
|
||||
OBSDataAutoRelease response = obs_data_create();
|
||||
obs_data_set_double(response, "position", obs_transition_get_time(currentTransition));
|
||||
|
||||
return request.success(response);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user