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
Yes, the audio file is just a binary file and can be saved an a blob data field. Then recalled from a query. Then play it any way you want.You may be better off saving the audio file to local storage and keeping track of where you put it in the database.
Yes.
// Get the file contents from the database...
// Assuming a DB wrapper here.
$results = $db->query('SELECT `file_contents` FROM `mp3s` WHERE `id` = :id', array(':id' => $_GET['id'])->execute();
$fileContents = $results[0]['file_contents'];
// Send appropriate headers for content type and force download
header('Content-Type: mpeg/audio');
header('Content-Disposition: attachment; filename="BullsOnPowerade.mp3"')
echo $fileContents;
You could use Flash on the web page. On 2.3 you could use the audio tag. See HTML5 <audio> tag on Android .
If you want to embed a video on your webpage, you can read this support article on Apple's website and this is a list of tag attributes... Hope this can help! :)
This is a really really broad question, but here are some starter tips:
easiest method is to use nowadays is HTML5 tag..
html5 audio
<audio src="horse.ogg" controls="controls">
Your browser does not support the audio element.
</audio>
using google mp3 player - replace mp3_file_url with the actual url of the file... although im not sure if it runs .amr files
<embed type="application/x-shockwave-flash" flashvars="audioUrl=MP3_FILE_URL" src="http://www.google.com/reader/ui/3523697345-audio-player.swf" width="400" height="27" quality="best"></embed>
EDIT:
quicktime - change WIDTH and HEIGHT in both cases.. and choose false/true in the params you want
<OBJECT classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' width="_WIDTH_" height="_HEIGHT_"codebase='http://www.apple.com/qtactivex/qtplugin.cab'>
<param name='src' value="apr.amr">
<param name='autoplay' value="true/false">
<param name='controller' value="true/false">
<param name='loop' value="true/false">
<EMBED src="apr.amr" width="_WIDTH_" height="_HEIGHT_" autoplay="true"
controller="true" loop="true" pluginspage='http://www.apple.com/quicktime/download/'>
</EMBED>
</OBJECT>