In Radio app where for pausing the AVPlayer we are not really pausing it just muting it for some time as per the app requirement. Here the issue is everything is working fine but MPNowPlayingInfoCenter is not updating to pause when I mute the player. Is there is any way I can control MPNowPlayingInfoCenter controlls programmatically?
Tried the all possible solutions like making setActive(false) but this is causing issue in normal player.
Here is the solution for it
When Pausing I'm muting it for 120 secs and if it still in that mode I'm pausing the player here is the code i'm using for it.
self.player.rate = 0.0 // Automatically handles the MPNowPlayingInfoCenter Controls to Pause state
self.player.isMuted = true
secs = 120