Skip to main content

What Problem Does This Solve?

Recording and streaming have different requirements. Recording prioritizes quality and file size—you want high bitrate, 60fps, large files you’ll upload later. Streaming prioritizes bandwidth and latency—lower bitrate, 30fps, smaller data sent live. LckCaptureType lets you switch between these modes, which automatically applies the appropriate track descriptor from your quality options (recording vs. streaming settings).

When to Use This

Use LckCaptureType when:
  • Your app supports both recording and streaming
  • You want different quality settings for each mode
  • Users can toggle between “Record for upload” vs. “Stream live”
  • You need to optimize for bandwidth (streaming) vs. quality (recording)
Skip this if you only support one mode.

Quick Example


How It Works

When you define a QualityOption, you specify two track descriptors:
When you set the capture type:
  • LckCaptureType.Recording → uses cameraTrackDescriptor
  • LckCaptureType.Streaming → uses streamingCameraTrackDescriptor
The SDK automatically applies the right settings.

Common Patterns

Toggle between modes with UI

Auto-select based on network

Initialize to default mode


Typical Settings by Mode

Recording Mode

Optimized for quality and upload:
  • Higher bitrate (8-12 Mbps) for better quality
  • Higher framerate (60 fps) for smooth motion
  • Larger file sizes acceptable

Streaming Mode

Optimized for bandwidth and latency:
  • Lower bitrate (3-5 Mbps) to reduce bandwidth
  • Standard framerate (30 fps) for stability
  • Smaller data packets for real-time delivery

Enum Values


API Reference

Set Capture Type

Parameters:
  • captureTypeRecording or Streaming
Returns: LckResult indicating success/failure

Get Capture Type

Returns: LckResult containing current capture type

When to Switch Modes

Before starting capture — Don’t change during active recording
Based on user preference — UI toggle for “Record” vs. “Stream”
Network availability — Auto-select streaming if online
Cannot change during recording — Returns CantEditSettingsWhileRecording error

Best Practices

Define both tracks — Always configure recording and streaming in QualityOption
Test both modes — Ensure settings work for both use cases
Stop before switching — Don’t change modes during active recording