<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaDevice",
  "identifier" : "/documentation/MediaDevice/MediaDeviceRoutingManager/volumeChanged(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Media Device"
    ],
    "preciseIdentifier" : "s:11MediaDevice0aB14RoutingManagerC13volumeChanged3foryAA0a6OutputB0V_tF"
  },
  "title" : "volumeChanged(for:)"
}
-->

# volumeChanged(for:)

Notifies the system that the volume state has changed on a remote device.

```
@MainActor final func volumeChanged(for device: MediaOutputDevice)
```

## Parameters

`device`

The device whose volume state has changed.

## Discussion

Call this function when the remote device’s volume level or mute state changes independently
of system-initiated volume control calls. This is typically needed when:

- The device’s physical volume buttons are pressed
- The device’s volume is changed through its own interface or remote control
- Another application or service modifies the device’s volume
- The device automatically adjusts volume (for example, due to content normalization)

After calling this function, the system will query the current volume state by calling
the appropriate getter based on the device’s [`volumeControl`](/documentation/MediaDevice/MediaOutputDevice/volumeControl-swift.property):

- For [`MediaOutputDevice.VolumeControl.absolute`](/documentation/MediaDevice/MediaOutputDevice/VolumeControl-swift.enum/absolute) devices: [`volume(for:)`](/documentation/MediaDevice/MediaDeviceExtension/volume(for:)) and/or [`isDeviceMuted(_:)`](/documentation/MediaDevice/MediaDeviceExtension/isDeviceMuted(_:)) will be called (if [`canMute`](/documentation/MediaDevice/MediaOutputDevice/canMute) is `true`)
- For [`MediaOutputDevice.VolumeControl.relative`](/documentation/MediaDevice/MediaOutputDevice/VolumeControl-swift.enum/relative) devices: [`isDeviceMuted(_:)`](/documentation/MediaDevice/MediaDeviceExtension/isDeviceMuted(_:)) will be called (if [`canMute`](/documentation/MediaDevice/MediaOutputDevice/canMute) is `true`)

> Important: Do not call this function in response to system-initiated volume changes
> (for example, when ``doc://com.apple.mediadevice/documentation/MediaDevice/MediaDeviceExtension/setVolume(_:for:)``, ``doc://com.apple.mediadevice/documentation/MediaDevice/MediaDeviceExtension/changeVolume(by:for:)``, or ``doc://com.apple.mediadevice/documentation/MediaDevice/MediaDeviceExtension/muteDevice(_:)``
> are called). Only call it for external or device-initiated volume changes.

> Note: For device groups, call this function once for the group rather than for each
> individual member device, unless individual devices can have independent volume changes.

> SeeAlso: ``doc://com.apple.mediadevice/documentation/MediaDevice/MediaOutputDevice/VolumeControl-swift.enum``

> SeeAlso: ``doc://com.apple.mediadevice/documentation/MediaDevice/MediaDeviceExtension/volume(for:)``

> SeeAlso: ``doc://com.apple.mediadevice/documentation/MediaDevice/MediaDeviceExtension/isDeviceMuted(_:)``

---

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)