Airplay to AppleTV vs. HomePod

How can I see what device is airplayed to when choosing Apple TV or Home Pod? In both cases the type in the route of the current audio session is just returned as airplay and I'm not seeing anything else that allows me to distinguish between the two?

Replies

Just ran into this myself, In addition to checking for AVAudioSession.Port.airPlay of the current AVAudioSession, you also need to check the value of the AVPlayer's isExternalPlaybackActive property. If it's true, it's AirPlaying video, if not it's just sending the audio to the HomePod.