+ 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
23 Réponses
+ 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!
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 !
0
Could there be any other reason?
Didn't seem to work.
Thanks
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!
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
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>
0
Yes I have done that. Still nothing. Its probably something really simple
0
wait, what you use to run html?
0
I use this and quickedit
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
0
So it won't work on Chrome for aandroid?
0
not sure, can you send me the code , i try in my computer
0
But how can you access the file off my ph?
Or stupid question? haha. Do I need to upload the files?
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
0
Yes that last 1 worked. So I can get an audio file of the internet but not off my ph storage?
0
storage can i think , but i didnt tried it before, but i can feel it wrong in your file location
0
Yes i think so to. So i created a folder and i saved the music files in there and then the html file.
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>
0
yes but there is no audio when it runs
0
so did there even a player showed?