title: AVAssetResourceLoaderDelegate methods not called
body: <p>I'm trying to play an online live stream (.m3u8) securely. I am creating an <code>AVAsset</code> and assigning its delegate to a singleton that conforms to <code>AVAssetResourceLoader</code>. The problem is, the <code>delegate</code> methods are not called.</p>
  <p>Code:</p>
  <p>PlayerViewController:</p>
  <pre><code>let asset: AVURLAsset = AVURLAsset(url: url, options: [&quot;AVURLAssetHTTPHeaderFieldsKey&quot;: headerFields])
      let item = AVPlayerItem(asset: asset)
      player = AVPlayer(playerItem: item)
      
      asset.resourceLoader.setDelegate(SSLAuthenticator.default, queue: DispatchQueue.main)
  </code></pre>
  <p>SSL Authenticator</p>
  <pre><code>func resourceLoader(_ resourceLoader: AVAssetResourceLoader, shouldWaitForResponseTo authenticationChallenge: URLAuthenticationChallenge) -&gt; Bool {
      print(&quot;0&quot;)
      return true
  }
  
  func resourceLoader(_ resourceLoader: AVAssetResourceLoader, didCancel authenticationChallenge: URLAuthenticationChallenge) {
      print(&quot;1&quot;)
  }
  
  func resourceLoader(_ resourceLoader: AVAssetResourceLoader, didCancel loadingRequest: AVAssetResourceLoadingRequest) {
      print(&quot;2&quot;)
  }
  
  func resourceLoader(_ resourceLoader: AVAssetResourceLoader, shouldWaitForLoadingOfRequestedResource loadingRequest: AVAssetResourceLoadingRequest) -&gt; Bool {
      print(&quot;3&quot;)
      return true
  }
  
  func resourceLoader(_ resourceLoader: AVAssetResourceLoader, shouldWaitForRenewalOfRequestedResource renewalRequest: AVAssetResourceRenewalRequest) -&gt; Bool {
      print(&quot;4&quot;)
      return true
  }
  </code></pre>
  <p>Does anyone know why the delegate methods are not being called?
  Thanks</p>