Script Commands

The script commands supported by the Windows Media Format SDK are simple name and value string pairs. For example, a common script command is "URL", which is used by Windows Media Player and other playing applications to open Web pages. The other half of the script pair for "URL" command contains a valid uniform resource locator (URL), like "". No support is provided by the objects of this SDK for any specific commands; your application must include logic to handle whatever commands you use. You can use the commands supported by Windows Media Player to maintain compatibility with most players.

Script commands can be delivered in one of two ways: in a script stream or in the file header.

Script Streams

You can deliver script commands in their own stream in an ASF file. Each sample in a script stream contains the two strings of the name/value pair. The advantage of using a script stream is that the commands will be delivered at the correct presentation time.

Script Commands in the File Header

Script commands can be included in the file header for retrieval at the time of playback. The playing application is responsible for executing the script commands at the proper time. The advantage of using script commands in the file header is that all of the script commands are available before beginning to receive samples.

Related topics

ASF File Features
Using Script Commands