5

I am using AVAudioEngine to play audio files and AVPlayer and AVPlayerViewController to play videos.

and Control Center notification are enabled UIApplication.shared.beginReceivingRemoteControlEvents()

Control Center works perfectly for audio files (play/pause/next/prev/slider) if no video file is played (if no AVPlayerViewController instance exists)

but as soon as I play a video file and then dismiss the AVPlayerViewController and play audio file, all the controls in the Control Center becomes disable.

refreshing nowPlayingInfo does not work - it only updates the thumbnail and audio title

enter image description here After dismissing AVPlayerViewController

After dismissing AVPlayerViewController

PGill
  • 3,373
  • 18
  • 21

0 Answers0