Method SaveAsync
- Namespace
- OBSStudioClient.Model
- Assembly
- OBSClient.dll
SaveAsync(CancellationToken)
Saves the replay buffer to a file, and returns when OBS Studio has accepted the request.
public Task SaveAsync(CancellationToken cancellationToken = default)
Parameters
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
OBS Studio writes the file a moment after it has answered, and says where: Saved is raised, and LastSavedPath shows the path; the path of the newest replay is also what GetLastReplayFileAsync(CancellationToken) returns. Saving changes nothing else in the model, so the call does not wait for it. See SetEnabledAsync(bool, CancellationToken) for the order of changes.
Exceptions
- 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 request: the replay buffer is not running.