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
| read write nonatomic copy

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
| read write nonatomic assign

The format of the recorded file. See `AgoraMediaRecorderContainerFormat`.

## ◆ streamType

- (AgoraMediaRecorderStreamType) streamType
| read write nonatomic assign

Recording content. See `AgoraMediaRecorderStreamType` for details.

## ◆ maxDurationMs

- (NSUInteger) maxDurationMs
| read write nonatomic assign

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

## ◆ recorderInfoUpdateInterval

- (NSUInteger) recorderInfoUpdateInterval
| read write nonatomic assign

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
| read write nonatomic assign

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
| read write nonatomic assign

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
| read write nonatomic assign

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
| read write nonatomic assign

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
| read write nonatomic assign

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
| read write nonatomic assign

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`.