It's not possible to pause playback using bluetooth headset after setting MPNowPlayingInfoPropertyPlaybackRate > 1.0

Hi!

In Becoming a Now Playable App project for iOS target after changing playback rate to 2.0 (or any other value greater than 1.0) some bluetooth headphones fail to pause playback (for example Motorola Pulse Escape).
The same issue manifests in other apps where playback speed change is allowed, but works well for Apple's Podcasts app.

I tried to create custom UIWindow subclass to log all events received by OS, but iOS 13 doesn't receive pause command from headset at all (when playback is active and rate > 1.0), however skip backward/previous track make app work until you change rate back to 2.

Does anyone have an idea how to make pause work in this case?

Thanks!

Hello!

We just ran into a similar issue with the "pause" command not working for bluetooth controls when the speed is >1.0.

The solution was to set MPNowPlayingInfoPropertyDefaultPlaybackRate on MPNowPlayingInfoCenter. This was really only clear after reading the source headers:

// The "default" playback rate of the now playing item. You should set this
// property if your app is playing a media item at a rate other than 1.0 in a
// default playback state. e.g., if you are playing back content at a rate of
// 2.0 and your playback state is not fast-forwarding, then the default
// playback rate should also be 2.0. Conversely, if you are playing back content
// at a normal rate (1.0) but the user is fast-forwarding your content at a rate
// greater than 1.0, then the default playback rate should be set to 1.0.
@available(iOS 8.0, *)
public let MPNowPlayingInfoPropertyDefaultPlaybackRate: String // NSNumber (double)

Apparently AVPlayer thought that the app was fast-forwarding because this rate did not match MPNowPlayingInfoPropertyPlaybackRate. Keeping those in lockstep fixed the bluetooth controls for us.

It's not possible to pause playback using bluetooth headset after setting MPNowPlayingInfoPropertyPlaybackRate > 1.0
 
 
Q