MOSS 2007 Embed Windows Media Player

Embedding a Windows Media Player video on a SharePoint site is very straightforward with the following bit of code.

Simply add a Content Editor webpart, open up the source editor and copy the following code:

<object classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="640" height="360" id="mediaplayer1" title="Win Media Player">
  <param name="FileName" value="mms://VideoURL">
  <param name="AutoStart" value="True">
  <param name="ShowControls" value="True">
  <param name="ShowStatusBar" value="False">
  <param name="ShowDisplay" value="False">
  <param name="AutoRewind" value="True">
  <param name="DisplayBackColor" value="True">
  <param name="BufferingTime" value="6">
  <param name="windowlessVideo" value="True">
  <embed src="mms://VideoURL" width="640" height="360" autostart="True" type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/" filename="mms://VideoURL" showcontrols="True" showstatusbar="False" showdisplay="False" autorewind="True" displaybackcolor="True" bufferingtime="6"></embed>
</object>

Be sure to adjust the width and height in both locations to suit your video, and the source location in all three locations. If you are not using a Microsoft Media Server to stream the video, change it to the location of the video file.

Without the “windowlessVideo” parameter, it defaults to false and the video will always be on in front of any drop down menus etc, regardless of any z-index value. Setting the parameter to true forces windows media player to assume the z-index of the surrounding code.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>