Method OpenProjectorAsync
- Namespace
- OBSStudioClient.Model
- Assembly
- OBSClient.dll
OpenProjectorAsync(int?, string?, CancellationToken)
Opens a projector of the scene or the input on a monitor or in a window of OBS Studio, and returns when OBS Studio has answered.
public Task OpenProjectorAsync(int? monitorIndex = null, string? geometry = null, CancellationToken cancellationToken = default)
Parameters
monitorIndexint?The index of the monitor that the projector fills (see GetMonitorsAsync(CancellationToken)), or null (or -1) for a window.
geometrystringThe position and size of the window, as Qt writes them (base64), for a projector in a window; it can not be given together with a monitor, or null.
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
It changes nothing in the model, so the call does not wait for it. See SetEnabledAsync(bool, CancellationToken) for the order of changes.
Exceptions
- ObsRemovedException
The scene or input was destroyed.
- 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 opened the projector.
- ObsResponseException
OBS Studio refused the request (a monitor and a geometry were both given, or the monitor does not exist).