Agora C++ API Reference for All Platforms
agora::rtc::IMediaRecorderObserver Class Referenceabstract

#include <IAgoraRtcEngine.h>

Public Member Functions

virtual void onRecorderStateChanged (RecorderState state, RecorderErrorCode error)=0
 
virtual void onRecorderInfoUpdated (const RecorderInfo &info)
 

Detailed Description

The IMediaRecorderObserver class.

Since
v3.5.2

Member Function Documentation

◆ onRecorderStateChanged()

virtual void agora::rtc::IMediaRecorderObserver::onRecorderStateChanged ( RecorderState  state,
RecorderErrorCode  error 
)
pure virtual

Occurs when the recording state changes.

Since
v3.5.2

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. See RecorderState.
errorThe reason for the state change. See RecorderErrorCode.

◆ onRecorderInfoUpdated()

virtual void agora::rtc::IMediaRecorderObserver::onRecorderInfoUpdated ( const RecorderInfo info)
inlinevirtual

Occurs when the recording information is updated.

Since
v3.5.2

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.