0
Posted on 11:07 PM by prajeesh and filed under , , ,
A.Using Real Player Activex Object

just place the following code to your asp.net page

<OBJECT ID=RVOCX CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"

WIDTH="180" HEIGHT="159">

<PARAM name="src" value="Media00.ram">

<PARAM name="autostart" value="false">

<PARAM name="controls" value="default">

<PARAM name="console" value="video">

</OBJECT>

or

<EMBED TYPE="audio/x-pn-realaudio-plugin" SRC="Media00.ram" WIDTH="180" HEIGHT="159" AUTOSTART="false" CONTROLS="all" CONSOLE="video"> </EMBED>

Note:You can embed a RealOne Player presentation in a Web page using <EMBED> tags, <OBJECT> tags, or both. When you use <EMBED>, your presentation will work in browsers that support the Netscape plug-in architecture,Even when you use the <EMBED> tag, RealOne Player communicates with Internet Explorer browsers using ActiveX technology. This makes the Netscape <EMBED> tag compatible with both major browsers, including Internet Explorer 6 and later.

Change “Media00.ram” to your media path.(Example : mysong.mp3)

Tips:

1.If you are giving a media path directly,the real player will only start playing after the entire media is downloaded. If you want to give a streaming like effect in your application(start playing with downloading),you open a notepad and insert media path in it such as http://yourpage/test.mp3 save this file with .ram extension and link this file from object/embed tags.

2.If you want to open real player in user computer from your web page ,just place a link

<a href="Media00.ram">Click here to play </a>

3.You can also controll embedded players playback options using javascript

<EMBED TYPE="audio/x-pn-realaudio-plugin" NAME=demo SRC="Media00.ram" WIDTH=100 HEIGHT=30

CONSOLE=one CONTROLS=Default BACKGROUNDCOLOR=white MAINTAINASPECT=true>

<INPUT TYPE="button"VALUE="Play"onClick="document.demo.DoPlay()">

<INPUT TYPE="button"VALUE="Pause"onClick="document.demo.DoPause()">

<INPUT TYPE="button"VALUE="Stop"onClick="document.demo.DoStop()">

4.for more information about real player embedding please refer the following guide

Real Networks Production Guide

B.Using Windows Media Player

<OBJECT ID='MediaPlayer1' name='MediaPlayer' CLASSID='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' height=100 width=400>

<PARAM name='URL' value='yourmusic.mp3'>

<PARAM name='AutoStart' value='True'>

<PARAM name='balance' value='0'>

<PARAM name='enabled' value='True'>

<PARAM name='fullScreen' value='False'>

<PARAM name='playCount' value='False'>

<PARAM name='volume' value='100'>

<PARAM name='rate' value='22'>

<PARAM name='StretchToFit' value='True'>

<PARAM name='enabledContextMenu' value='True'>

<PARAM name='uiMode' value='full'>

</OBJECT>

Tips:

1.If you are giving a media path directly,the media player will only start playing after the entire media is downloaded. If you want to give a streaming like effect in your application(start playing with downloading),you open a notepad and insert media path in it such as http://www.yourweb/music/test.mp3 save this file with .m3u extension and link this file from object/embed tags.




Shout it kick it on DotNetKicks.com
0
Responses to ... Adding Video/Music in ASP.net pages