> For the complete documentation index, see [llms.txt](https://assetstore.replaykit.voxelbusters.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://assetstore.replaykit.voxelbusters.com/api/stop-recording.md).

# Stop 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.

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

Example

```csharp
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}]");
        }
    });
}
```
