C# .NET - add music player - Asked By hiren dhameliya on 08-Apr-12 06:06 AM

HI

i want to implement play mp3 file in C#.net page  ... like give  path of file  and play in music player in web page ..
please help me as soon as possible ............



than ks
hiren 
kalpana aparnathi replied to hiren dhameliya on 08-Apr-12 06:09 AM
hi,

Refer these links for solution to add  music players :

http://stackoverflow.com/questions/2846304/playing-a-mp3-file-on-a-web-page

http://www.codeproject.com/Articles/4943/MP3-Player-Server-Control



Regards,
dipa ahuja replied to hiren dhameliya on 08-Apr-12 11:16 AM
<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
<param name="FileName" value="liar.wav" />
</object>
 
or try this control
 
<http://www.codeproject.com/KB/custom-controls/MP3PlayerControl.aspx>
 
 
Jitendra Faye replied to hiren dhameliya on 09-Apr-12 01:04 AM
There are three ways to play background sound in your web page-

1 way.  Using embed tag


The purpose of the <embed> tag is to embed multimedia elements in web page.

The following code fragment displays a MIDI file embedded in a web page


<embed src="beatles.mid" />

2 way. Using object tag


The purpose of the <object> tag is to embed multimedia elements in web page.

The following code fragment displays a WAVE file embedded in a web page.


<object
classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
<param name="FileName" value="liar.wav" />
</object>

3 way. Using hyper link


If a web page includes a hyperlink to a media file, most browsers will use a "helper application" to play the file.

The following code fragment displays a link to a MIDI file. If a user clicks on the link, the browser will launch a helper application, like Windows Media Player to play the MIDI file:


 <a href="beatles.mid">Play the Beatles</a>

Use these options and let me know.


Somesh Yadav replied to hiren dhameliya on 09-Apr-12 01:31 AM
check this,

http://forum.codecall.net/topic/50242-tutorial-playing-mp3-files-with-c/