internet.com

Developer Channel

SYMM

Windows Media Basics (7)

Putting Your ASF Clip on the Web

The Redirector
Much like RealNetworks and its RAM file, Windows Media Technologies uses a "redirector" file for the Advanced Streaming Format. This ASF Streaming Redirector file (ASX) is an XML format file that basically creates a shortcut to the actual ASF file on the server. So when your browser links to the ASX file, the ASX file in turn links to the ASF file. That may sound kind of complicated but it really does little more than create a hand off from your Web browser to your Windows Media Player.

Creating the ASX
Creating your ASX file is as easy as opening your text editor. An ASX is a lot like writing HTML except the file ends with a ".asx" extension. So in your blank text file, type the following markup to stream a file from your HTTP Web server:

<asx version = "3.0">
<title>Your Show Title</title>
<entry>
<ref href= "http://www.yourisp.com/yourfolder/yourasf.asf" />
</entry>
</asx>

Then save your file with the ".asx" extension and you are ready to go. It's that easy. In the above code, the "asx version" identifies the current version of the ASX format. Even though the Windows Media Player is version 4, ASX version 3 is the current requirement. The "title" field information will appear in the "Show" box of the player. "entry" creates the block that contains the clip itself. You can add additional attributes here for clip name, author, and copyright. Consult the Microsoft documentation for further information on adding these attributes. For our reference to the ASF clip itself, a "ref href=" command makes the link to the media. In this case, I'm linking to a file sitting on a standard HTTP Web server. If you are coming from a Microsoft Media Services Server, an "mms:" in the place of "http:" will do the trick.

Linking to the ASX
From here, putting the first clip online only gets easier. It is time to link our HTML to the ASX file. If you are using a relative link to an ASX file in the same folder as your HTML, use the following approach in your HTML:

<a href="myasxfile.asx">Click for Video</a>

That is all there is to it. Upload your ASF, ASX and HTML files to your Web server and you are ready to try it out. You can try my WMT/ASF sample as well.


<< Prev 123456 • 7 • 89 Next >>
 
The Latest WebDev Tips from DevX

Receive news via our XML/RSS feed
XMLRSS



Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers