<!--
{
  "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/relativeVolume(onIncrement:onDecrement:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Now Playing"
    ],
    "preciseIdentifier" : "s:10NowPlaying11MediaDeviceV10CapabilityV14relativeVolume11onIncrement0H9DecrementAEyyYaYbKc_yyYaYbKctFZ"
  },
  "title" : "relativeVolume(onIncrement:onDecrement:)"
}
-->

# relativeVolume(onIncrement:onDecrement:)

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

```
static func relativeVolume(onIncrement: @escaping @Sendable () async throws -> Void, onDecrement: @escaping @Sendable () async throws -> Void) -> MediaDevice.Capability
```

## Parameters

`onIncrement`

An async closure the system calls to step the volume up by one increment.

`onDecrement`

An async closure the system calls to step the volume down by one increment.

## Discussion

Use this when the device supports stepwise volume changes but doesn’t expose an
absolute level.

---

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)