muhku / FreeStreamer

A low-memory footprint streaming audio player for iOS and OS X

Home Page:http://muhku.github.io/FreeStreamer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to update custom header for request restart

satishVekariya opened this issue · comments

ex: i attach access token "token_1" in initial request. if my stream is too long, some time stream is time out and rerequest to server, in between my token is change to "token_2", now how i can attach this new token to current stream and start request.

what i try is:

        let config = FSStreamConfiguration()
        config.predefinedHttpHeaderValues = ["access_token": "token_1"]
        player = FSAudioStream(configuration: config)
        player.play(url)

AccessToken refresh("token_2") event:

player.configuration.predefinedHttpHeaderValues = ["access_token": "token_2"]

result in rerequest is it take old token "token_1"