Agora Java API Reference for Android
Public Member Functions | List of all members
io.agora.rtc2.IMediaRecorderCallback Interface Reference

Public Member Functions

void onRecorderStateChanged (String channelId, int uid, int state, int reason)
 
void onRecorderInfoUpdated (String channelId, int uid, RecorderInfo info)
 

Detailed Description

The IMediaRecorderCallback interface.

Since
v4.0.0

Member Function Documentation

◆ onRecorderStateChanged()

void io.agora.rtc2.IMediaRecorderCallback.onRecorderStateChanged ( String  channelId,
int  uid,
int  state,
int  reason 
)

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:
reasonThe reason for the state change:
channelIdThe channel name.
uidID of the user.

◆ onRecorderInfoUpdated()

void io.agora.rtc2.IMediaRecorderCallback.onRecorderInfoUpdated ( String  channelId,
int  uid,
RecorderInfo  info 
)

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 about the recording file. See RecorderInfo.\
channelIdThe channel name.
uidID of the user.