volume(for:)
Gets the current volume level for the specified device.
Declaration
@MainActor func volume(for device: MediaOutputDevice) -> FloatParameters
- device:
The device for which to get the volume.
Mentioned in
Return Value
The current volume level, typically in the range 0.0 to 1.0.
Discussion
Called when a device supports MediaOutputDevice.VolumeControl.absolute.
Grouping
For a group of devices, all devices in the group must support MediaOutputDevice.VolumeControl.absolute.