hello i trying to play streaming video in background
when i played streaming audio file by AVPlayer
i set the Audio, Airpay, picture in Picture Option of Background modes Capabilities
and set this code at AppDelegate
do {
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback)
try AVAudioSession.sharedInstance().setActive(true)
} catch let sessionError {
print(sessionError)
}
application.beginReceivingRemoteControlEvents()
Audio was fine but video won't play
I use AVPlayer not AVPlayerViewController for custom playback control
How can i play streaming video in background