Table of Contents

Method GetStreamServiceAsync

Namespace
OBSStudioClient.Model
Assembly
OBSClient.dll

GetStreamServiceAsync(CancellationToken)

Asks OBS Studio for its stream service: where the stream of the profile that is current goes.

public Task<ObsStreamService> GetStreamServiceAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

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

Returns

Task<ObsStreamService>

The type of the service and its settings, the stream key among them.

Remarks

OBS Studio does not announce a change of the stream service, so the model does not keep it: ask when you need it. It belongs to the profile (ObsProfiles). Treat the settings as a secret: they hold the stream key, and OBS Studio gives them without it being asked for (ToString() does not show them).

Exceptions

ObsNotConnectedException

There is no connection to OBS Studio.

ObsNotReadyException

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

TimeoutException

OBS Studio did not answer in time (WriteTimeout).