I have an upload phone app that uploads either images or audio recordings. The image can be uploaded to a mysql database and displayed no problem in a webpage, The problem i
So if you have an AMR file (I haven't tested this, so you'll have to try this out) you will need to extract the AMR audio and convert it to MP3. Unfortunately it appears to be rather rare in Java, but a (rather painful) Google search turned up this link: http://www.benmccann.com/blog/extracting-amr-audio-from-android-3gp-files/ which claims to demonstrate extracting the audio from a 3gpp video file, so they at least have an AMR parser. I would look at the underlying library they use, isobox4j (discussed at http://groups.google.com/group/android-developers/browse_thread/thread/245c9de4132c2ab0?fwc=1) and see if you can either:
Good luck.
EDIT: or you could hope the client has an appropriate browser plugin: the broken quicktime mark indicates quicktime doesn't have a codec for it.
EDIT 2: You probably need to set a content-type for the plugin so it knows what to do. For AMR try adding
header("Content-type: audio/amr");
before the echo statement in your PHP and if that isn't enough add a mime type to your embed like this:
<object data="sound.php?id=110 width='391' height='298'"> <embed src='sound.php' type="audio/amr" width='391' height='298'></embed>'ERROR' </object>
See if that works.
EDIT: try this. Not sure if the $row['file'] is considered a string or an array, but the trim might do what you need.
<?php
header('Content-type: audio/amr');
$query = mysql_query("SELECT * FROM media WHERE media_id= '$idd'");
$row = mysql_fetch_array($query);
echo trim($row['file']);
exit;
If HTML5 is not an option, for inline playback, the best option supported out of the box by the majority of current browsers will be flash based. Flash still requires a plugin, but it's much more widely installed than Quicktime AFAIK.
The Google mp3 player that Tomasz suggested is a good choice. There are many more out there though. See for example http://www.webdesignbooth.com/10-easy-to-implement-flash-based-mp3-players-for-your-website/