Table of Contents

Class ObsTransitions

Namespace
OBSStudioClient.Model
Assembly
OBSClient.dll

The scene transitions of OBS Studio: which one is current, how long it takes, whether one is running, and the calls that change them and trigger the transition of studio mode.

public sealed class ObsTransitions : INotifyPropertyChanged
Inheritance
ObsTransitions
Implements
Inherited Members

Remarks

It is the same object for as long as the ObsModel lives (Transitions), and says with INotifyPropertyChanged when Current, Duration and IsRunning change. The list of the transitions is not kept: OBS Studio does not announce that one was added or removed, so GetAllAsync(CancellationToken) asks.

What OBS Studio does (measured with OBS Studio 33.0.0): a scene that is switched to is on the program output at once as far as a question about it goes, and the event that says so comes when the transition has ended; the model reads the program scene when a transition starts, so ProgramScene shows the scene that is being switched to from the start, and IsRunning says that it is not on the air yet. A scene can bring a transition of its own (GetTransitionOverrideAsync(CancellationToken)), which is used for it without Current changing.

Properties

Current

Gets the current transition: the one that is used when a scene is switched to (the scene can bring another one, see GetTransitionOverrideAsync(CancellationToken)). It is null until it is known, and when the scene collection has no transition.

Duration

Gets how long a transition takes, for the transitions that take time (see IsFixed). It is the same for all of them, and null until OBS Studio has said: it does not say while the current transition is a cut, until it is told or the duration is changed.

IsRunning

Gets whether a transition is running: from the moment that OBS Studio says that it started until it says that its video ended. A transition that was already running when the model was connected is not known to run. While it is true the scene that was switched to is the one that ProgramScene shows, and is not on the air yet.

Methods

GetAllAsync(CancellationToken)

Asks OBS Studio for its scene transitions.

GetKindsAsync(CancellationToken)

Asks OBS Studio for the kinds of transition that it has.

GetProgressAsync(CancellationToken)

Asks OBS Studio how far the transition that runs has come.

GetSettingsAsync(CancellationToken)

Asks OBS Studio for the settings of the current transition.

SetCurrentAsync(string, CancellationToken)

Makes a transition the current one, and returns when the model shows it.

SetDurationAsync(TimeSpan, CancellationToken)

Sets how long the transitions take, and returns when the model shows it.

SetSettingsAsync(object, bool, CancellationToken)

Changes the settings of the current transition, and returns when OBS Studio has made the change.

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.

TriggerAsync(CancellationToken)

Triggers the transition of studio mode (the Transition button): the preview scene becomes the program scene. It returns when the model shows that a transition runs.

Events

Ended

Occurs when a transition has ended; for a transition that plays a video (a stinger) that is its cut point, and the video goes on until VideoEnded. It is raised like Started.

PropertyChanged

Occurs when a property value changes.

Started

Occurs when a transition starts. It is raised in the order in which the events of OBS Studio arrived, one at a time, on NotificationContext (or a thread of the thread pool). The same event is available as Model.Client.SceneTransitionStarted, which the client raises from a dispatcher of its own.

VideoEnded

Occurs when the video of a transition has ended, which is the end of the transition (OBS Studio says it for every transition). It is raised like Started.