> ## Documentation Index
> Fetch the complete documentation index at: https://docs.liv.tv/llms.txt
> Use this file to discover all available pages before exploring further.

# QualityOptionOverride

> Override quality settings for specific device models to optimize performance and quality on different hardware.

## What Problem Does This Solve?

Different devices have vastly different hardware capabilities. A high-end gaming PC can handle 4K60 recording, but a mid-range Android phone might struggle with 1080p30. Your default quality options might be too aggressive for some devices or too conservative for others.

`QualityOptionOverride` lets you define device-specific quality presets that automatically apply when the SDK detects specific hardware.

## When to Use QualityOptionOverride

Use this when:

* You have performance data showing certain devices need different settings
* Supporting a wide range of hardware (flagship phones to budget tablets)
* Users report performance issues on specific device models
* You want to maximize quality on high-end devices without breaking low-end ones

Skip this if you're targeting a single platform or device type.

***

## Quick Example

```csharp theme={null}
// Lower quality for a specific device that struggles with defaults
var phoneOverride = new QualityOptionOverride
{
    DeviceModel = new DeviceModel("Samsung Galaxy A52"),
    QualityOptions = new List<QualityOption>
    {
        new QualityOption(
            name: "Medium",
            isDefault: true,
            cameraTrackDescriptor: new CameraTrackDescriptor(
                new CameraResolutionDescriptor(1280, 720),
                bitrate: 4 << 20,  // 4 Mbps
                framerate: 30,
                audioBitrate: 128000
            ),
            streamingCameraTrackDescriptor: new CameraTrackDescriptor(
                new CameraResolutionDescriptor(1280, 720),
                bitrate: 3 << 20,  // 3 Mbps
                framerate: 30,
                audioBitrate: 128000
            )
        )
    }
};
```

When the SDK detects a Galaxy A52, it uses these settings instead of your base configuration.

***

## How It Works

1. You define a `DeviceModel` identifier (device name/model string)
2. Create a list of `QualityOption` instances tailored for that device
3. At runtime, the SDK checks the device model
4. If a match is found, it uses the override options instead of base config

The override completely replaces the base quality options for that device—it doesn't merge them.

***

## Common Patterns

### Override for low-end mobile devices

```csharp theme={null}
var budgetPhoneOverride = new QualityOptionOverride
{
    DeviceModel = new DeviceModel("Generic_Android_Device"),
    QualityOptions = new List<QualityOption>
    {
        new QualityOption("Low", true,
            new CameraTrackDescriptor(
                new CameraResolutionDescriptor(854, 480),
                bitrate: 2 << 20,
                framerate: 30
            ),
            new CameraTrackDescriptor(
                new CameraResolutionDescriptor(854, 480),
                bitrate: 1 << 20,
                framerate: 30
            )
        ),
        new QualityOption("Medium", false,
            new CameraTrackDescriptor(
                new CameraResolutionDescriptor(1280, 720),
                bitrate: 3 << 20,
                framerate: 30
            ),
            new CameraTrackDescriptor(
                new CameraResolutionDescriptor(1280, 720),
                bitrate: 2 << 20,
                framerate: 30
            )
        )
    }
};
```

### Boost quality on flagship devices

```csharp theme={null}
var flagshipOverride = new QualityOptionOverride
{
    DeviceModel = new DeviceModel("iPhone 15 Pro"),
    QualityOptions = new List<QualityOption>
    {
        new QualityOption("High", true,
            new CameraTrackDescriptor(
                new CameraResolutionDescriptor(1920, 1080),
                bitrate: 12 << 20,  // Higher bitrate
                framerate: 60
            ),
            new CameraTrackDescriptor(
                new CameraResolutionDescriptor(1920, 1080),
                bitrate: 8 << 20,
                framerate: 60  // 60fps streaming
            )
        ),
        new QualityOption("Ultra", false,
            new CameraTrackDescriptor(
                new CameraResolutionDescriptor(2560, 1440),
                bitrate: 20 << 20,
                framerate: 60
            ),
            new CameraTrackDescriptor(
                new CameraResolutionDescriptor(1920, 1080),
                bitrate: 10 << 20,
                framerate: 60
            )
        )
    }
};
```

***

## Finding Device Model Strings

<Info>
  Device model strings must match exactly. On Android, this is typically `Build.MODEL`. On iOS, it's the device identifier like "iPhone15,2".
</Info>

Log the device model at runtime to ensure you're using the correct string:

```csharp theme={null}
#if UNITY_ANDROID
    string deviceModel = SystemInfo.deviceModel;
#elif UNITY_IOS
    string deviceModel = UnityEngine.iOS.Device.generation.ToString();
#endif
Debug.Log($"Device Model: {deviceModel}");
```

***

## API Reference

### Fields

| Field            | Type                  | Description                                    |
| ---------------- | --------------------- | ---------------------------------------------- |
| `DeviceModel`    | `DeviceModel`         | The device identifier this override applies to |
| `QualityOptions` | `List<QualityOption>` | Quality options specific to this device        |

### Usage in Config

Overrides are typically added to a `LckQualityConfig` asset:

```csharp theme={null}
var config = ScriptableObject.CreateInstance<LckQualityConfig>();
config.BaseQualityOptions = baseOptions;
config.DeviceOverrides = new List<QualityOptionOverride>
{
    phoneOverride,
    flagshipOverride,
    budgetPhoneOverride
};
```

***

## Best Practices

<Check>
  **Test on actual devices** — Emulators don't reflect real performance
</Check>

<Check>
  **Monitor crash analytics** — Device-specific overrides often surface hidden issues
</Check>

<Check>
  **Start conservative** — Easier to increase quality later than debug performance problems
</Check>

<Warning>
  **Exact model matching** — Typos in device model strings mean the override won't apply
</Warning>

***

## Related

* [QualityOption](/api-reference/unity/structs/QualityOption) — Define quality presets
* [LckQualityConfig](/api-reference/unity/classes/LckQualityConfig) — Quality configuration asset
