Description:
Today I will
explain how to play mp3 song in HTML. There is a simple code to play mp3 songs
in HTML. It is very useful when any one wants to play mp3 file to their
website. First of all you have to store or upload an mp3 file to your server.
In my previous post I have explained how to upload a file to web server in
asp.net with C#. Then just copy this code and change the directory of the file.
Run your project and enjoy.
Code:
<HEAD>
<TITLE>Mp3 player in html</TITLE>
</HEAD>
<BODY>
<center>
<object>
<param name="audio"
value="G:\song1.mp3"></param>
<param name="allowFullScreen" value="true"></param>
<embed src="G:\song1.mp3"
type="application/x-shockwave-flash/mp3">
</embed>
</object>
</BODY>
</HTML>
Out put
No comments:
Post a Comment