2015년 1월 5일 월요일

Problem playing dynamically downloaded mp3 files

I am trying to make an app where, at the very first time when it is run, it downloads about 30 small mp3 files and stores them as simple assets. eg: tune01.mp3, tune02.mp3, etc.
But when I try to play any of these files, it gives Error 701 - Unable to Load
Wondering if there is any known error in this area.

Attached is the blocks. Any help is appreciated.




the file component can only work with text files, not sound files

if you want to download a file, you have to set Web.SaveResponse to true and use the Web.GotFile event, for an example see here https://puravidaapps.com/filebyfile.php



Thank you Taifun! You actually saved lot of my time. Without your response I could have gone nuts!
Now, the files are downloading and playing..
But there is one question though;
Even though I am setting the Web2.set ResponseFileName to a simple value such as 'tune01.mp3' and setting Web2.SaveResponse to True, in the Got File event handler it always comes up with '/storage/emulated/0/tune01.mp3' and so on as the file names. Wondering if it is possible to save the response as an asset file without any subdir structure. Basically I want the files to come as 'tune01.mp3','tunes02.mp3', etc. is it possible?


댓글 없음:

댓글 쓰기