Start | Scan, Pair and Connect | Device Information | Control | Power Management | Features | Metadata | Listeners | Stream | Apps | Audio | Logging | Examples

Audio

Protocols supporting volume controls can be controlled via the audio interface.

No protocol currently implement this interface!

Using the Audio API

After connecting to a device, you get the apps interface via interface.AppleTV.audio:

atv = await pyatv.connect(config, ...)
audio = atv.audio

To get current volume level, use interface.Audio.volume:

print("Volume:", audio.volume)

To change current volume, use interface.Audio.set_volume:

audio.set_volume(20.0)

The volume level is normalized in the interval 0.0-100.0, where 0.0 means the audio is muted.

← Apps | Logging →