I'm using MPVolumeView to pick airplay device for avplayer airplay playback. Is there any possible non-private API alternative for doing this, so I would be able to provide my own UI Controls for picking airplay device?
By referring to the API, I mean, that all I need is:
- Ability to reroute audio to airplay-device specific audioRoute.
- Retrive airplay-device names. (get all available audioRoutes, then get descriptions for airplay audioRoutes)
I know AudioToolbox framework provides some additional API to deal AudioSession, but the only way I found to reroute audio is AVAudioSession's:
- (BOOL)overrideOutputAudioPort:(AVAudioSessionPortOverride)portOverride error:(NSError **)outError`
which only allows to reroute audio to build-in speakers. Maybe there is some other way how to achieve it there? (I also did only found the way how to retrieve the name of AirplayDevice as a description of the currentAudioRoute - Get name of AirPlay device using AVPlayer)