|
How to Stream a Windows Media File
Summary
This guide describes how to incorporate a Windows Media™ file within your Web site so that it streams from the streaming server and plays back in a pop-up or embedded copy of Windows Media Player.
Instructions
First, create your Windows Media file and upload it to your streaming media directory:
-
Prepare and encode your source content into a Windows Media file. The instructions that follow refer to your Windows Media file as yourfile.asf.
-
If you have not done so already, activate your streaming media directory now.
-
Upload yourfile.asf to your streaming media directory (public_media) on Dante or Homer. Be sure to upload it as "binary" or "raw data" since it is not a text file.
-
(Optional) Now that yourfile.asf is in your streaming media directory, test it using Windows Media Player. If your Windows Media file does not stream correctly when opened by Windows Media Player, it is unlikely to stream later, when you've done additional work to add it to your Web site.
-
If you don't want to embed the media on a web page, you can just link to the media file itself.
<A HREF="yourfile.asf">play my file</A>
If you want to embed the media in a web page, create a Windows Media metafile and upload it to your Web site:
-
To create a Windows Media metafile that points to yourfile.asf in your streaming media directory, open a new file in a text editor.
-
Type into this file the following text:
<ASX version="3.0">
<Entry>
<ref HREF="mms://media.type.washington.edu/userid/yourfile.asf"/>
</Entry>
</ASX>Substitute type and userid appropriately, refering to the Windows Media URL Reference for help.
Refer to Introduction to Windows Media Metafiles to learn more about the syntax and capabilities of Windows Media metafiles.
-
Save this text file using a .asx filename extension, for example yourfile.asx.
-
Upload yourfile.asx to your Web site. Be sure to upload it as "text" or "ASCII".
-
Embed yourfile.asx on the page. Adding Windows Media to Web Pages describes the necessary HTML elements.
-
(Optional) Add a "Get Windows Media Player" button to your Web page for visitors who may need to download Windows Media Player. Refer to Windows Media Player Logo and Guidelines for instructions.
-
Save this Web page and, if need be, transfer it to your Web site. Your Web page and Windows Media metafile should reside in the same directory, otherwise you must adjust the reference to the metafile.
You're done. Open your Web page and try it out.
