Our audio files are stored in Azure blob storage.
The user is provided with a SAS URL link for playing the audio files. The SAS URL has an expiry of 5 mins. But, for long audio files (Say 10 mins), the streaming of audio stops while the audio is playing after 5 mins because the token expires which is the right thing to do.
However, what is the right way to fix this? Does the client request the backend for a new SAS token before the expiry time?
For the SAS token expiry while buffering keep tracking the expiry time and renew the SAS token. Since for security reason you can't increase expiry time but in case if its expired then renew.