4

Is it possible to redirect a manifest request in shouldWaitForLoadingOfRequestedResource to a different url?

I need to process some manifests manually (this part works good), while other redirect to different url.

But if I'm trying to make

[loadingRequest setRedirect:]
[loadingRequest finishLoading]

player just wait for some time and then the video failed by timeout, without any errors.

In the same delegate, manual manifest fetching and segments redirects both are working fine.

norlin
  • 1,205
  • 11
  • 24

1 Answers1

1

I actually cannot find any mentions about it in documentation, but just based on my experience, redirect requests never get called without corresponding HTTP status code in the response:

loadingRequest.response = [NSHTTPURLResponse initWithURL: assetURL, statusCode: 302, HTTPVersion: @"HTTP/1.1", headerFields: nil]
loadingRequest.redirect = taskRequest
[loadingRequest finishLoading]
The Dreams Wind
  • 8,416
  • 2
  • 19
  • 49