MediaRecorderState

Exposes recording controls and Compose-observable state for a MediaRecorder.

Use this wrapper to start and stop recording. isRecording starts as false and is updated only by calls through this wrapper; direct recorder operations are not observed.

Constructors

Link copied to clipboard
constructor(recorder: MediaRecorder)

Properties

Link copied to clipboard

The recording flag maintained by this wrapper. It is set before the start request is forwarded.

Functions

Link copied to clipboard
fun startRecording(path: String, format: Int)

Forwards a start request to the recorder after setting isRecording to true.

Link copied to clipboard

Stops the recorder and sets isRecording to false after the call succeeds.