AVPlayerController AirPlay audio track and custom image

I have a URL to an Audio track and a URL to custom album artwork image. I'm trying to replicate what apple music does when airplaying, where it shows the image, album title, artist etc, on the other screen while playing the audio

Using the AVPlayerController I can get the audio to play, and I can add the custom artwork to the contentOverlayView. But when I airplay, the contentOverlayView is not passed to the other screen, only the audio track

I tried playing around with adding nowPlayingInfo on the playerItem, but that didn't do anything.

How can I pass the image and other info along when the user clicks airplay on the AVPlayerController?

It seems that if I set "player.allowsExternalPlayback = false" the nowPlayingInfo is correctly passed to the tv, but then the player looses the airplay button, forcing me to use the notification centre option. This seems like a bug

AVPlayerController AirPlay audio track and custom image
 
 
Q