Agora RTC Objective-C API Reference
Refactor
|
Inherits <NSObject>.
Instance Methods | |
(int) | - setMediaRecorderDelegate: |
(int) | - startRecording: |
(int) | - stopRecording |
- (int) setMediaRecorderDelegate: | (id< AgoraMediaRecorderDelegate > _Nullable) | delegate |
Registers the AgoraMediaRecorderDelegate delegate.
delegate | The callbacks for recording audio and video streams. See AgoraMediaRecorderDelegate |
- (int) startRecording: | (AgoraMediaRecorderConfiguration *_Nonnull) | config |
Starts recording the local audio and video.
After successfully calling createMediaRecorder: (AgoraRtcEngineKit) createMediaRecorder to get the media recorder object , you can call this method to enable the recording of the local audio and video.
This method can record the following content:
This method can record the following content:
The SDK can generate a recording file only when it detects the recordable audio and video streams; when there are no audio and video streams to be recorded or the audio and video streams are interrupted for more than five seconds, the SDK stops recording and triggers the stateDidChanged (AgoraMediaRecorderState, AgoraMediaRecorderReasonCode) callback.
config | The recording configurations. See AgoraMediaRecorderConfiguration object. |
-1(ERR_FAILED)
: IRtcEngine does not support the request due to one of the following reasons:-2(ERR_INVALID_ARGUMENT)
: The parameter is invalid. Ensure the following:-4(ERR_NOT_SUPPORTED)
: IRtcEngine does not support the request due to one of the following reasons:- (int) stopRecording |
Stops recording the audio and video.
stopRecording
; otherwise, the generated recording files might not be playable.