Agora Java API Reference for Android

Public Member Functions | Public Attributes | List of all members
agora::media::MediaRecorderConfiguration Struct Reference

`#include <AgoraMediaBase.h>`

## Public Member Functions
| MediaRecorderConfiguration (const char *path, MediaRecorderContainerFormat format, MediaRecorderStreamType type, int duration, int interval)

## Public Attributes
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

Configurations for the local audio and video recording.

Since
  v3.5.2

## Member Data Documentation

## ◆ storagePath

const char* agora::media::MediaRecorderConfiguration::storagePath

The absolute path (including the filename extensions) of the recording file. For example, `C:\Users\<user_name>\AppData\Local\Agora\<process_name>\example.mp4` on Windows, `/App Sandbox/Library/Caches/example.mp4` on iOS, `/Library/Logs/example.mp4` on macOS, and `/storage/emulated/0/Android/data/<package name>/files/example.mp4` on Android.

Note
  Ensure that the specified path exists and is writable.

## ◆ containerFormat

MediaRecorderContainerFormat agora::media::MediaRecorderConfiguration::containerFormat

The format of the recording file. See MediaRecorderContainerFormat.

## ◆ streamType

MediaRecorderStreamType agora::media::MediaRecorderConfiguration::streamType

The recording content. See MediaRecorderStreamType.

## ◆ maxDurationMs

int agora::media::MediaRecorderConfiguration::maxDurationMs

The maximum recording duration, in milliseconds. The default value is 120000.

## ◆ recorderInfoUpdateInterval

int agora::media::MediaRecorderConfiguration::recorderInfoUpdateInterval

The interval (ms) of updating the recording information. The value range is [1000,10000]. Based on the set value of `recorderInfoUpdateInterval`, the SDK triggers the onRecorderInfoUpdated callback to report the updated recording information.

## ◆ width

int agora::media::MediaRecorderConfiguration::width

The video width

## ◆ height

int agora::media::MediaRecorderConfiguration::height

The video height

## ◆ fps

int agora::media::MediaRecorderConfiguration::fps

The video fps

## ◆ sample_rate

int agora::media::MediaRecorderConfiguration::sample_rate

The audio sample rate

## ◆ channel_num

int agora::media::MediaRecorderConfiguration::channel_num

The audio channel nums

## ◆ videoSourceType

agora::rtc::VIDEO_SOURCE_TYPE agora::media::MediaRecorderConfiguration::videoSourceType

The video source just for out channel recoder