Created
November 3, 2014 20:45
-
-
Save drance/3ba4d0748251f0cf5bc0 to your computer and use it in GitHub Desktop.
Get the currently-routed AppleTV's name.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use in conjunction with e.g. KVO on AVPlayer.externalPlaybackActive | |
AVAudioSessionPortDescription *port = [AVAudioSession sharedInstance].currentRoute.outputs.firstObject; | |
if ([port.portType isEqualToString:AVAudioSessionPortAirPlay]) { | |
NSLog(@"Now playing on '%@'", port.portName); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment