Agora Java API Reference for Android
io.agora.rtc.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.rtc.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.rtc.AgoraMediaRecorder.MediaRecorderConfiguration.containerFormat = CONTAINER_MP4

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

◆ streamType

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

The recording content:

◆ maxDurationMs

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

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

◆ recorderInfoUpdateInterval

int io.agora.rtc.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.