Being able to insert video into a SharePoint 2007 page is not as straightforward as you might think. Generally it’s accomplished by copying/pasting embed code in the content editor web part, or by finding a 3rd party solution that fits your needs.
Now you can plug a video right into a page OOTB. Silverlight controls are used to render the video in the browser. Another cool bonus here is that you can preview the video before inserting it.
When browsing your media with the asset picker, you can play the entire video to make sure you’re inserting the right one.
But when we need to play the video on any custom control or web part then the embed tag and other methods to run the video does not supported by the SharePoint 2010. Then how can show video on the SharePoint 2010? The simpler way is that when you add OOTB web part on the SharePoint, you see the source of the page and you can get the tag which is used by the Silverlight video web part. The tag is :
<object type="application/x-silverlight-2" data="data:application/x-silverlight-2," width="100%" height="100%">
<param name="source" value="/_layouts/clientbin/mediaplayer.xap"/>
<param name="enableHtmlAccess" value="true"/>
<param name="windowless" value="true" />
<param name="background" value="#80808080" />
<param name="initParams" value="mediaSource=/SiteAssets/Search in SharePoint Server 2010.wmv,previewImageSource=/Style Library/Media Player/VideoPreview.png" />
<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><a href='/SiteAssets/Search%20in%20SharePoint%20Server%202010.wmv' class='media-link'></a>
There is two place you have to give the location of the video initParams and href. Second is the preview image of the video location in previewImageSource.
You can upload the video and image in the library and can show video on the web part or web server control or in the simple page layout. So, now its very easy to run video in our custom web part or control.
Enjoy SharePoint 2010