startRecording

@RequiresApi(value = 24)
@RequiresPermission(value = "android.permission.RECORD_AUDIO")
fun startRecording(fileOutputOptions: FileOutputOptions, audioConfig: AudioConfig = AudioConfig.create(true), onResult: (VideoCaptureResult) -> Unit)

Start recording camera.

Parameters

fileOutputOptions

file output options where the video will be saved

onResult

Callback called when VideoCaptureResult is ready


@RequiresApi(value = 26)
@RequiresPermission(value = "android.permission.RECORD_AUDIO")
fun startRecording(fileDescriptorOutputOptions: FileDescriptorOutputOptions, audioConfig: AudioConfig = AudioConfig.create(true), onResult: (VideoCaptureResult) -> Unit)

Start recording camera.

Parameters

fileDescriptorOutputOptions

file output options where the video will be saved

onResult

Callback called when VideoCaptureResult is ready


@RequiresApi(value = 24)
@RequiresPermission(value = "android.permission.RECORD_AUDIO")
fun startRecording(mediaStoreOutputOptions: MediaStoreOutputOptions, audioConfig: AudioConfig = AudioConfig.create(true), onResult: (VideoCaptureResult) -> Unit)

Start recording camera.

Parameters

mediaStoreOutputOptions

media store output options to the video to be saved.

onResult

Callback called when VideoCaptureResult is ready