public interface IMediaRecorderCallback
Modifier and Type | Method and Description |
---|---|
void |
onRecorderInfoUpdated(RecorderInfo info)
Occurs when the recording information is updated.
|
void |
onRecorderStateChanged(int state,
int error)
Occurs when the recording state changes.
|
void onRecorderStateChanged(int state, int error)
state
- The current recording state:
- int RECORDER_STATE_ERROR(-1)
: An error occurs during the
recording. See `error` message for the reason.
- RECORDER_STATE_START(2)
: The audio and video recording is
started.
- RECORDER_STATE_STOP(3)
: The audio and video recording is
stopped.error
- The reason for the state change:
- RECORDER_ERROR_NONE(0)
: No error occurs.
- RECORDER_ERROR_WRITE_FAILED(1)
: The SDK fails to write
the recorded data to a file.
- RECORDER_ERROR_NO_STREAM(2)
: The SDK does not detect audio
and video streams to be recorded, or audio and video streams are interrupted for more than
five seconds during recording.
- RECORDER_ERROR_OVER_MAX_DURATION(3)
: The recording
duration exceeds the upper limit.
- RECORDER_ERROR_CONFIG_CHANGED(4)
: The recording
configuration changes.void onRecorderInfoUpdated(RecorderInfo info)
info
- Information for the recording file. See RecorderInfo
.