Streaming audio from a url in protected server folder

I have several large mp3 files in a password protected folder. I also have new files added periodically, so I can't download them all on the first run of the application. They are too large for that anyway.

I know I can download a file from a protected folder (taifun: Downloading a file from a restricted area), but I couldn't find anything to stream the audio when the folder is protected. Is it possible?

I tried Joe Player and the Player component, but both fail when the folder is protected.

Is there a way to request a header by passing the base64 encoded "user:password" like in the download solution mentioned above? Please help.

How large ?

These blocks work OK for me to download a file from a protected server I have on test:

image

Maybe @Joejsanz can advise regarding setting a url this way for his Player extension ?

1 Like

I'm looking into that to see if I can implement it in the extension.

It is not only about the size.The app could download a file on demand, but if the connection is bad or there is no connection then it would be very limiting.and not prefessional.

Yes, this would be the way to download them.

Thank you. This would be the perfect solution.

Maybe it is? We need to know what large means to you; 1mb, 10mb,100mb, 100mb+ ?

but then your playback would not work / stop in any case...

Around 30Mb. About 60 files

Sorry. I wrote the wrong answer. I want to offer both possibilities: Stream and Download. If the user is going to be offline or has a bad connection, he can download the file when the connection is good. But most users would like to play the sound immediately using streaming and this would also save storage space.