Property Client
- Namespace
- OBSStudioClient.Model
- Assembly
- OBSClient.dll
Client
Gets the ObsClient that the model is built on. Every request and every event of OBS Studio is available through it.
public ObsClient Client { get; }
Property Value
Remarks
Use it to send the requests that this class does not offer yet. The model sees what they do through the events of OBS Studio, as it does for what any other program does. Do not connect or disconnect it yourself: see ConnectAsync(string, int, string, CancellationToken) and DisconnectAsync(). The client switches AutoReconnect off by itself when OBS Studio ends the session on purpose (the Kick button of its session list): the State is then Disconnected, and you can connect again.
While OBS Studio changes its scene collection it answers every request with 207 (not ready). The client repeats a single request that is answered so (see MaxRequestRetries and RequestRetryInterval); it does not repeat a batch: the results of a batch that was sent in that time say 207, and it is for you to look at them and to send the batch again. A request that changes something and was held up that way is carried out in the collection that OBS Studio has loaded when it is ready again, not in the one that you were looking at when you sent it. And the requests that change the collection (SetCurrentSceneCollection and CreateSceneCollection) are answered when OBS Studio is done, which takes longer than the default RequestTimeout: raise it before you send them, or the call throws a TimeoutException while OBS Studio switches all the same.