SwiftAudio
SwiftAudio copied to clipboard
Catch Expired Auth Token to modify headers
Describe the bug When you query a network file with auth token headers, the firsts queries are OK. However, if your token is expired after an amount of time, the app can't download the other parts of the file and you don't get any error.
To Reproduce Just query a file which is protected with an auth token. Set an expired time for your token of 2 minutes and you'll get a 401 error within approximately the 2 min. To see the error on the query, I use a proxy like Charles because we don't have log about this in the library.
Expected behavior It could be good to have a kind of callback to allow us to modify the headers if a query fail with a 401. I tried some things with resourceLoader on AVUrlAsset but none is working for now.
Smartphone (please complete the following information): Tested on real device using iOS 13.5
Additional context I use the library in react-native-track-player #977 but the main problem come from here
Hi, I'm facing the same issue. Did you make any progress on this? I.e. come up with a DIY solution?