Agora RTC Objective-C API Reference Refactor

Instance Methods
<AgoraMediaRecorderDelegate> Protocol Reference

Inherits <NSObject>.

## Instance Methods
(void) | - mediaRecorder:stateDidChanged:uid:state:reason:
(void) | - mediaRecorder:informationDidUpdated:uid:info:

## Method Documentation

## ◆ mediaRecorder:stateDidChanged:uid:state:reason:

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

Callback for recording state changes.

Since
  v4.0.0

The SDK triggers this callback when the recording state of the audio and video stream changes. It reports the current recording state and the reason for the change.

Parameters

  recorder | The `AgoraMediaRecorder` instance.
  channelId | The channel name.
  uid | The user ID.
  state | The current recording state. See `AgoraMediaRecorderState`.
  reason | The reason for the recording state change. See `AgoraMediaRecorderReasonCode`.

## ◆ mediaRecorder:informationDidUpdated:uid:info:

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

Recording information update callback.

Since
  v4.0.0

After you successfully register this callback and start audio and video stream recording, the SDK periodically triggers this callback based on the value of `recorderInfoUpdateInterval` that you set in `AgoraMediaRecorderConfiguration`, reporting the current recording file's name, duration, and size.

Parameters

  channelId | The channel name.
  uid | The user ID.
  info | The recording file information. See `AgoraMediaRecorderInfo`.
  recorder | The `AgoraMediaRecorder` object.