What Problem Does This Solve?
When building apps with video capture, you need to offer users quality options that balance visual fidelity with performance and file size. Different use cases need different settings—recording gameplay for upload needs higher quality than live streaming, and mobile devices have different constraints than desktop.
QualityOption lets you define named presets (like “High”, “Medium”, “Low”) where each preset has separate configurations for recording vs. streaming.
When to Use QualityOption
Use QualityOption when:
- You want to give users selectable quality presets (Low/Medium/High)
- Recording and streaming need different settings (recording at higher quality, streaming at lower bitrate)
- You’re building a quality settings menu in your app
- Different platforms need different quality tiers
Skip this if you’re hardcoding a single quality level for all users.
Quick Example
This creates a “High” preset that records at 8 Mbps/60fps but streams at 5 Mbps/30fps.
How It Works
Each QualityOption contains:
- Name — Display label shown to users (“High”, “Medium”, “Low”)
- Recording settings — Resolution, bitrate, framerate for saved videos
- Streaming settings — Usually lower bitrate/framerate for live streaming
- Default flag — Marks which option is selected by default
You typically create multiple QualityOption instances and add them to a LckQualityConfig asset.
Common Patterns
Three-tier quality system
Record-only mode (no streaming)
API Reference
Constructor
Parameters
name — Display name shown in UI (“High”, “Medium”, “Low”)
isDefault — Set true for the default selection
cameraTrackDescriptor — Settings for recording
streamingCameraTrackDescriptor — Settings for live streaming
Fields
Obsolete Members
Deprecated: CameraTrackDescriptor field is obsolete. Use RecordingCameraTrackDescriptor or StreamingCameraTrackDescriptor instead.