+ 1

I have been trying to put a video off my ph as example on here. Could someone please tell me why this doesnt work?

<audio controls> <source src="storage/emulated/0/download/Converted_file_3de6a671.mp3" type="audio/mpeg"> <source src="storage/emulated/0/download/Converted_file_3de6a671_1_.ogg" type="audio/ogg"> </audio> thank you

30th Oct 2016, 9:42 AM
liam
liam - avatar
23 ответов
+ 1
Straight copy my code and paste, tried it in your phone! <!DOCTYPE html> <html> <head> </head> <body> <audio controls> <source src="http://handydesign.webutu.com/song/Smile.mp3" type="audio/mpeg"> <source src="http://handydesign.webutu.com/song/Smile.ogg" type="audio/ogg"> </audio> </body> </html> I just tried this in my website with my computer too!
30th Oct 2016, 12:13 PM
Poh ChooHan
Poh ChooHan - avatar
0
Should be like this: <audio controls> <source src="storage/emulated/0/download/Converted_file_3de6a671.mp3" type="audio/m3"> <source src="storage/emulated/0/download/Converted_file_3de6a671_1.ogg" type="audio/ogg"> </audio> Make sure you have Converted_file_3de6a671.mp3 and Converted_file_3de6a671_1.ogg !
30th Oct 2016, 10:54 AM
Poh ChooHan
Poh ChooHan - avatar
0
Could there be any other reason? Didn't seem to work. Thanks
30th Oct 2016, 11:04 AM
liam
liam - avatar
0
can you let me know where your HTML file located? src attribute required the "storage" folder was located in same file of HTML Makesure your source file location is correct!
30th Oct 2016, 11:16 AM
Poh ChooHan
Poh ChooHan - avatar
0
Im just "Having a try" in the audio tutorial. Im not entirely sure what you mean by where is the html saved. Do u mean when I save it to my ph from the notepad? If so then both files and the html file are in the same folder. It seems im going wrong somewhere around this point because i don't understand it
30th Oct 2016, 11:31 AM
liam
liam - avatar
0
erm can you move the audio file (both Converted_file_3de6a671.mp3 and Converted_file_3de6a671_1.ogg) to the same folder of the HTML! and tried this following code: <audio controls> <source src="Converted_file_3de6a671.mp3" type="audio/m3"> <source src="Converted_file_3de6a671_1.ogg" type="audio/ogg"> </audio>
30th Oct 2016, 11:34 AM
Poh ChooHan
Poh ChooHan - avatar
0
Yes I have done that. Still nothing. Its probably something really simple
30th Oct 2016, 11:42 AM
liam
liam - avatar
0
wait, what you use to run html?
30th Oct 2016, 11:45 AM
Poh ChooHan
Poh ChooHan - avatar
0
I use this and quickedit
30th Oct 2016, 11:47 AM
liam
liam - avatar
0
Actually <audio> is for HTML5 not all the browser or something else can run it ._. so why dont you tried with computer and chrome
30th Oct 2016, 11:49 AM
Poh ChooHan
Poh ChooHan - avatar
0
So it won't work on Chrome for aandroid?
30th Oct 2016, 11:54 AM
liam
liam - avatar
0
not sure, can you send me the code , i try in my computer
30th Oct 2016, 11:56 AM
Poh ChooHan
Poh ChooHan - avatar
0
But how can you access the file off my ph? Or stupid question? haha. Do I need to upload the files?
30th Oct 2016, 11:57 AM
liam
liam - avatar
0
Well i mean copy paste here. but nvm i tried code myself and it work with this code! <!DOCTYPE html> <html> <head> </head> <body> <audio controls> <source src="song/smile.mp3" type="audio/mpeg"> <source src="song/smile.ogg" type="audio/ogg"> </audio> </body> </html> ^ It work for me with this code Tried out my code
30th Oct 2016, 12:03 PM
Poh ChooHan
Poh ChooHan - avatar
0
Yes that last 1 worked. So I can get an audio file of the internet but not off my ph storage?
30th Oct 2016, 12:10 PM
liam
liam - avatar
0
storage can i think , but i didnt tried it before, but i can feel it wrong in your file location
30th Oct 2016, 12:12 PM
Poh ChooHan
Poh ChooHan - avatar
0
Yes i think so to. So i created a folder and i saved the music files in there and then the html file.
30th Oct 2016, 12:14 PM
liam
liam - avatar
0
So this would be your code right?: <!DOCTYPE html> <html> <head> </head> <body> <audio controls> <source src="Converted_file_3de6a671.mp3" type="audio/mpeg"> <source src="Converted_file_3de6a671_1_.ogg" type="audio/ogg"> </audio> </body> </html>
30th Oct 2016, 12:36 PM
Poh ChooHan
Poh ChooHan - avatar
0
yes but there is no audio when it runs
30th Oct 2016, 12:40 PM
liam
liam - avatar
0
so did there even a player showed?
30th Oct 2016, 12:48 PM
Poh ChooHan
Poh ChooHan - avatar