Table of Contents

Method RemoveAsync

Namespace
OBSStudioClient.Model
Assembly
OBSClient.dll

RemoveAsync(CancellationToken)

Removes the scene item from its scene, and returns when the model shows it.

public Task RemoveAsync(CancellationToken cancellationToken = default)

Parameters

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 IsRemoved is true.

Remarks

The source that the item shows is not removed, but OBS Studio keeps an input only for as long as something uses it: when this was the last scene item that showed the input, OBS Studio destroys the input with it (it is not in Inputs any more, and its State is Gone), whether the input was removed (Detached) or not. An input that something else holds, such as an audio device of the settings of OBS Studio, stays.

Exceptions

ObsRemovedException

The scene item, or its scene, was removed already.

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.

ObsNotConfirmedException

OBS Studio made the change, and the model does not show it: the events did not show it in time, and the model could not be read again in time. Do not send the change again.

ObsResponseException

OBS Studio refused the change.