Is Paused or Recording

Learn how to know if a preview is available

Check if a recording is currently paused or recording.

ReplayKitManager.IsPausedOrRecording();

Example

IScreenRecorder recorder;
//...
public void CheckStates()
{
    if(recorder.IsRecording())
    {
        Debug.Log("Currently an active recording exists and is in recording state.");
    }
    else if(recorder.IsPausedOrRecording())
    {
        Debug.Log("Currently an active recording exists and is either paused or in recording state.");
    }
    else if(recorder.IsPausedOrRecording() && !recorder.IsRecording())
    {
        Debug.Log("Currently an active recording exists and is paused state.");            
    }
    else
    {
        Debug.Log("No active recording exists.");
    }
    
    return ReplayKitManager.IsPreviewAvailable();
}

Last updated