AVPlayer making extraneous http request prior to playback of HLS / AES-encrypted video
We're using AVPlayer on iOS 8.4 to play HLS, AES-encrypted video. Our .m3u8 files include the url of the license server, e.g.: EXT-X-KEY:METHOD=AES-128,URI="https://...." In our iOS application, we're using AVAssetResourceLoaderDelegate method resourceLoader:shouldWaitForLoadingOfRequestedResource: to intercept the request that gets sent by the AVPlayer (or some object within AVFoundation) to the license server. Within that method, we add a token (required by the license server) to the request's queryString. The license server receives the request with the token, returns the encryption key,