Agora C++ API Reference for All Platforms

Loading...
Searching...
No Matches
Public Member Functions | List of all members
agora::media::IMediaRecorderObserver Class Referenceabstract

`#include <AgoraMediaBase.h>`

## Public Member Functions
virtual void | onRecorderStateChanged (const char *channelId, rtc::uid_t uid, RecorderState state, RecorderReasonCode reason)=0
virtual void | onRecorderInfoUpdated (const char *channelId, rtc::uid_t uid, const RecorderInfo &info)=0
virtual | ~IMediaRecorderObserver ()

## Constructor & Destructor Documentation

## ◆ ~IMediaRecorderObserver()

virtual agora::media::IMediaRecorderObserver::~IMediaRecorderObserver | ( |  | ) |
| inline virtual

## 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

  channelId | Channel name.
  uid | User ID.
  state | Current recording state. See `RecorderState`.
  reason | Reason 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

  channelId | Channel name.
  uid | User ID.
  info | Recording file information. See `RecorderInfo`.