AgoraMediaRecorderDelegate
The AgoraMediaRecorderDelegate class.
stateDidChanged
Occurs when the recording state changes.
- (void)mediaRecorder:(AgoraMediaRecorder* _Nonnull)recorder stateDidChanged:(AgoraMediaRecorderState)state error:(AgoraMediaRecorderErrorCode)error;
When the local audio or video recording state changes, the SDK triggers this callback to report the current recording state and the reason for the change.
Parameters
- recorder
- An AgoraMediaRecorder object.
- state
- The current recording state. See AgoraMediaRecorderState.
- error
- The reason for the state change. See AgoraMediaRecorderErrorCode.
informationDidUpdated
Occurs when the recording information is updated.
- (void)mediaRecorder:(AgoraMediaRecorder* _Nonnull)recorder informationDidUpdated:(AgoraMediaRecorderInfo* _Nonnull)info;
After you successfully enable the local audio and video recording, the SDK periodically triggers this callback based on the value of recorderInfoUpdateInterval set in AgoraMediaRecorderConfiguration. This callback reports the file name, duration, and size of the current recording file.
Parameters
- info
- The information about the file that is recorded. See AgoraMediaRecorderInfo.
- recorder
- The AgoraMediaRecorder object.