Method SetSettingsAsync
- Namespace
- OBSStudioClient.Model
- Assembly
- OBSClient.dll
SetSettingsAsync(object, CancellationToken)
Sets the settings of the output, and returns when OBS Studio has answered.
public Task SetSettingsAsync(object settings, CancellationToken cancellationToken = default)
Parameters
settingsobjectThe settings to set: an object (the fields and their values), for example
new { max_size_mb = 100 }, or a JsonElement. They are laid over the settings that the output has.cancellationTokenCancellationTokenA 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
OBS Studio does not say what it did with settings that the output does not know. Read them again (GetSettingsAsync(CancellationToken)) to see what the output holds. See SetEnabledAsync(bool, CancellationToken) for the order of changes.
Exceptions
- ArgumentNullException
settingsis null.- ArgumentException
settingsis not an object, or can not be written as JSON.- 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.
- ObsResponseException
OBS Studio refused the change: there is no output of this name.