Configurations for the local audio and video recording.

public static class MediaRecorderConfiguration {
    public String storagePath;
    public int containerFormat = CONTAINER_MP4;
    public int streamType = STREAM_TYPE_BOTH;
    public int maxDurationMs = 120000;
    public int recorderInfoUpdateInterval = 0;

    public MediaRecorderConfiguration(String storagePath, int containerFormat, int streamType,
        int maxDurationMs, int recorderInfoUpdateInterval) {
      this.storagePath = storagePath;
      this.containerFormat = containerFormat;
      this.streamType = streamType;
      this.maxDurationMs = maxDurationMs;
      this.recorderInfoUpdateInterval = recorderInfoUpdateInterval;


The absolute path (including the filename extensions) of the recording file. 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
Attention: Ensure that the directory for the log files exists and is writable.
The format of the recording file. Only CONTAINER_MP4 is supported.
The recording content:
  • STREAM_TYPE_AUDIO: Only audio.
  • STREAM_TYPE_VIDEO: Only video.
  • STREAM_TYPE_BOTH: (Default) Audio and video.
The maximum recording duration, in milliseconds. The default value is 120000.
The interval (ms) of updating the recording information. The value range is [1000,10000]. Based on the value you set in this parameter, the SDK triggers the onRecorderInfoUpdated callback to report the updated recording information.