AVPlayer has a lag when resuming while AirPods Pro are connected to Macbook and iPhone

Number:rdar://FB9086375 Date Originated:23.04.2021
Status:Open Resolved:No
Product:AVKit Product Version:
Classification: Reproducible:Yes
What is happening?
There is 500ms-1 second delay before the video starts playing.

Expected behaviour:
Video should play immediately without any lag.

How to reproduce:
- iOS 14.4.2 (it doesn't happen on iOS 14.2)
- AirPods Pro  (it doesn't happen on regular AirPods)
- Another device (Macbook) paired with same AirPods. (I'm running Big Sur 11.2.3)

1. Try to play the video, stop it, and play again
2. You'll see a notification on the Macbook ("Moved to iPhone") and the video will start playing after 500ms-1 second.

It doesn't happen when I disconnect the AirPods or use other bluetooth headphones which support multiple devices so it seems like it's something with AirPods Automatic Switching introduced recently.
The issue only happens with AVPlayer. If you try this with Spotify, Youtube, TikTok etc. It works correctly.

I'm playing a HLS Video so that might be a factor as well. 

Please find a small repro View Controller below.


Response from Apple May 8, 2021 at 12:49 AM

Thanks for contacting us. This behaves as expected currently.

More time is needed to resume playback if the AirPods switched over to the iPhone. 100-200ms delay in playing the video + 150-200ms audio device latency + rerouting to MacBook lines up with this.

We will continue to look into improvements in this area

Please close this feedback report, or let us know if this is still an issue for you. Thank you.

By milosz.filimowski at May 11, 2021, 1:48 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!