I'm trying to to airplay video even when the app is in the background.
Is this possible?
I've enabled Audio, AirPlay, and Picture in Picture
for background modes, in app capabilities.
I've also set AVAudioSession category:
do {
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback)
try AVAudioSession.sharedInstance().setActive(true)
} catch {
print("error");
}
Using Xcode 8.2.1 for iOS 8.1+ (iPhone simulator)
Have you inserted a list in .plist file?
Required background modes / itme0 : App plays audio or streams audio/video using AirPlay
enter image description here