Embedding Windows Media in a SharePoint website

This content is 11 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

A few weeks ago, I found myself standing in front of a green screen in a meeting room that had been “converted” into a temporary film studio, recording a video for internal communication on the technology standardisation initiatives I’ve been running for the last few months.  After all the edits and final approvals, the videos are now coming online and, as “Chief SharePoint Officer” for our team (I jest), it was up to me to hack our portal and get them online.

I figured that the guys in our internal studio must have done this before and, sure enough, the advice I received was to use JWPlayer for Flash content or to embed a media player for Windows Media files. We went with Windows Media (I can play the WMVs offline too), so I used a method described on Stack Overflow to embed an object inside a SharePoint Content Editor Web Part.

I’m sure that there are alternatives that provide better cross-browser support but as this is a SharePoint 2007 website, the only browser that will be used is some variant of Internet Exploder (and our corporate browser is Internet Explorer 8) so not too much to worry about.

I needed just one slight variation.  The videos I used were 480×270 pixels so, with the controls, I needed the player to be slightly taller. Playing around until I had no black bars around the video got me to the following code:

A full-quality download of this video is also available.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.