relativeVolume(onIncrement:onDecrement:)
Returns a capability that lets the device increase or decrease its volume incrementally.
Declaration
static func relativeVolume(onIncrement: @escaping @Sendable () async throws -> Void, onDecrement: @escaping @Sendable () async throws -> Void) -> MediaDevice.CapabilityParameters
- 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.
Mentioned in
Discussion
Use this when the device supports stepwise volume changes but doesn’t expose an absolute level.