startRecording
abstract suspend fun startRecording(onRecordingFinished: (filePath: String, reason: RecordingFinishedReason) -> Unit, onRecordingError: (error: Throwable) -> Unit, onRecordingPaused: () -> Unit? = null, onRecordingResumed: () -> Unit? = null)
Starts recording. Returns once the recording has started.
Parameters
onRecordingFinished
Called with the file path once the recording finished, via stopRecording or a limit of RecorderSettings, see RecordingFinishedReason.
onRecordingError
Called if an unexpected error occurred while recording.
onRecordingPaused
Called when the recording has been paused.
onRecordingResumed
Called when the paused recording has been resumed.
Throws
If this recorder already recorded.