<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iOSAppExtension: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NowPlaying",
  "identifier" : "/documentation/NowPlaying/MediaDevice/Capability",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Now Playing"
    ],
    "preciseIdentifier" : "s:10NowPlaying11MediaDeviceV10CapabilityV"
  },
  "title" : "MediaDevice.Capability"
}
-->

# MediaDevice.Capability

The control capabilities of a device.

```
struct Capability
```

## Overview

Use this to specify what control operations a device supports.
The system uses this information to enable or disable device-specific controls in the interface.

## Topics

### Type Methods

[`static func absoluteVolume(Float, onChange: (Float) async throws -> Void) -> MediaDevice.Capability`](/documentation/NowPlaying/MediaDevice/Capability/absoluteVolume(_:onChange:))

Returns a capability that lets the device be set to a specific volume level.

[`static func relativeVolume(onIncrement: () async throws -> Void, onDecrement: () async throws -> Void) -> MediaDevice.Capability`](/documentation/NowPlaying/MediaDevice/Capability/relativeVolume(onIncrement:onDecrement:))

Returns a capability that lets the device increase or decrease its volume incrementally.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)