|
Introduction to Windows Media MetafilesDavid Wrede Applies to: Microsoft® Windows Media® Player 9 Series SummaryWindows Media metafiles provide metadata and playback instructions for digital media files. There are two types of metafiles: client-side and server-side. Client-side metafiles provide instructions for Windows Media® Player, while server-side metafiles provide instructions for a Windows Media server. This article describes how to use client-side metafiles with Windows Media Player 9 Series. IntroductionWindows Media metafiles, commonly known as playlists, are text files that link Web pages to Windows Media–based content on a Windows Media server or Web server. The purpose of a metafile is to redirect streaming media content away from browsers, which in most cases are not capable of rendering the content, to Microsoft® Windows Media Player. Windows Media metafiles have a .wvx, .wax, or .asx extension. When a browser downloads a file with one of these extensions from a Web site, the browser opens Windows Media Player. Windows Media Player then locates and plays the content specified in the file. A Windows Media metafile contains a type of Extensible Markup Language (XML) scripting that can be interpreted only by Windows Media Player. A metafile script can be as simple or complex as you need it to be. The most basic metafile contains simply the Uniform Resource Locator (URL) of some digital media content on a server. A complex metafile can contain references to multiple files or streams arranged in a playlist, instructions on how to play the files or streams, text and graphic elements, and hyperlinks associated with elements on the Windows Media Player user interface. At the end of this article you will find the code for an example metafile that demonstrates the features described in the rest of the article. This article covers the following topics:
Creating a Simple MetafileTo get started creating a simple metafile, open your favorite text editor, such as Microsoft Notepad, and type the following items:
In the third line, replace Path with the path or URL of your Windows Media–based content using a syntax from the following table.
After you type this into Notepad, save the file as Filename.wvx if it is used to redirect video files that have a .wmv extension. Save the file with a .wax extension if it redirects audio-only files that have a .wma extension. Typically, Filename is the name of the Windows Media file or stream, but it can be any name you choose. Check to be sure that the metafile is working by double-clicking its file name in Windows® Explorer. Windows Media Player should open and start streaming the content. After you've confirmed that the metafile works, save it to your Web server along with your Web pages, and link to it by means of an <a href> tag, or embed it in a Web page using the <OBJECT> tag. |