Description

QualityOption defines a named quality preset that can be selected at runtime. It includes track descriptors for both recording nd streaming, and can mark one option as the default. Primarily used in configuration assets such as LckQualityConfig.

Usage

You can define a QualityOption to represent different capture quality levels. For example, you might configure High, Medium, and Low presets, each with their own resolution, bitrate, and framerate.
// Define resolution and track descriptors
var resolution = new CameraResolutionDescriptor(1920, 1080);
var recordTrack = new CameraTrackDescriptor(resolution, bitrate: 8 << 20, framerate: 60);
var streamTrack = new CameraTrackDescriptor(resolution, bitrate: 5 << 20, framerate: 30);

// Create a quality option
var highQuality = new QualityOption(
    name: "High",
    isDefault: true,
    cameraTrackDescriptor: recordTrack,
    streamingCameraTrackDescriptor: streamTrack
);

References

Fields

FieldTypeDescription
NamestringDisplay name of the quality option.
IsDefaultboolMarks this option as the default selection.
RecordingCameraTrackDescriptorCameraTrackDescriptorTrack descriptor used when recording.
StreamingCameraTrackDescriptorCameraTrackDescriptorTrack descriptor used when streaming.

Constructor

public QualityOption(
    string name,
    bool isDefault,
    CameraTrackDescriptor cameraTrackDescriptor,
    CameraTrackDescriptor streamingCameraTrackDescriptor
)

Parameters

  • name — The display name of the option.
  • isDefault — Whether this option is the default.
  • cameraTrackDescriptor — Track descriptor for recording.
  • streamingCameraTrackDescriptor — Track descriptor for streaming.

Obsolete Members

MemberTypeDescription
CameraTrackDescriptorCameraTrackDescriptorObsolete. For backwards compatibility only. Use RecordingCameraTrackDescriptor or StreamingCameraTrackDescriptor instead.