Post not yet marked as solved
Post marked as unsolved with 0 replies, 340 views
Hello,
I'm trying to identify the name of the device when AirPlay is active. I would like to use the name for VoiceOver.
With the snippet below, all I'm getting is "AirPlay".
Here is a snippet:
var externalDeviceName: String {
let currentRoute = AVAudioSession.sharedInstance().currentRoute
var port: String?
for output in currentRoute.outputs where output.portType == AVAudioSession.Port.airPlay {
port = output.portName
}
return port ?? "unknown"
}
Is getting the device name no possible? Or am I just doing it wrong?
Thanks!