Agora RTC Objective-C API Reference  Refactor
Data Fields
MediaRecorderConfiguration Struct Reference

Data Fields

const char * storagePath
 
MediaRecorderContainerFormat containerFormat
 
MediaRecorderStreamType streamType
 
int maxDurationMs
 
int recorderInfoUpdateInterval
 
int width
 
int height
 
int fps
 
int sample_rate
 
int channel_num
 
agora::rtc::VIDEO_SOURCE_TYPE videoSourceType
 

Detailed Description

Since
v3.5.2

Constructor & Destructor Documentation

◆ MediaRecorderConfiguration() [1/2]

◆ MediaRecorderConfiguration() [2/2]

MediaRecorderConfiguration ( const char *  path,
MediaRecorderContainerFormat  format,
MediaRecorderStreamType  type,
int  duration,
int  interval 
)
inline

Field Documentation

◆ storagePath

const char* storagePath

The absolute path where the recording file will be saved locally, including the file name and format. For example:

  • Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\example.mp4
  • iOS: /App Sandbox/Library/Caches/example.mp4
  • macOS: /Library/Logs/example.mp4
  • Android: /storage/emulated/0/Android/data/<package name>/files/example.mp4
    Note
    Make sure the specified path exists and is writable.

◆ containerFormat

The format of the recording file. See MediaRecorderContainerFormat.

◆ streamType

The content to record. See MediaRecorderStreamType.

◆ maxDurationMs

int maxDurationMs

Maximum recording duration in milliseconds. Default is 120000.

◆ recorderInfoUpdateInterval

int recorderInfoUpdateInterval

Interval for recording information updates, in milliseconds. The valid range is [1000,10000]. The SDK triggers the onRecorderInfoUpdated callback based on this value to report updated recording information.

◆ width

int width

Width (px) of the recorded video. The maximum value for width × height must not exceed 3840 × 2160. This parameter is required only when calling createMediaRecorder and setting type in RecorderStreamInfo to PREVIEW.

◆ height

int height

Height (px) of the recorded video. The maximum value for width × height must not exceed 3840 × 2160. This parameter is required only when calling createMediaRecorder and setting type in RecorderStreamInfo to PREVIEW.

◆ fps

int fps

Frame rate of the recorded video. The maximum is 30. For example: 5, 10, 15, 24, 30. This parameter is required only when calling createMediaRecorder and setting type in RecorderStreamInfo to PREVIEW.

◆ sample_rate

int sample_rate

Sample rate (Hz) of the recorded audio. Supported values: 16000, 32000, 44100, or 48000. This parameter is required only when calling createMediaRecorder and setting type in RecorderStreamInfo to PREVIEW.

◆ channel_num

int channel_num

Number of audio channels to record:

  • 1: Mono
  • 2: Stereo This parameter is required only when calling createMediaRecorder and setting type in RecorderStreamInfo to PREVIEW.

◆ videoSourceType

Type of video source to record. See VIDEO_SOURCE_TYPE. This parameter is required only when calling createMediaRecorder and setting type in RecorderStreamInfo to PREVIEW.