MediaRecorderObserver

The MediaRecorderObserver class.

onRecorderStateChanged

Occurs when the local audio and video recording state changes.

OnRecorderStateChanged? onRecorderStateChanged;

When the local audio and video recording state changes, the SDK triggers this callback to report the current recording state and the reason for the change.

Return values

A callback object that includes the following parameters:

state
The current recording state. See RecorderState.
error
The reason for the state change. See RecorderErrorCode.

onRecorderInfoUpdated

Occurs when the recording information is updated.

OnRecorderInfoUpdated? onRecorderInfoUpdated;

After you successfully register this callback and enable the local audio and video recording, the SDK periodically triggers this callback according to the value of recorderInfoUpdateInterval you set in MediaRecorderConfiguration. This callback reports the filename, duration, and size of the current recording file.

Return values

A callback object that includes the following parameters:

info
Information of the recording file. See RecorderInfo.