Embed a Mac Compatible WMV

Based on my previous article about embedding a WMV file in a Web page, a number of people have asked how to do this in a way that works for Mac users. Microsoft shifted all WMV playback on Mac OS X to a plug-in for QuickTime called Flip4Mac, which limits a number of the supported features for WMV playback. After getting some advice from a member of the Flip4Mac product team, I've got some solid solutions that should work for any Mac user who installs the free Flip4Mac plug-in.

For best results, this is the only code you should use if you want Mac users to be able to watch your WMV movies.

Start with the basic embed statement like this:

<embed type="application/x-mplayer2" src="http://yourdomain.com/yourmovie.wmv" name="MediaPlayer" width=320 height=240></embed>

Optionally the following parameters are also supported:

In the Mac implementation of these two parameters, the controller bar is displayed when you choose the true condition:

showStatusBar="true"
showStatusBar="false"

showControls="true"
showControls="false"

Kioskmode is based on the QuickTime SDK and disables the Save As feature of QuickTime when set to true. Use this is you don't want people downloading your movie.

kioskmode="true"
kioskmode="false"

Scale tells the player to maintain the aspect ratio of the video if it gets enlarged to full screen, which is more cosmetic than anything.

scale="ASPECT"

Things like Javascript and the Object statement used in my other tutorial on embedding WMV files will not work with Flip4Mac and generally cause the playback of video to fail on Macs or to not work as you might expect.

While this is a far more limited set of functions than what people are used to for Windows, if you need a way to share WMV files with Mac users, this is the best way to do it for now.