Windows Media Player Control SDK Banner Art
*Contents *Index  *Topic Contents
*Previous Topic: ENTRYREF
*Next Topic: LOGO

EVENT Element

Defines a behavior or action taken by the Microsoft® Windows Media™ Player when it receives a script command labeled as an event.

Syntax

<EVENT
   NAME="text string"
   WHENDONE= "RESUME" | "NEXT" | "BREAK"
>
</EVENT

Attributes

NAME (required)
The value of the event as created in Windows Media Author.
WHENDONE (required)
Value that defines what the Windows Media Player does after playing the referenced content. The following values are possible.
RESUME The Windows Media Player resumes playing the current entry.
NEXT The Windows Media Player plays the next entry.
BREAK Ends a REPEAT loop as if the repeat count had been completed.
See Remarks for more information.

Parent/Child Information

Parent elements ASX
Child elements ENTRY, ENTRYREF

Remarks

This element defines a behavior or action taken by the Microsoft Windows Media Player control when it receives a script command labeled as an event. An event is a particular type of script command embedded in a stream sent to the Windows Media Player that consists of a double string. The first string is the word event, and the second string is the event name. The event name in the second string must match the event name defined in the Advanced Stream Redirector (ASX) file. (The match is not case-sensitive.) Events can be sent to a Windows Media Player control receiving a real-time stream, or can be saved in an .asf file that gets delivered as an on-demand unicast stream. When the Windows Media Player control receives the script command, it processes the event as defined by the EVENT element.

This element defines a scope of ENTRY or ENTRYREF elements, script commands, or ASP pages that are processed whenever the Windows Media Player control receives the script command with the named event. With this element, you can specify a behavior for stream switching in near real-time, as opposed to pre-authored stream changes using references to other pieces of content or ASX files.

This element can appear anywhere within the ASX element. If multiple EVENT elements within an ASX element have identical values for their NAME attributes, the Windows Media Player control uses the first occurrence within the ASX element, and ignores all others. When EVENT elements have distinct NAME attributes, their order within the ASX element does not matter.

The Windows Media Player control discards events it receives while processing another event. Nesting of events is not supported. When the Windows Media Player control is in preview mode, event content is not constrained by the PREVIEWDURATION element: The full length of event content can play even if the preview duration for the active ENTRY element expires prior to the end of the event.

The value of the WHENDONE attribute defines what occurs after the referenced event content finishes playing, as follows:

Example

<ASX VERSION="3.0">
<ENTRY CLIENTSKIP="NO">
   <REF HREF="http://example.microsoft.com/clip1.asf" />
</ENTRY>

<EVENT NAME="Adlink" WHENDONE="RESUME">
   <ENTRYREF HREF="http://example.microsoft.com/adlink.htm" CLIENTSKIP="NO" />
</EVENT>
</ASX>

Top of Page Top of Page
© 1999 Microsoft and/or its suppliers. All rights reserved. Terms of Use.