Table of Contents

Method SetTBarPositionAsync

Namespace
OBSStudioClient.Model
Assembly
OBSClient.dll

SetTBarPositionAsync(double, bool, CancellationToken)

Sets the position of the T-bar of studio mode, which moves a transition by hand. It returns when OBS Studio has answered.

public Task SetTBarPositionAsync(double position, bool release = true, CancellationToken cancellationToken = default)

Parameters

position double

The position, from 0.0 to 1.0.

release bool

Whether to release the T-bar. Pass false only when another position follows.

cancellationToken CancellationToken

A token that ends the wait. A change that was not sent yet is not sent.

Returns

Task

A task that completes when OBS Studio has answered that it made the change.

Remarks

obs-websocket says that this request will be replaced in a future version. The model shows what it does through the events like anything else (the transition starts when the T-bar moves, and the program scene changes when it is released at the end), and the call has nothing to wait for but the answer of OBS Studio. What the T-bar does is OBS Studio's: with OBS Studio 33.0.0 a T-bar that is moved to 0.5 and not released holds the transition there, and one that is moved to 1.0 and released ends it, but the scenes that are the program scene and the preview scene afterwards were not those of a trigger (the T-bar has a direction of its own). Use TriggerAsync(CancellationToken) to switch from the preview scene to the program scene.

Exceptions

ArgumentOutOfRangeException

position is not from 0.0 to 1.0. Nothing was sent.

ObsNotConnectedException

There is no connection to OBS Studio. Nothing was changed.

ObsNotReadyException

OBS Studio is changing its scene collection, or did so after the call. Nothing was changed.

ObsUnknownOutcomeException

OBS Studio did not answer in time, or the connection ended: it is not known whether it made the change.

ObsResponseException

OBS Studio refused the change: studio mode is off (ErrorCode is StudioModeNotActive).