Agora Java API Reference for Android
io.agora.rtc.AgoraMediaRecorder.IMediaRecorderCallback Interface Reference

Public Member Functions

abstract void onRecorderStateChanged (int state, int error)
 
abstract void onRecorderInfoUpdated (RecorderInfo info)
 

Detailed Description

The IMediaRecorderCallback interface.

Since
v3.5.2

Member Function Documentation

◆ onRecorderStateChanged()

abstract void io.agora.rtc.AgoraMediaRecorder.IMediaRecorderCallback.onRecorderStateChanged ( int  state,
int  error 
)
abstract

Occurs when the recording state changes.

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.

Parameters
stateThe current recording state:
errorThe reason for the state change:

◆ onRecorderInfoUpdated()

abstract void io.agora.rtc.AgoraMediaRecorder.IMediaRecorderCallback.onRecorderInfoUpdated ( RecorderInfo  info)
abstract

Occurs when the recording information is updated.

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

Parameters
infoInformation for the recording file. See RecorderInfo.