Agora RTC Objective-C API Reference  Refactor
Properties
AgoraMediaRecorderConfiguration Class Reference

Inherits <NSObject>.

Properties

NSString *_Nonnull storagePath
 
AgoraMediaRecorderContainerFormat containerFormat
 
AgoraMediaRecorderStreamType streamType
 
NSUInteger maxDurationMs
 
NSUInteger recorderInfoUpdateInterval
 
NSUInteger width
 
NSUInteger height
 
NSUInteger fps
 
NSUInteger sample_rate
 
NSUInteger channel_num
 
AgoraVideoSourceType videoSourceType
 

Property Documentation

◆ storagePath

- (NSString* _Nonnull) storagePath
readwritenonatomiccopy

The absolute path where the recording file is saved locally. The path must include the file name and extension. For example:

  • iOS: /App Sandbox/Library/Caches/example.mp4
  • macOS: /Library/Logs/example.mp4
    Note
    Make sure the specified path exists and is writable.

◆ containerFormat

- (AgoraMediaRecorderContainerFormat) containerFormat
readwritenonatomicassign

The format of the recorded file. See AgoraMediaRecorderContainerFormat.

◆ streamType

- (AgoraMediaRecorderStreamType) streamType
readwritenonatomicassign

Recording content. See AgoraMediaRecorderStreamType for details.

◆ maxDurationMs

- (NSUInteger) maxDurationMs
readwritenonatomicassign

Maximum recording duration in milliseconds. The default value is 120000.

◆ recorderInfoUpdateInterval

- (NSUInteger) recorderInfoUpdateInterval
readwritenonatomicassign

Interval for updating recording information, in milliseconds. The value must be within [1000, 10000]. The SDK triggers the mediaRecorder:informationDidUpdated:uid:info: callback based on this setting to report the updated recording information.

◆ width

- (NSUInteger) width
readwritenonatomicassign

The width (in px) of the recorded video. The maximum value of width × height must not exceed 3840 × 2160. You need to set this parameter only when calling createMediaRecorder: and setting the type in AgoraRecorderStreamInfo to AgoraRecorderStreamTypePreview.

◆ height

- (NSUInteger) height
readwritenonatomicassign

Height (in px) of the recorded video. The maximum value of width × height must not exceed 3840 × 2160. You need to set this parameter only when calling createMediaRecorder: and setting the type in AgoraRecorderStreamInfo to AgoraRecorderStreamTypePreview.

◆ fps

- (NSUInteger) fps
readwritenonatomicassign

The frame rate for recording video, with a maximum value of 30. For example: 5, 10, 15, 24, 30, etc. You need to set this parameter only when calling createMediaRecorder: and setting the type field in AgoraRecorderStreamInfo to AgoraRecorderStreamTypePreview.

◆ sample_rate

- (NSUInteger) sample_rate
readwritenonatomicassign

Sampling rate (Hz) for recording audio. You can set it to 16000, 32000, 44100, or 48000. This parameter is required only when you call createMediaRecorder: and set the type field in AgoraRecorderStreamInfo to AgoraRecorderStreamTypePreview.

◆ channel_num

- (NSUInteger) channel_num
readwritenonatomicassign

Number of channels for recording audio:

  • 1: Mono
  • 2: Stereo You need to set this parameter only when you call createMediaRecorder: and set the type in AgoraRecorderStreamInfo to AgoraRecorderStreamTypePreview.

◆ videoSourceType

- (AgoraVideoSourceType) videoSourceType
readwritenonatomicassign

The type of the video source for recording. See AgoraVideoSourceType. You need to set this parameter only when calling createMediaRecorder: and setting the type in AgoraRecorderStreamInfo to AgoraRecorderStreamTypePreview.