Agora RTC Objective-C API Reference Refactor

<AgoraMediaRecorderDelegate> Protocol Reference

Inherits <NSObjectNSObject>.

## Media Recorder Delegate Methods
##
(void) | - mediaRecorder:stateDidChanged:uid:state:error:
(void) | - mediaRecorder:informationDidUpdated:uid:info:

## Method Documentation

## ◆ mediaRecorder:stateDidChanged:uid:state:error:

- (void) mediaRecorder: |  | (AgoraMediaRecorder *_Nonnull) | recorder
stateDidChanged: |  | (NSString *_Nonnull) | channelId
uid: |  | (NSUInteger) | uid
state: |  | (AgoraMediaRecorderState) | state
error: |  | (AgoraMediaRecorderErrorCode) | error

Occurs when media recorder state is changed.

Since
  v4.0.0

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

  recorder | AgoraMediaRecorder object.
  state | Recorder state. See AgoraMediaRecorderState.
  error | Error code. See AgoraMediaRecorderError.
  channelId | The channel name.
  uid | ID of the user.

## ◆ mediaRecorder:informationDidUpdated:uid:info:

- (void) mediaRecorder: |  | (AgoraMediaRecorder *_Nonnull) | recorder
informationDidUpdated: |  | (NSString *_Nonnull) | channelId
uid: |  | (NSUInteger) | uid
info: |  | (AgoraMediaRecorderInfo *_Nonnull) | info

Occurs when media recorder information is updated.

Since
  v4.0.0

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

  recorder | AgoraMediaRecorder object.
  info | Information about the recording file.. See AgoraMediaRecorderInfo.
  channelId | The channel name.
  uid | ID of the user.