Agora RTC Objective-C API Reference  Refactor
<AgoraMediaRecorderDelegate> Protocol Reference

Inherits <NSObject>.

Media Recorder Delegate 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 

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
recorderAgoraMediaRecorder object.
stateRecorder state. See AgoraMediaRecorderState.
reasonError code. See AgoraMediaRecorderReasonCode.
channelIdThe channel name.
uidID 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
recorderAgoraMediaRecorder object.
infoInformation about the recording file.. See AgoraMediaRecorderInfo.
channelIdThe channel name.
uidID of the user.