Agora Java API Reference for Android

Public Member Functions | Public Attributes | List of all members
io.agora.rtc2.AgoraMediaRecorder.MediaRecorderConfiguration Class Reference

## Public Member Functions
| MediaRecorderConfiguration (String storagePath, int containerFormat, int streamType, int maxDurationMs, int recorderInfoUpdateInterval)

## Public Attributes
String | storagePath
int | containerFormat = CONTAINER_MP4
int | streamType = STREAM_TYPE_BOTH
int | maxDurationMs = 120000
int | recorderInfoUpdateInterval = 0

## Detailed Description

Configurations for the local audio and video recording.

Since
  v3.5.2

## Member Data Documentation

## ◆ storagePath

String io.agora.rtc2.AgoraMediaRecorder.MediaRecorderConfiguration.storagePath

The absolute path (including the filename extensions) for the recording file. For example, `/storage/emulated/0/Android/data/<package name>/files/example.mp4`.

Note
  Ensure that the specified path exists and is writable.

## ◆ containerFormat

int io.agora.rtc2.AgoraMediaRecorder.MediaRecorderConfiguration.containerFormat = CONTAINER_MP4

The format of the recording file. The SDK currently supports only CONTAINER_MP4(1).

## ◆ streamType

int io.agora.rtc2.AgoraMediaRecorder.MediaRecorderConfiguration.streamType = STREAM_TYPE_BOTH

The recording content:

- STREAM_TYPE_AUDIO(0x1): Only audio.
- STREAM_TYPE_VIDEO(0x2): Only video.
- STREAM_TYPE_BOTH(0x3): (Default) Audio and video.

## ◆ maxDurationMs

int io.agora.rtc2.AgoraMediaRecorder.MediaRecorderConfiguration.maxDurationMs = 120000

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

## ◆ recorderInfoUpdateInterval

int io.agora.rtc2.AgoraMediaRecorder.MediaRecorderConfiguration.recorderInfoUpdateInterval = 0

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.