Embedding Windows Media Player WMV

When you create a WMV movie using Windows Movie Maker, Windows Media Encoder or any of the dozens of video editing apps supporting WMV, you have a number of options for sharing your video. The widest audience is obviously online. Windows Movie Maker includes a rather deceptive Save to the Web option, which really means, “save to Web if you have an account with Neptune Mediashare.” You don’t need to use Neptune or the Save to the Web option to in Windows Movie Maker to share your videos online.
There are two primary ways to share a WMV file online: direct download or streaming playback. A third option would be to offer the video as an RSS subscription, which is loosely related to direct downloads and gets covered in another article. When you offer a direct download, users click on a link to the video file and either view the video in their desktop Windows Media Player or save it to their hard drive. To stream a Windows Media video file, you need to embed the Windows Media Player in the page where you post the video. This requires some specific HTML code included in the page or blog post where the video is linked.


There are some potential headaches to this method, like support for browsers like Firefox and Safari. Mac users don’t have Windows Media Player installed by default and Safari issues a nasty warning message with no link to the resolution on Macs without Windows Media Player. Internet Explorer handles embedded Windows Media files nicely, which is to be expected since it’s also a Microsoft product. For broad compatibility with all browsers, it’s best to stick with the version 6.4 embedded player (which has nothing to do with the version of desktop player the user might have installed).
There are certain things every embedded Windows Media Player needs to function properly, along with a long list of optional parameters. Each embedded player instance on your Web page needs the object definition to clarify which version of the Windows Media Player will be called. This is identified by both the CLSID reference and the CODEBASE definition. For the 6.4 version of the embedded player, an will look like this (the width and height may be different depending on your actual movie size):
http://media.pmcmovies.com/SixtiesLove.wmv
Be sure to close the whole thing with that ending </obeject> tag.
For more advanced streaming needs, consider using a Windows Streaming Server to manage your video files, which allows you to offer files capable of detecting the users connection speed for an optimized experience and include things like advertising when appropriate.