Airplay screen selection not working in portrait

Recently I've noticed a problem with Airplay. The problem is that in the Airplay popup that shows screens (or speakers etc) for selection when you want to connect an Airplay target device, it's not possible to select said target.

It seems to involve these factors.

  • Portrait (no problem in landscape)
  • iPhone 13 Pro Max/iOS 16.1.1 (does not happen on an iPhone Xs iOS 16.1.1)

I've confirmed the problem with an app in development, but also the current Youtube app in the App Store.

Anyone else?

Seems like I cannot edit the post for some reason so I'll add more info here.

The problem does not appear on iPhone 11 Pro 15.7.1

Another factor that seems likely:

Problem only occurring when using iOS 16 SDK to build (Xcode 14)

After restarting the iPhone 13 Pro Max, the issue goes away at first, but after a while it seems that it's coming back. Like after playing a Youtube video in the app in landscape, and then going back to portrait. Very peculiar.

Another update. I've been able to reproduce the problem on all of these devices so far, if following a certain procedure. iPhone 13 Pro max, iOS 16.1.1 iPhone Xs, iOS 16.1.1 iPhone 13, iOS 16.1.1

  1. Open Youtube app.
  2. Play a video in landscape on the iPhone.
  3. While still in landscape, click on the cast button, select Airplay, connect some external device (screen or speaker, does probably not matter)
  4. Disconnect Airplay / play the video on the iPhone again.
  5. Switch to portrait mode.
  6. While in portrait and video is playing, open the Airplay popup again.
  7. Try to tap on an external speaker/screen, but you'll notice the popup is not responsive so you probably cannot choose any device. <<< this is the problem

We have also experienced this issue during development with the AVPlayerViewController. Sometimes, in portrait, we cannot select a specific item in the Airplay list and if we try to select an item at the bottom, the first one gets selected.

We could "get round it" by opening the Airplay modal while the player is in landscape. There, it works just fine.

Airplay screen selection not working in portrait
 
 
Q