Click here to Skip to main content
15,882,152 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
i am using html5 audio player.but it doesnt working.why?my code as below

<<pre lang="xml">head runat="server">
<title></title>
<script type="text/javascript">
XML
function check() {




                document.getElementById("test").innerHTML = '<span class="prego"><audio src="siju.wav" preload="auto" controls></audio></span>'

        }


</script>
</head>
<body onload="check()">
<form id="form1" runat="server">

<div id="test" style="position :absolute ;top:0px;left :0px;">


</div>
</form>



</body>
</html>


Thanks
Posted
Updated 10-Jul-13 23:10pm
v4

1 solution

html 5 audio

dont use relative path
give filename directly and keep file in the same folder where the html file is
 
Share this answer
 
Comments
hasbina 11-Jul-13 5:06am    
hmm.not getting when i put it in same folder.
vinayakJJ 11-Jul-13 5:17am    
which browser r u using? i am using chrome and i am able to play .wav and .mp3 file keeping it in the same folder as html file with your code
hasbina 11-Jul-13 5:36am    
sir, i am using chrome.but not able to play
vinayakJJ 11-Jul-13 5:43am    
try with .mp3 file
i used same code of you
and i am able to play just copy paste this code in new .htm file and save it on desktop and rename your .wav file to a.wav and copy paste it to desktop and try if it works
hasbina 11-Jul-13 5:54am    
sir i tried.but again not getting.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900