4

I have an AVPlayer playing audio in my app. I've registered to handle remote commands via MPRemoteCommandCenter, including Play, Pause, Stop, TogglePlayPause, and ChangePlaybackRate.

However, whenever my AVPlayer is playing back at a rate that is greater than 1.0, (say, 1.15x), when the AirPods are double-tapped my app gets a command of play, even when the app is already playing. If the app is playing back audio at a rate of 1.0 or less, I receive a pause remote command, as expected.

Update: It looks like this is related to what the value of MPNowPlayingInfoPropertyPlaybackRate is set to. When that value is 1.0 or less, pause works properly. When it's over 1.0, pause does not get called, play does. If I forcefully set the value of MPNowPlayingInfoPropertyPlaybackRate in the MPNowPlayingInfoCenter infoDict to 1.0, everything works as expected.

Jeff
  • 4,751
  • 5
  • 31
  • 35

0 Answers0