Using Unicast Announcements


Announcement files (.asx) files are necessary for playing .asf files or connecting to a live stream from a Web page that does not contain an embedded NetShow player. An .asx file provides the information that NetShow Player needs to connect to a server. An .asx file is a text file. You can create one using Notepad or another text editor provided that it terminates lines with linefeed and carriage-return characters. An .asx file is divided into reference and description sections that contain the following information.
Section Item Tag Information Specified
Reference Ref#= The source of the ASF stream. # is an integer.
Reference BaseURL= The base path for script commands contained in the ASF stream.
Description Program Title= The title of the stream. NetShow Player displays the title in the title bar.
Description Program Description= The description of the stream. Displayed in the NetShow Player properties page.
Description Program Author= The name of the stream's author. Displayed in the NetShow Player properties page.
Description Program Copyright= The copyright notice for the stream. Displayed in the NetShow Player properties page.

The Ref# tag specifies the source of the ASF stream and includes the following information:

For streams whose source is an ASF file, use the following syntax:

Ref1=protocol://servername/pubpointalias/filename.asf

For example:

Ref1=mms://greyhound/hounds/fastdog.asf

For streams whose source is live, for example from the Real-Time Encoder or a NetShow channel, use the following syntax:

Ref1=protocol://servername/pubpointalias

For example:

Ref1=mms://greyhound/hounds

You can specify multiple Ref# tags in an .asx file. When attempting to connect to the stream source, NetShow Player tries each source in turn starting with the source specified in the first Ref# tag until a connection is made. This feature ensures that all clients can reach the data. You can use Ref# tags that specify different protocols to reach the same source. For example, if Ref1 specifies the MMS protocol and Ref2 specifies the HTTP protocol, clients who cannot connect using the MMS protocol because they are across a firewall will automatically attempt to connect using HTTP. You can use Ref# tags that specify different NetShow servers containing the same content. For example, if Ref1 specifies an .asf file on a server called hound1 and Ref2 specifies a copy of the file on hound2, clients can reach the file using either server. If hound1 becomes too busy or fails, clients automatically connect to hound2.

The BaseURL tag specifies the base path for script commands contained in an ASF stream that reference URLs. When the NetShow player encounters a URL reference, it uses the path specified here to locate the file. For example, if the files you are including in the ASF stream are located on a Web server called myserver on a publishing point called myfiles, you could specify the following base URL: http://myserver/myfiles. For more information on including URLs in ASF streams, see the NetShow Tools Guide.

The description section of the .asx file is optional, as are all tags in the description section. If description tags are not used, NetShow Player displays the information supplied by the .asf file.

The following is an example of an .asx file:

[Reference]
Ref1=mms://greyhound/fastdogs.asf
Ref2=http://greyhound/fastdogs.asf
Ref3=mms://foxhound/fastdogs.asf
Ref4=http://foxhound/fastdogs.asf
BaseURL=http://greyhound/hounds

[Description]
Program Title=Hounds of the World
Program Description=A survey of the world's hounds
Program Author=Chris Brown
Program Copyright=Chris Brown

To create an .asx file

  1. Start Notepad (or another text editor).
  2. Type [reference]. Then on separate lines, add the Ref# tag and its information, and the BaseURL tag and its information. The BaseURL tag is optional.
  3. Type [description]. Then on separate lines, add the tags and information for title, description, author, and copyright.
  4. Save the file as a text file with an .asx extension.
  5. Place the .asx file in an accessible directory on an HTTP server.

For information on including an announcement in a Web page, see the NetShow Tools Guide.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.