Table of Contents

Method SendCaptionAsync

Namespace
OBSStudioClient.Model
Assembly
OBSClient.dll

SendCaptionAsync(string, CancellationToken)

Sends a caption (CEA-608 text) over the stream, and returns when OBS Studio has accepted it.

public Task SendCaptionAsync(string text, CancellationToken cancellationToken = default)

Parameters

text string

The text of the caption. It can be empty.

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.

Remarks

A caption changes nothing that the model shows, so the call does not wait for the model. See SetEnabledAsync(bool, CancellationToken) for the order of changes.

Exceptions

ArgumentNullException

text is null.

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 sent the caption.

ObsResponseException

OBS Studio refused the caption: the stream is not running.