Soo i need to send a audio file (WAV/MP3) file over the internet to a client browser, that then is used inside a client script to be played back/processed. the server will be running a c# application. I initially approached it by using sending the file as a download to the clients hard-drive... but i had problems with accessing the file and i needed to clear the file when the client leaves the web page. I'm looking for the good advice of the community for a library or any specific methodology or course of action to tackle this problem cheers....
Asked
Active
Viewed 3,873 times
1
-
2look into binary ajax. blob response type is ideal. – dandavis Dec 03 '14 at 08:47
-
1it may be helpful: http://stackoverflow.com/questions/9563887/setting-html5-audio-position/26865633#26865633 – artur grzesiak Dec 03 '14 at 08:48
-
Thank you i will look into blob responses – tharindus609 Dec 03 '14 at 08:52
2 Answers
2
Download the file from your JavaScript as a JSON or XML blob with an Ajax request.

overflowed
- 1,773
- 10
- 13
1
Encode the audio file into a base 64 string (binary to text). Once you recieve it at the server you can decode it back to it's original format. Hope this helps!

zedt
- 11
- 1