ios - Handling HTTP redirects in AVQueuePlayer -


i have application can play audio playlist using avqueueplayer.

the actual song's urls built dynamically , expires after period of time after being built. playlist constructed using permalink, song url permanent, , responds http status code of 301.

say, example, song url http://myhost.com/song?id=1234, , url responds 301 (moved permanently) , location header url looks http://realcontent.com/song?id=...&token=...

this works fine, music gets played, i'm experiencing delay of few seconds before audio starts playing.

what see avplayer doing:

  1. a first request http header "range: bytes=0-1" permalink, responds redirect,
  2. a request redirected url same range
  3. a sencond request permalink full range, gets redirected
  4. a second request redirected url full range.

i avoid third step, unnecessary. permalink responded moved permanently, following request respond same way.

is there setting or can change avoid making request?


Comments

Popular posts from this blog

Formatting string according to pattern without regex in php -

c - zlib and gdi32 with OpenSSL? -

java - inputmismatch exception -