Agora RTC Objective-C API Reference Refactor

Public Member Functions
IMediaRecorderObserver Class Referenceabstract

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

## Constructor & Destructor Documentation

## ◆ ~IMediaRecorderObserver()

virtual ~IMediaRecorderObserver | ( |  | ) |
| inline virtual

## Member Function Documentation

## ◆ onRecorderStateChanged()

virtual void 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 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`.