In my application I have sent an audio 3gp file to the server and then using PHP I have stored it in a MySQL database as a BLOB. Is there a way to use a MediaPlayer in android to play an audio stream that is read directly from a BLOB? I know that I could read a BLOB and save it in a filesystem and then play it in android without downloading it but I would like to do not save any files in the server if possible. Thanks for the advises.
Share
Presuming that MediaPlayer will let you feed it a URL, you could stream it via a PHP script that fetches the BLOB and echoes it to the output all without ever saving it to the filesystem or Android device. If your PHP script supports HTTP
Rangeresponses, you could even support seeking.The script smartReadFile.php is a PHP script for streaming files with respect to
Rangerequests.https://groups.google.com/forum/#!msg/jplayer/nSM2UmnSKKA/bC-l3k0pCPMJ