Embedding Windows Media Player WMA

Posted by

It’s definitely smart to make your audio offerings available for subscription via RSS and direct download via a Website link. Enabling audio playback from the familiar audio playback experience of the Windows Media Player play controls helps get some listeners past the hurdle of figuring out how to tune in. If your audio file is a WMA or MP3 file, there are a few simple steps to linking your audio to Windows Media Player controls imbedded in the browser.

When you offer a direct download, users click on a link to the audio file and either view the video in their desktop Windows Media Player or save it to their hard drive. To stream your audio file with visible Windows Media Player controls, you need to embed the player in the page where you post your audio file. This requires some specific HTML code included in the page or blog post where the audio is linked.


There are some potential headaches to this method, including 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 this looks like the example below:

http://yourdomain.com/youraudio.mp3

Be sure to close the whole thing with that ending < /object > tag.

For more advanced streaming needs, consider using a Windows Streaming Server to manage your audio 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.