AudioPlayerManager
AudioPlayerManager copied to clipboard
No music player in Notification Center/Lockscreen after playing video
My app plays video and audio. I start fullscreen videos like this:
func startFullscreenVideo(videoURL:URL) {
let player = AVPlayer(url: videoURL)
let controller = AVPlayerViewController()
controller.player = player
present(controller, animated: true) {
player.play()
}
}
and the Audio with your library.
Problem: After playing Audio, then playing a Video, and then playing Audio again the App stops to show a Music Player in Background/Lock Screen/Control Center (https://i.stack.imgur.com/zXRw2.jpg this one starts missing).
This is a weird bug and I hope you can help me.