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:
- a first request http header "range: bytes=0-1" permalink, responds redirect,
- a request redirected url same range
- a sencond request permalink full range, gets redirected
- 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
Post a Comment