Skip to content

Conversation

@Abbhiishek
Copy link

@Abbhiishek Abbhiishek commented Oct 18, 2025

  • Added QualityPreset type with four options: "low" | "medium" | "high" | "ultra"
  • Simple string-based configuration that users can easily understand

Mapped to appropriate settings: ✅

  1. Low: 640x480@15fps, 500kbps video, 64kbps audio, VP8 codec
  2. Medium: 1280x720@24fps, 1.5Mbps video, 128kbps audio, VP9 codec
  3. High: 1920x1080@30fps, 4Mbps video, 256kbps audio, VP9 codec
  4. Ultra: 3840x2160@60fps, 15Mbps video, 320kbps audio, VP9 codec

Users can now simply pass qualityPreset="high" instead of complex MediaRecorderOptions

Backward compatible - existing code continues to work unchanged

Example

// Simple usage - just specify the preset
const { startRecording, stopRecording } = useReactMediaRecorder({
  video: true,
  audio: true,
  qualityPreset: "high" // 1080p@30fps with optimized bitrates
});

// Advanced usage - preset with custom overrides
const { startRecording, stopRecording } = useReactMediaRecorder({
  video: { width: 1920, height: 1080 }, // Custom resolution
  audio: true,
  qualityPreset: "medium", // Will use medium bitrates but custom resolution
  mediaRecorderOptions: {
    videoBitsPerSecond: 2000000 // Override preset bitrate
  }
});

…and configuration options.

Signed-off-by: Abhishek kushwaha <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant