Method SetBlendModeAsync
- Namespace
- OBSStudioClient.Model
- Assembly
- OBSClient.dll
SetBlendModeAsync(BlendMode, CancellationToken)
Sets how the scene item is blended with what is behind it, and returns when OBS Studio has made the change.
public Task SetBlendModeAsync(BlendMode mode, CancellationToken cancellationToken = default)
Parameters
modeBlendModeThe blend mode.
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
The model does not keep the blend mode (OBS Studio does not announce a change of it), so the call does not wait for the model: it returns when OBS Studio has answered. See SetEnabledAsync(bool, CancellationToken) for the order of changes.
Exceptions
- ArgumentOutOfRangeException
modeis not a blend mode.- ObsRemovedException
The scene item, or its scene, was removed.
- 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.