Method GetStatusAsync
- Namespace
- OBSStudioClient.Model
- Assembly
- OBSClient.dll
GetStatusAsync(CancellationToken)
Asks OBS Studio what the media is doing, how long it is, and where it is.
public Task<ObsMediaStatus> GetStatusAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token that ends the wait. A request that was not sent yet is not sent.
Returns
- Task<ObsMediaStatus>
What OBS Studio says at this moment.
Remarks
The length and the position are only known while the media plays or is paused, and the position moves all the time: it is not kept in the model. The answer is not applied to State: it is what OBS Studio holds at the moment of the answer, including the states that the events do not announce (opening, buffering, an error). The request is made in its turn, after the changes that were asked for before it.
Exceptions
- ObsRemovedException
The input was destroyed.
- 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).
- ObsResponseException
OBS Studio refused the request.