here is my problem:
I've got an app playing audio files, updating the lockscreen info via MPNowPlayingInfoCenter.defaultCenter().nowPlayingInfo
, and this part is working fine.
But in an other view, i'm playing a video with AVPlayerViewController
and AVPlayer
, and when the video starts playing, it's updating the lock screen automatically, with nothing except the video duration.
I didn't find anything about this behaviour in Apple's documentation, I can't find a way to disable it.
So far, I've tried calling UIApplication.sharedApplication().endReceivingRemoteControlEvents()
before the video starts playing, and beginReceivingRemoteControlEvents()
after. It doesn't work.
Does anyone know a way to prevent this?