![]() |
![]() ![]()
Netshow Services There is a wealth of resources, including tools, SDKs, and more available from Microsoft at http://www.microsoft.com/ntserver/nts/downloads/recommended/mediaserv/default.asp
Understanding ASX Metafiles An ASF Stream Redirector (ASX) file provides information that Microsoft® Windows® Media Player uses, such as the Uniform Resource Locator (URL), to receive unicast or multicast streams from an intranet or the Internet, as well as any other type of supported media content. You also can use ASX files to specify the path to a stored media file on a network drive, but this can be accomplished through other means as well, and is not covered here. Both NetShow™ and RealNetworks® RealAudio® Metafiles can be opened by Windows Media Player. These files are loaded quickly by the player, and contain information for the following purposes:
Creating a Basic ASX File An ASF Stream Redirector (ASX) file must have a minimal set of information in order to function successfully. A basic ASX file can be used to connect a user to a piece of content from a link on a Web page, or by attaching it to an e-mail message. In order for the user to connect, the ASX file must contain a Uniform Resource Locator (URL) for a piece of content. The structure of the ASX file also must follow Extensible Markup Language (XML) standards. Simple ASX files can be created using any text editor, such as Microsoft® Notepad. ASX files must have a file name extension of .asx. Important An ASX file must not include any formatting codes from a word processor, such as Microsoft® Word. To make sure no formatting codes are included in the ASX file, save the file as a plain text or ASCII file. Example of a Basic ASX File Using an Entry Element
Example of a Basic ASX file Using an EntryRef Element
Embedding Windows Media Player ActiveX Control You can embed the Microsoft® Windows® Media Player ActiveX® control in a Web page, or other application container that supports ActiveX, so that the player is not started as a separate application. Instead, the content stream you specify in the control properties is played in the browser frame after the page is rendered. This allows you more control over how the user receives the streamed content, and also is an easy way of providing Windows Media Player to users who do not have it installed on their computers. When a user accesses a page in which the control is embedded, a certificate identifying the publisher of the control appears. The certificate prompts the user either to agree to have the control downloaded, or to continue rendering the page without downloading the control. Content is not delivered if the control is not installed. You can set the properties of the control through the Hypertext Markup Language (HTML) Object tag, to define which Advanced Streaming Format (.asf) file, publishing point, or station to open, as well as how to play it. You also can use Microsoft® Visual Basic® scripting to define the properties of the control, such as which buttons are displayed. The following HTML Object tag shows the control’s Class ID of Windows Media Player and some of its properties.
To learn more about the Windows Media Player control and its properties, see the NetShow™ Client Software Developer’s Kit (SDK). How you set the properties determines how Windows Media Player works. The FileName parameter identifies the .asf file that is played. You set the value for this parameter to be a URL as if you were going to play the .asf file from the Open option on the Windows Media Player File menu. |