Click Here to Install Silverlight*
United StatesChange|All Microsoft Sites
Windows Media Player 9 Series
|Windows Media Worldwide

Using Windows Media Download Packages

Brad Joseph
Microsoft Corporation
December 2000

Contents

Introduction

Microsoft® Windows Media™ Download packages combine borders, playlist information, and multimedia content in a single downloadable file (which has a .wmd file name extension). For example, users can download a customized WMD package from a Web site. The WMD package could include an entire album of music videos that also display advertising in the form of graphical branding and hyperlinks to an online music retailer site. After you have created the WMD package and uploaded it to a Web site, all the user has to do is click a link to it. The package is then
Abstract
Describes the task of creating a Microsoft Windows Media Download (WMD) package for distribution from a Web server. WMD packages wrap multiple files such as audio, video, playlists, and borders into a single self-extracting bundle that customers can download easily with a single-click.

(7 printed pages)
downloaded to the user's computer, the files inside the package are extracted automatically, playlists are added to the playlists drop-down box, the content is added to the Media Library, a border appears in the Now Playing pane of the full mode Windows Media Player, and the initial item on the playlist begins playing.

WMD packages provide the following benefits:

  • Single-click downloads and extracts, and catalogues multiple files to the user's computer
  • Content plays immediately after being downloaded
  • Customized borders for displaying advertising and branding information
  • Cataloging of packaged playlists in the Windows Media Player Media Library
  • Web site redirection from within Windows Media Player to a related site
  • A variety of interactive border controls
  • Multiple audio and video file types supported for packaging
  • Multiple files downloaded in one package

All of these benefits can be used in concert. For example, a single WMD package could give users the opportunity to view the lyrics to songs as they play, display a video that accompanies the songs, view advertising information about the record distributor, view album cover art, visit a fan Web site, and catalog the content in the Media Library.

Back to the top of this page Back to the top


How Windows Media Download Packages Work

A Windows Media Download package is launched from a Web site from a Web browser, for example, Microsoft Internet Explorer. The operating system on the client computer associates the .wmd file extension with the Windows Media Player, which instructs the browser to launch the Player when you click on a link to a WMD package. The WMD file is then downloaded and unpackaged on the user's machine (by default, located in the folder C:\Documents and Settings\All Users\Documents\My Music\Virtual Albums\Album Name).

Once the files have been removed from the WMD package, Windows Media Player looks for a Windows Media metafile (with a .asx file name extension) among the packaged files. If it finds one, the Player adds playlist metadata contained in the metafile to the playlist drop-down box. Files that contain multimedia content are then added to the Windows Media Player Media Library.

Windows Media Player also looks for a SKIN element in the metafile. If the SKIN element contains a reference to a border file (with a .wmz file name extension), the Player will load the border into the Now Playing pane. The Player then starts to play the content provided in the package.

The following diagram shows how content is packaged in a WMD file, posted to a Web site, downloaded, and played on a client computer using Windows Media Player.

Figure 1. Windows Media Player packaging image
Figure 1. Windows Media Player packaging

The following table describes the three elements that make up a WMD package.

Package element Function File name extensions
Border A fixed, customized interface created by the content owner for displaying, linking, and playing all media packaged in the WMD package. The techniques used to create borders are similar to those used to create skins. .wmz
Metafile A Windows Media metafile that contains ENTRY elements, playlist information, and a SKIN element identity for content files. .asx
Multimedia Content A file containing any audio or video format that is supported by Windows Media Player. .wma, .wmv, .asf, .wav, .avi, .mpg, .mp3

Back to the top of this page Back to the top


Using Borders

Borders enable you to create a custom graphical interface for your packaged content. The border can include elements such as images, interactive controls, and links to Web sites. You can use borders in cases where you want to add additional value to your packaged content, such as for branding or advertising. After users download and open your WMD package, Windows Media Player will automatically display your custom border when they play the packaged content.

Unlike a skin, which enables users to completely customize the interface of Windows Media Player in compact mode, a border is displayed only in the Now Playing pane of the full mode Windows Media Player. However, the same tools and technologies that you would use to create skins are also used to create borders.

Figure 2. Advertising in a Windows Media Player border image
Figure 2. Advertising in a Windows Media Player border

Back to the top of this pageBack to the top


Creating a Border

It is important to understand the basics techniques for creating a skin before attempting to create a border. Border programming is accomplished in two languages: XML and Microsoft Jscript®. XML is used to define interface elements such as buttons, sliders, and text boxes. You don't need to worry about the details of XML since you don't have to write new XML code elements; you can use ones provided by Windows Media Player.

Although Jscript is not required for creating borders, it can be used to provide additional functionality, such as viewing the lyrics to a song as the song plays, or alternating billboards to advertise a product.

A compressed border file (with a .wmz file name extension) includes a border definition file (with a .wms file name extension), and all of the image files used within the border.

To include a border in a WMD package, all you do is create a border (.wmz file), and reference that border in a Windows Media metafile (with an .asx file name extension). The border file is loaded into Windows Media Player after the Player reads the metafile and interprets the SKIN element that references the border. The SKIN element is used only for borders, and the HREF attribute of the SKIN element can reference only one skin for each package. Metafiles are discussed later in this article.

For complete details on creating borders and skins, see the Windows Media Player 7 Software Development Kit (SDK).

Back to the top of this page Back to the top


Using Windows Media Metadata

Playlists are Windows Media metafiles (with a .asx file name extension) that provide the information Windows Media Player uses to execute the packaged content, such as packaged video and audio files. By combining multiple content files into a single WMD package, you can control and customize your Windows Media Download package using the playlist.

Note: In general, metafile playlists are used to reference the multimedia content in the package, and not a stream from a server on an intranet or the Internet. However, URL references within the .asx file are supported.

By using XML, the metafile provides the information Windows Media Player uses to play and display content. Playlists are made up of various XML code elements with their associated tags and attributes. Each element in a Windows Media metafile defines a particular setting or action in Windows Media Player.

The SKIN element is used to display a border. The SKIN element in a border displays content, such as images, text, and Web site links. The SKIN element is used only for borders, and not for standard skins.

The user's computer associates a Windows Media metafile that has an .asx file name extension with Windows Media Player. Windows Media Player opens and interprets the XML code in the metafile, which contains the path for locating the packaged audio or video files. The metafile script then controls the audio, video, and graphical experience. The metafile also contains information that Windows Media Player processes and displays in the playlist drop-down box. Immediately after the list is displayed, the first item in the list is played.

A typical SKIN element would look like this:

<SKIN HREF="border.wmz">
A metafile is a shortcut to the files that contain your packaged content. The following code is an example of a metafile that identifies the border to display, two songs to be played, and the playlist information for each song.

<ASX Version="3.0">
<AUTHOR>Name of content creator goes here</AUTHOR>
<TITLE>Album Title goes here</TITLE>
<PARAM name="Album" value="Album Title "/>
<PARAM name="Artist" value="Artist Name"/>
<PARAM name="Genre" value="Genre"/>
<SKIN HREF="myborder.wmz"/>
    <ENTRY>
        <REF HREF="song1.wma"/>
        <AUTHOR>Creator's name</AUTHOR>
        <COPYRIGHT>Copyright information</COPYRIGHT>
        <TITLE>Song #1 title</TITLE>
    </ENTRY>
    <ENTRY>
        <REF HREF="song2.wma"/>
        <AUTHOR>Creator's name</AUTHOR>
        <COPYRIGHT>Copyright information</COPYRIGHT>
        <TITLE>Song #2 name</TITLE>
    </ENTRY>
</ASX>
For complete details on creating Windows Media metafiles, download and install the Windows Media Player 7 SDK. For information about XML, see the MSDN Online XML Developer Center.

Back to the top of this page Back to the top


Creating a Windows Media Download Package

Follow these steps to create a WMD package.
  1. Create a border. Create a border using the same techniques you would use to build a skin for Windows Media Player. Design the border so that resizing will not ruin the composition of the border elements (For instance, use a solid color or visualization as a background). These will scale as the player is resized. The border must contain the skin definition file, one or more images, and any necessary Jscript files.
  2. Compress the border contents. Using a compression program commonly used for distributing and storing files, compress the border files: images, Jscript files, and the skin definition file (with a .wms file name extension). Rename the file so that it has a .wmz file name extension. Windows Media Player associates and reads the .wmz file extension automatically.
  3. Write a Windows Media metafile. The Player will not load the border unless you create a Windows Media metafile (with an .asx file name extension) that uses the SKIN element. The metafile can also be used to create a playlist that describes the content included in the package.
  4. Assemble your content. Put all the files that you want to use into a folder. This includes audio files, video files, metafiles, and border definition files.
  5. Create the package. Using a compression program commonly used for distributing and storing files, compress the border file, content files, and the metafile into a new file using the .wmd file name extension. Windows Media Player associates and reads the .wmd file extension automatically.
  6. Post the package to a Web site. The package is ready to be posted to a Web site and downloaded by users.

Back to the top of this page Back to the top


For More Information

To learn more about Windows Media Download packages, see the Windows Media Player 7 SDK Help. The Windows Media Player 7 SDK and a sample Windows Media Download package are available for download from the Windows Media Technologies Web site.

Related articles:


Back to the top of this page Back to the top



© 2015 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy & Cookies
Microsoft