views:

401

answers:

1

Im Implementing a video broadcasting website. For that I planned to use silverlight player to load videos. But I dont know how to integrate silverlight player into browser and load my own video in that player. Please Give me some code snippets or Some good references. Any help will be highly appreciated.

+1  A: 

First of all you need a Silverlight player just like you need a FLV player for Flash videos.

I recommend: http://www.codeplex.com/sl2videoplayer

All the installation instructions are explained in great detail at: http://sl2videoplayer.codeplex.com/Wiki/View.aspx?title=installation%20instructions

It is simply a matter of including a small HTML snippet in your document:

<div id="silverlightControlHost">
    <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="640" height="480">
     <param name="source" value="ClientBin/VideoPlayer.xap"/>
     <param name="background" value="white" />
     <param name="initParams" value="m=Bear.wmv" />
               <param name="minruntimeversion" value="2.0.31005.0" />
     <a href="http://go.microsoft.com/fwlink/?LinkId=124807" style="text-decoration: none;">
      <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
     </a>
    </object>
</div>

Assuming the silver light player is located in ClientBin/VideoPlayer.xap and the video you want to play is called 'Bear.wmv' located in the same directory as the .xap file (so that becomes ClientBin/Bear.wmv).

Sbm007
Can we play FLV Files on this Player @Sbm007
Rajasekar
No. For playing Flash Video consider using Flash player.http://forums.silverlight.net/forums/t/6008.aspx
FractalizeR
Thank You very much. Its Working. Give me your email ID or skype id or messenger id@Sbm007 and @FractalizeR plz
Rajasekar