Streaming audio from a url in protected server folder

Before downloading, you can set the downloaded file name using this:
image

Thanks. This makes things simpler than renaming it after. :grinning:

Hi @Joejsanz
Any news about playing from a restricted folder? Have you tried any other approaches?

1 Like

I haven't been able to test any server or any other option.

I only tried this way:

AuthType Basic
AuthName "Restricted Access"
AuthUserFile /absolute/path/to/.htpasswd
Require valid-user

I will investigate further on this matter as soon as I have a chance.

Thanks.

1 Like

Is this address still valid? I need an address with a real login and a real password for a real mp3 file.

https://access:IAD95RfxWe@escolademisterio.com.br/wp-content/uploads/restricted/test.mpeg

Hi @Patryk_F
The correct address is:

https://access:IAD95RfxWe@escolademisterio.com.br/wp-content/uploads/restricted/test.mp3

The file is test.mp3 and not test.mpeg

Ok. Were you able to play this audio in anything? Maybe an app or browser?

Should this also work in a regular browser?

Yes I can download it and play. But I can't stream it.
See the aia file.
downloadRestrictFolder.aia (949.5 KB)


Does the server have any settings to set it up for streaming?

Ok, I managed to play this file. Do you have a long file for testing?

AudioExoPlayerTest.aia (2.4 MB)

Hi @Patryk_F
Thank you very much for building this player and sharing your aia file. I am learning a lot from it. It is amazing.
One question, when you set the audioExoPlayer source to the web address pointing to the test.mp3 audio file, is the player streaming or downloading and then playing?
audioExoPlayer

Here is a long file for testing 101MB - 1 hour:

https://access:IAD95RfxWe@escolademisterio.com.br/wp-content/uploads/restricted/vivaldi_4_seasons.mp3

I tested it and it plays almost immediately. Wonderful!

Yes, exo player takes care of everything, although it can't do it directly from the url. I had to create a header, like you did for Web.

@Patryk_F
Can you share the aix file for this extension? It is the perfect solution for streaming from a protected folder. Thank you very much.

@Joejsanz also created a solution for his player:
https://community.appinventor.mit.edu/t/player-device-audio-loop-play-streaming/123673/189?u=gyano

1 Like

Thanks a lot, Gyano, but I think I'll remove that method in the next update.
I'll probably try it another way in the future.

Patryk's extension works perfectly for your protected URL.

I can send you this extension in PM, since it is not officially published.

Yes, please send it in PM. Thanks a lot.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.