PendingRecording

public final class PendingRecording
extends Object

java.lang.Object
   ↳ androidx.camera.video.PendingRecording


A recording that can be started at a future time.

A pending recording allows for configuration of a recording before it is started. Once a pending recording is started with start(Executor, Consumer), any changes to the pending recording will not affect the actual recording; any modifications to the recording will need to occur through the controls of the Recording class returned by start(Executor, Consumer).

A pending recording can be created using one of the Recorder methods for starting a recording such as Recorder.prepareRecording(Context, MediaStoreOutputOptions).

There may be more settings that can only be changed per-recorder instead of per-recording, because it requires expensive operations like reconfiguring the camera. For those settings, use the Recorder.Builder methods to configure before creating the Recorder instance, then create the pending recording with it.

Summary

Public methods

Recording start(Executor listenerExecutor, Consumer<VideoRecordEvent> listener)

Starts the recording, making it an active recording.

PendingRecording withAudioEnabled()

Enables audio to be recorded for this recording.

Inherited methods

Public methods

start

public Recording start (Executor listenerExecutor, 
                Consumer<VideoRecordEvent> listener)

Starts the recording, making it an active recording.

Only a single recording can be active at a time, so if another recording is active, this will throw an IllegalStateException.

If there are no errors starting the recording, the returned Recording can be used t