svhawks / SceneKitVideoRecorder

Record your SceneKit and ARKit scenes easily.
MIT License
258 stars 55 forks source link

How to check if recorder is recording? #60

Closed lsamaria closed 4 years ago

lsamaria commented 4 years ago

How can I check if the recorder is recording? For eg.

if recorder?.isWriting {

    _ = recorder?.startWriting()

} else {

    recorder?.finishWriting().onSuccess { [weak self] url in

        print("recording success", url)

    }.onFailure(callback: { (error) in

        print("recording failed", error)
    })
}
ahmetardal commented 4 years ago

You can inspect this file to understand what you can do with this component:

https://github.com/svhawks/SceneKitVideoRecorder/blob/master/SceneKitVideoRecorder/Classes/SceneKitVideoRecorder.swift

You can use a boolean property for isRecording. Set it when you start recording.

lsamaria commented 4 years ago

Im using a boolean now, thanks for the help :)