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.

ReplayKitManager.StopRecording();

Example

public void StopRecording()
{
ReplayKitManager.StopRecording();
}

Receive events of recording state by registering to DidRecordingStateChange event. More Info here. Additionally you can pass a callback to get triggered when the preview is available.

public void StopRecording()
{
ReplayKitManager.StopRecording((filePath, error) => {
if(string.IsNullOrEmpty(error))
Debug.Log("File path : " + filePath);
else
Debug.LogError("Error : " + error);
});
}