Method GetVideoSettingsAsync
- Namespace
- OBSStudioClient.Model
- Assembly
- OBSClient.dll
GetVideoSettingsAsync(CancellationToken)
Asks OBS Studio for the video settings of the canvas: its base resolution, its output resolution and its frame rate.
public Task<ObsVideoSettings?> GetVideoSettingsAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token that ends the wait. A request that was not sent yet is not sent.
Returns
- Task<ObsVideoSettings>
The settings at the moment that OBS Studio answered; or null when the canvas has no video (a canvas that was made without one says nothing of it).
Remarks
OBS Studio does not announce a change of the video of a canvas, so the model does not keep it: ask when you need it. The request is made in its turn, after the changes that were asked for before it (see SetEnabledAsync(bool, CancellationToken)). For the main canvas this is what GetVideoSettingsAsync(CancellationToken) says.
Exceptions
- ObsRemovedException
The canvas is not there any more: OBS Studio does not list it, or said that it removed it, or OBS Studio changed its scene collection.
- 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).