Stop Recording

Learn how to stop a recording

This call stops the current recording and do the required steps for making the recorded video available for preview.

You need to have an active recording to call this method. Else it throws error.

recorder.StopRecording(callback: (success, error) =>
{
    if (success)
    {
        Debug.Log("Stop recording successful.");
    }
    else
    {
        Debug.Log($"Stop recording failed with error [{error}]");
    }
});

Example

using VoxelBusters.ScreenRecorderKit;

IScreenRecorder recorder;
//... Create instance for IScreenRecorder via ScreenRecorderBuilder

public void StopRecording()
{
    recorder.StopRecording((success, error) =>
    {
        if (success)
        {
            Debug.Log("Stop recording successful.");
        }
        else
        {
            Debug.Log($"Stop recording failed with error [{error}]");
        }
    });
}

Last updated