Agora Java API Reference for Android
Public Member Functions | List of all members
agora::media::IMediaRecorderObserver Class Referenceabstract

Public Member Functions

virtual void onRecorderStateChanged (const char *channelId, rtc::uid_t uid, RecorderState state, RecorderReasonCode reason)=0
 Callback when the recording state changes. More...
 
virtual void onRecorderInfoUpdated (const char *channelId, rtc::uid_t uid, const RecorderInfo &info)=0
 Callback for recording information updates. More...
 

Member Function Documentation

◆ onRecorderStateChanged()

virtual void agora::media::IMediaRecorderObserver::onRecorderStateChanged ( const char *  channelId,
rtc::uid_t  uid,
RecorderState  state,
RecorderReasonCode  reason 
)
pure virtual

Callback when the recording state changes.

Since
v4.0.0

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

Parameters
channelIdChannel name.
uidUser ID.
stateCurrent recording state. See RecorderState.
reasonReason for the recording state change. See RecorderReasonCode.

◆ onRecorderInfoUpdated()

virtual void agora::media::IMediaRecorderObserver::onRecorderInfoUpdated ( const char *  channelId,
rtc::uid_t  uid,
const RecorderInfo info 
)
pure virtual

Callback for recording information updates.

Since
v4.0.0

After successfully registering this callback and starting audio and video stream recording, the SDK periodically triggers this callback based on the value of recorderInfoUpdateInterval set in MediaRecorderConfiguration, reporting the current recording file's name, duration, and size.

Parameters
channelIdChannel name.
uidUser ID.
infoRecording file information. See RecorderInfo.