When playing an HLS stream with an AVPlayer object, where the content key was retrieved using an AVAssetResourceLoaderDelegate object, the AirPlay functionality works out-of-box. The same cannot be said when the content key for the stream was retrieved using an AVContentKeySessionDelegate. When enabling AirPlay, I've noticed that AVContentKeySessionDelegate.contentKeySession(_:didProvide:)
gets called, where a new content key is retrieved from the KSM. Even with the new content key, the stream will not start on the AirPlay device (Apple TV). How can this issue be resolved?