Table of Contents

Method PauseAsync

Namespace
OBSStudioClient.Model
Assembly
OBSClient.dll

PauseAsync(CancellationToken)

Pauses the recording, and returns when the model shows it.

public Task PauseAsync(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 IsPaused is true, or when the model has been read again after the events did not show it (see the remarks).

Remarks

OBS Studio can answer success and not pause: a recording that uses the encoder of the stream (the quality "same as the stream" of the simple output) cannot be paused, and a recording that does not run is not refused either. The model is read again then, and the call returns with IsPaused false (and ResumeAsync(CancellationToken) would be refused): look at IsPaused after the call.

See SetEnabledAsync(bool, CancellationToken) for the order of changes and the wait.

Exceptions

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. Do not send the change again.

ObsResponseException

OBS Studio refused the change.