These six elements define what the Player plays and in what order. Names and values are shown in Microsoft’s capitals, but case does not matter.
ASX
The root element. It must be the first thing in the file, and there is one per
file. Its children: ABSTRACT, AUTHOR, BANNER,
BASE, COPYRIGHT, ENTRY,
ENTRYREF, EVENT, MOREINFO,
PREVIEWDURATION, PARAM, REPEAT and
TITLE. Information placed directly in it describes the whole show.
| Attribute | Required | Value | Meaning |
|---|---|---|---|
VERSION | yes | 3 or 3.0 | Version of the metafile syntax. Must follow the element name directly. |
PREVIEWMODE | no | YES | The Player enters preview mode before the first clip, playing part of each clip for the time set by PREVIEWDURATION. |
NO | Default. No preview mode. | ||
BANNERBAR | no | AUTO | Default. Space for a banner is reserved only when the content has one, so the window can resize between clips. |
FIXED | Space is reserved for every clip; clips without a banner show black there. |
The banner space is 32 pixels high by 194 pixels wide, centred horizontally, below any video and 6 pixels above the lower edge of the video area.
ENTRY
One logical clip, and the fundamental unit of the format. Parents: ASX,
EVENT, REPEAT. Children: ABSTRACT,
AUTHOR, BANNER, BASE, COPYRIGHT,
DURATION, ENDMARKER, MOREINFO,
PARAM, PREVIEWDURATION, REF,
STARTMARKER, STARTTIME, TITLE. Entries play in
file order. An entry without a REF causes no error but plays nothing.
| Attribute | Value | Meaning |
|---|---|---|
CLIENTSKIP | YES | Default. The user may skip forward past the clip. |
NO | The user may not skip forward past the clip. Has no effect if the REF points at another metafile; use ENTRYREF for nesting. | |
SKIPIFREF | YES | The Player ignores this entry when the file is pulled in by another metafile’s ENTRYREF. |
NO | Default. The entry is played either way. |
REF
An address for the entry’s media. Parent: ENTRY. Children:
DURATION, ENDMARKER, PREVIEWDURATION,
STARTMARKER, STARTTIME.
| Attribute | Required | Value | Meaning |
|---|---|---|---|
HREF | yes | URL | The media to play, in any format and protocol the Player supports. |
An entry may hold several REF elements, which gives URL rollover. If
the Player cannot open the first address it tries the next. Once it has connected to
one, it ignores the rest of the entry’s REF elements, however that
connection later ends. It then moves on to the next ENTRY.
A PARAM named ShowWhileBuffering with the value
true keeps an image on screen while the next entry buffers. Microsoft
warns that Flash media with sound in its first frame may play wrongly.
ENTRYREF
Includes the entries of another metafile at this position, as if written here.
Parents: ASX, EVENT, REPEAT. It has no
children.
| Attribute | Required | Value | Meaning |
|---|---|---|---|
HREF | yes | URL | The metafile to include, with an .asx, .wax, .wvx or .wmx extension. It becomes the base for relative URLs in that file. |
CLIENTBIND | no | No longer supported. |
The Player ignores the included file’s own ASX element and its
attributes, and skips entries marked SKIPIFREF="YES". Windows Media
Player 7.0, 7.1 and the Windows XP version ignore any ENTRYREF in an
included file, so nesting stops at one level. Windows Media Player 9 Series and later
support nesting to five levels.
An ENTRYREF can point at an ASP page that generates a metafile. The
page must set Response.ContentType to a valid metafile type and set
Response.expires, because of the Player’s latency.
REPEAT
Loops the clips it encloses. Parent: ASX. Children: ENTRY,
ENTRYREF.
| Attribute | Value | Meaning |
|---|---|---|
COUNT | a positive integer | How many times to play the clips. The clips play COUNT times in all: Microsoft’s example comments “These clips play twice” for COUNT="2". |
0 | The REPEAT element is ignored and the content plays once. | |
| absent | The clips repeat for ever. |
Only the first REPEAT in a metafile is valid. Any later ones are
ignored.
EVENT
Defines clips to play when a script command of type event arrives in
the stream. Such a command is a pair of strings, the word event and an
event name, sent in a live stream or stored in an .asf,
.wma or .wmv file. Parent: ASX. Children:
ENTRY, ENTRYREF. The element can appear anywhere in the
ASX element.
| Attribute | Required | Value | Meaning |
|---|---|---|---|
NAME | yes | text | The event’s name, matched without regard to case. |
WHENDONE | yes | RESUME | The interrupted clip resumes. Stored content resumes where it stopped; a broadcast resumes at its current position. |
NEXT | The next ENTRY plays, as if the interrupted clip had reached its end. | ||
BREAK | If the current entry is inside a REPEAT, the loop ends as if its count were complete. Otherwise the Player jumps to the end of the playlist. |
If several EVENT elements have the same name, only the first is used.
Events received while another event is being processed are discarded, because events
cannot nest. In preview mode PREVIEWDURATION does not limit event content,
which can play in full.