Remove GetTransitionPosition

Moving it to its own PR since this PR will not make it into 4.8
This commit is contained in:
tt2468 2020-05-13 23:32:14 -07:00
parent 64062cc879
commit 121d9f4920
3 changed files with 0 additions and 21 deletions

View File

@ -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 },

View File

@ -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&);

View File

@ -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);
}