Inserting script commands
You can insert into a stream while you are encoding. The encoder supports the following types of script commands:
- Captions. Free-form text strings that are displayed in a player along with your encoded content. For the captions to be visible, users must have enabled captions in their player.
- Closed captioning. If your capture card supports capturing closed captioning data, you can encode the closed captioning.
- URLs. When inserted into a stream, the user's default browser opens and the requested URL loads into the browser. If you have embedded the player within a browser, the requested URL replaces the player, and users cannot view the rest of the stream. You can get around this either by displaying the requested URL in a separate frame in the same browser instance or by opening an additional instance of the browser.
- Custom script commands. In addition to supporting captions and URLs, a player automatically processes FILENAME, EVENT, and OPENEVENT script commands. You can use the FILENAME command to open a specific digital media file at the time you specify. You can use the EVENT command to create custom script commands. For example, you can insert an advertisement into the stream. Note that the code for the specified event must be defined in the for the stream for the player to perform the specified event. The OPENEVENT command precedes the actual EVENT command. The OPENEVENT command allows the player to prebuffer the content so that when the specified event occurs, the switch between streams appears to be seamless.
For detailed information about the script commands supported by Windows Media Player 9 Series, see the Windows Media Player 9 Series Software Development Kit (SDK). For information about the script commands supported by Windows Media Services 9 Series, see the Windows Media Services 9 Series SDK.
Because script commands are saved in the stream, they are not available for editing.
Inserting script commands into an encoding session requires that you select scripts as a source type when setting up your session. You cannot include scripts when you set up a session using the New Session Wizard, but you can add scripts to the session through the Sources tab of the Properties panel.
Related topics
© 2000-2002 Microsoft Corporation. All rights reserved.