previous   next   contents  

4. The SMIL Content Control

Jeffrey Ayars (, RealNetworks
Dick Bulterman, (, Oratrix

Table of contents

4.1 Introduction

This Section defines the SMIL content control module. This module contains elements and attributes which provide for runtime content choices and optimized content delivery. Since these elements and attributes are defined in a module, designers of other markup languages can reuse the functionality in the SMIL content control module when they need to include media content control in their language. Conversely, language designers incorporating other SMIL modules do not need to include the content module if other content control functionality is already present.

This module is broken up into 2 levels. Level 0 contains Content Selection and system test attributes and Level 1 contains user defined test attributes and presentation optimization elements and attributes. It is the intent that the levels build on each other so profiles implementing Level 1 should also implement Level 0.

4.2 Content Selection

SMIL 1.0 provides a "test-attribute" mechanism to process an element only when certain conditions are true, for example when the client has a certain screen-size. SMIL 1.0 also provides the switch element for expressing that a set of document parts are alternatives, and that the first one fulfilling certain conditions should be chosen. This is useful to express that different language versions of an audio file are available, and to have the client select one of them. This version includes these features and extends them by supporting new system test-attributes, as well as the ability to customize a presentation to an individual viewer by providing author defined, user selected test-attributes.

4.2.1 Level 0

The switch Element

The switch element allows an author to specify a set of alternative elements from which only the first acceptable element should be chosen. An element is acceptable if the language allows the element as a child of a switch, the media-type can be decoded (if the element declares media), and all of the test-attributes of the element evaluate to true. When integrating content control into a profile, the profile must specify what constitutes an "acceptable element."

An element is selected as follows: the player evaluates the elements in the order in which they occur in the switch element. The first acceptable element is selected at the exclusion of all other elements within the switch.

Thus, authors should order the alternatives from the most desirable to the least desirable. Furthermore, authors should place a relatively fail-safe alternative as the last item in the switch so that at least one item within the switch is chosen (unless this is explicitly not desired). Implementations should NOT arbitrarily pick an object within a switch when test-attributes for all child elements fail.

Note that some network protocols, e.g. HTTP and RTSP, support content-negotiation, which may be an alternative to using the switch element in some cases.

The skipContent attribute

This attribute is introduced for future extensibility of SMIL. Note that the hyphenated attribute name from SMIL 1.0 has been deprecated in favor of using the current SMIL camelCase convention. The deprecated SMIL 1.0 name is shown in parentheses after the preferred name.

skipContent (skip-content)
Controls whether the content of an element is evaluated or should be skipped.
  • If a new element is introduced in a future version of language, and this element allows markup from a previous version of the language as element content, the skipContent attribute controls whether this content is processed by the user-agent.
  • If an empty element in a version of a language becomes non-empty in a future SMIL version, the skipContent attribute controls whether this content is ignored by a user-agent, or results in a syntax error.

If the value of the skipContent attribute is true, and one of the cases above apply, the content of the element is ignored. If the value is false, the content of the element is processed.
The default value for skipContent is true.

It is the responsibility of the language profile to specify which elements have skipContent attributes to enable this expansion mechanism.

Predefined Test Attributes

This specification defines a list of test attributes that can be added to language elements, as allowed by the language designer. In SMIL 1.0, these elements are synchronization and media elements. Conceptually, these attributes represent Boolean tests. When any of the test attributes specified for an element evaluates to false, the element carrying this attribute is ignored.

Within the list below, the concept of "user preference" may show up. User preferences are usually set by the playback engine using a preferences dialog box, but this specification does not place any restrictions on how such preferences are communicated from the user to the SMIL player.

This version of SMIL defines the following test attributes. Note that some hyphenated test attribute names from SMIL 1.0 have been deprecated in favor of names using the current SMIL camelCase convention. For these, the deprecated SMIL 1.0 name is shown in parentheses after the preferred name.

It is implementation dependent when system or user test attributes are evaluated. Attributes may be evaluated multiple times. Dynamic reevaluation is allowed but not required.

systemBitrate (system-bitrate)
This attribute specifies the approximate bandwidth, in bits-per-second, available to the system. The measurement of bandwidth is application specific, meaning that applications may use sophisticated measurement of end-to-end connectivity, or a simple static setting controlled by the user. In the latter case, this could for instance be used to make a choice based on the user's connection to the network. Typical values for modem users would be 14400, 28800, 56000 bit/s etc. Evaluates to true if the available system bitrate is equal to or greater than the given value. Evaluates to false if the available system bitrate is less than the given value.
The attribute can assume any integer value greater than 0. If the value exceeds an implementation-defined maximum bandwidth value, the attribute always evaluates to false.
systemCaptions (system-captions)
values: on | off
This attribute allows authors to to specify a redundant text equivalent of the audio portion of the presentation. Such as one intended for audiences with hearing disabilities, those learning to read, or anyone who wants or needs this information. Setting systemCaptions to on means the source will play if the user wants to see captions. Setting it to off means the source will play if the user has indicated that they don't wish to see captions.
Evaluates to true if the user preference matches this attribute value. Evaluates to false if they do not match.
systemLanguage (system-language)
The attribute value is a comma-separated list of language names as defined in [RFC1766].
Evaluates to true if one of the languages indicated by user preferences exactly equals one of the languages given in the value of this parameter, or if one of the languages indicated by user preferences exactly equals a prefix of one of the languages given in the value of this parameter such that the first tag character following the prefix is "-". Evaluates to false otherwise.
Note: This use of a prefix matching rule does not imply that language tags are assigned to languages in such a way that it is always true that if a user understands a language with a certain tag, then this user will also understand all languages with tags for which this tag is a prefix.

The prefix rule simply allows the use of prefix tags if this is the case.

Implementation note: When making the choice of linguistic preference available to the user, implementers should take into account the fact that users are not familiar with the details of language matching as described above, and should provide appropriate guidance. As an example, users may assume that on selecting "en-gb", they will be served any kind of English document if British English is not available. The user interface for setting user preferences should guide the user to add "en" to get the best matching behavior.

Multiple languages MAY be listed for content that is intended for multiple audiences. For example, a rendition of the "Treaty of Waitangi", presented simultaneously in the original Maori and English versions, would call for:

<audio src="foo.rm" systemLanguage="mi, en"/>

However, just because multiple languages are present within the object on which the systemLanguage test attribute is placed, this does not mean that it is intended for multiple linguistic audiences. An example would be a beginner's language primer, such as "A First Lesson in Latin," which is clearly intended to be used by an English-literate audience. In this case, the systemLanguage test attribute should only include "en".

Authoring note: Authors should realize that if several alternative language objects are enclosed in a "switch", and none of them matches, this may lead to situations such as a video being shown without any audio track. It is thus recommended to include a "catch-all" choice at the end of such a switch which is acceptable in all cases.

values: caption | overdub
This test attribute has been deprecated in favor of using systemOverdubOrSubtitle and systemCaptions.
This attribute is a setting which determines if users prefer overdubbing or captioning when the option is available.
Evaluates to true if the user preference matches this attribute value. Evaluates to false if they do not match.
systemRequired (system-required)
This attribute specifies the namespace prefix of a language extension, such as a set of new elements or attributes. Evaluates to true if the extension is supported by the implementation, otherwise, this evaluates to false. [NAMESPACES]
systemScreenSize (system-screen-size)
Attribute values have the following syntax: screen-size-val ::= screen-height"X"screen-width
Each of these is a pixel value, and must be an integer value greater than 0.
Evaluates to true if the playback engine is capable of displaying a presentation of the given size. Evaluates to false if the playback engine is only capable of displaying smaller presentations.
systemScreenDepth (system-screen-depth)
values: a number greater than 0. Typical values are 1 | 4 | 8 | 24 | 32
This attribute specifies the depth of the screen color palette in bits required for displaying the element.
Evaluates to true if the playback engine is capable of displaying images or video with the given color depth. Evaluates to false if the playback engine is only capable of displaying images or video with a smaller color depth.
values: overdub | subtitle
This attribute specifies whether subtitles or overdub is rendered for people who are watching a presentation where the audio may be in a language in which they are not fluent. overdub selects for substitution of one voice track for another, and subtitle means that the user prefers the display of text in a language other than that which is being used in the audio track.
Evaluates to true if the user preference matches this attribute value. Evaluates to false if they do not match.
values: on | off
This test attribute specifies whether or not closed audio descriptions should be rendered. This is intended to provide authors with the ability to support audio descriptions for blind users like systemCaptions provides text captions for deaf users. Setting systemAudioDesc to on means the source will play if the user has indicated a desire to hear audio descriptions. A value of off means the source will play if the user has indicated that they don't wish to hear audio descriptions.
Evaluates to true if the user preference matches this attribute value. Evaluates to false if they do not match.
The value is an XML NMTOKEN [XML10].
This test attribute specifies the operating system a user-agent may be running on. An implementation must allow the user the ability to set the user preference to UNKNOWN for privacy.
The following list contains the suggested values for this test attribute, additional names may be supported by an implementation. AIX, BEOS, BSDI, DGUX, FREEBSD, HPUX, IRIX, LINUX, MACOS, NCR, NEC, NETBSD, NEXTSTEP, NTO, OPENBSD, OPENVMS, OS2, OSF, PALMOS, QNX, SINIX, RHAPSODY, SCO, SOLARIS, SONY, SUNOS, UNIXWARE, WIN16, WIN32, WIN9X, WINNT, WINCE, UNKNOWN.

These values come from the _PR_SI_SYSNAME constants defined by the mozilla project

Evaluates to true if the user preference matches this attribute value. Evaluates to false if they do not match. The value is not case-sensitive
The value is an XML NMTOKEN [XML10].
This test attribute specifies the CPU a user-agent may be running on. An implementation must allow the user the ability to set the system value to UNKNOWN for privacy.
The following list contains the suggested values for this test attribute, additional names may be supported by an implementation. ALPHA, ARM, ARM32, HPPA1.1, M68K, MIPS, PPC, RS6000, VAX, X86, UNKNOWN.

These values come from the _PR_SI_ARCHITECTURE constants defined by the mozilla project

Evaluates to true if the user preference matches this attribute value. Evaluates to false if they do not match. The value is not case-sensitive
The value is an XML CDATA string
The value describes a component of the playback system, e.g. user-agent component/feature, number of audio channels, codec, HW mpeg decoder, etc. The syntax of the value is implementation dependent.
Evaluates to true if the user-agent supports the described component. Evaluates to false otherwise."


  1. Choosing between content with different total bitrates

    In a common scenario, implementations may wish to allow for selection via a systemBitrate attribute on elements. The media player evaluates each of the "choices" (elements within the switch) one at a time, looking for an acceptable bitrate given the known characteristics of the link between the media player and media server.

     0  ...
     1  <par>
     2    <text .../>
     3    <switch>
     4      <par systemBitrate="40000">
     5        ...
     6      </par>
     7      <par systemBitrate="24000">
     8        ...
     9      </par>
    10      <par systemBitrate="10000">
    11        ...
    12      </par>
    13    </switch>
    14  </par>
    15  ...
  2. Choosing between audio resources with different bitrates

    The elements within the switch may be any combination of elements. For instance, one could merely be specifying an alternate audio track:

     0  ...
     1  <switch>
     2     <audio src="joe-audio-better-quality" systemBitrate="16000" />
     3     <audio src="joe-audio" systemBitrate="8000" />
     4  </switch>
     5  ...
  3. Choosing between audio resources in different languages

    In the following example, an audio resource is available both in French and in English. Based on the user's preferred language, the player can choose one of these audio resources.

     0  ...
     1  <switch>
     2     <audio src="joe-audio-french" systemLanguage="fr"/>
     3     <audio src="joe-audio-english" systemLanguage="en"/>
     4  </switch>
     5  ...
  4. Choosing between content written for different screens

    In the following example, the presentation contains alternative parts designed for screens with different resolutions and bit-depths. Depending on the particular characteristics of the screen, the player can choose one of the alternatives.

     0  ...
     1  <par>
     2    <text .../>
     3    <switch>
     4      <par systemScreenSize="1280X1024" systemScreenDepth="16">
     5      ...
     6      </par>
     7      <par systemScreenSize="640X480" systemScreenDepth="32">
     8      ...
     9      </par>
    10      <par systemScreenSize="640X480" systemScreenDepth="16">
    11      ...
    12      </par>
    13    </switch>
    14  </par>
    15  ...
  5. Distinguishing caption tracks from stock tickers

    In the following example, captions are shown only if the user wants captions on.

     0  ...
     1  <seq>
     2    <par>
     3      <audio      src="audio.rm"/>
     4      <video      src="video.rm"/>
     5      <textstream src="stockticker.rt"/>
     6      <textstream src="closed-caps.rt" systemCaptions="on"/>
     7    </par>
     8  </seq>
     9  ...
  6. Choosing the language of overdub and subtitle tracks

    In the following example, a French-language movie is available with English, German, and Dutch overdub and subtitle tracks. The following SMIL segment expresses this, and switches on the alternatives that the user prefers.

     0  ...
     1  <par>
     2    <switch>
     3      <audio src="movie-aud-en.rm" systemLanguage="en" 
     4        systemOverdubOrSubtitle="overdub"/>
     5      <audio src="movie-aud-de.rm" systemLanguage="de" 
     6        systemOverdubOrSubtitle="overdub"/>
     7      <audio src="movie-aud-nl.rm" systemLanguage="nl" 
     8        systemOverdubOrSubtitle="overdub"/>
     9      <!-- French for everyone else -->
    10      <audio src="movie-aud-fr.rm"/>
    11    </switch>
    12    <video src="movie-vid.rm"/>
    13    <switch>
    14      <textstream src="movie-sub-en.rt" systemLanguage="en"
    15        systemOverdubOrSubtitle="subtitle"/>
    16      <textstream src="movie-sub-de.rt" systemLanguage="de"
    17        systemOverdubOrSubtitle="subtitle"/>
    18      <textstream src="movie-sub-nl.rt" systemLanguage="nl"
    19        systemOverdubOrSubtitle="subtitle"/>
    20      <!-- French captions for those that really want them -->
    21      <textstream src="movie-caps-fr.rt" systemCaptions="on"/>
    22    </switch>
    23  </par>
    24  ...

System Test Attribute In-Line Use

When using a switch element for selection only the first element for which all test attributes evaluate to true is selected. This can lead to complex nesting of switch elements to get the desired combinations. Additionally, only the combinations that the author created can be selected. To allow more flexibility in element selection, this version of SMIL allows test attributes outside of the switch element.

An example of how a switch might be used to control the alternatives that could accompany a piece of video in a presentation would be:

 0  ...
 1  <par>
 2    <video src="anchor.mpg" ... />
 3    <switch>
 4      <audio src="dutch.aiff"   systemLanguage="DU" systemOverdubOrSubtitle="overdub" ... />
 5      <audio src="english.aiff" systemLanguage="EN" systemOverdubOrSubtitle="overdub"... />
 6      <text  src="dutch.html"   systemLanguage="DU" systemOverdubOrSubtitle="subtitle"... />
 7      <text  src="english.html" systemLanguage="EN" systemOverdubOrSubtitle="subtitle"... />
 8    </switch>
 9  </par> 
10  ...

This fragment (which is pseudo-SMIL for clarity) says that a video is played in parallel with one of: Dutch audio, English audio, Dutch text, or English text. SMIL does not specify the selection mechanism, only a way of specifying the alternatives. If the user wanted Dutch audio and English text, this possibility must have been considered at authoring time. 

Here is the same example with in-line test attributes:

 0  ...
 1  <par>
 2    <video src="anchor.mpg" ... />
 3    <audio src="dutch.aiff"   systemLanguage="DU" systemOverdubOrSubtitle="overdub" ... />
 4    <audio src="english.aiff" systemLanguage="EN" systemOverdubOrSubtitle="overdub"... />
 5    <text  src="dutch.html"   systemLanguage="DU" systemOverdubOrSubtitle="subtitle"... />
 6    <text  src="english.html" systemLanguage="EN" systemOverdubOrSubtitle="subtitle"... />
 7  </par> 
 8  ...

This example says: a video is accompanied by four other data objects, all of which are (logically) shown in parallel. This is, of course, exactly what happens: all five do run in parallel, but it could be that only the video and one audio stream are actually selected by the user (or a user agent) to be rendered during the presentation. At author time you know which logical streams are available, but it is only at runtime that you know which combination of all potentially available stream actually meet the user's needs. Logically, the alternatives indicated by the in-line construct could be represented as a set of switch statements, although the resulting switch could become explosive in size. Use of an in-line test mechanism significantly simplifies the specification of adaptive content in the case that many independent alternatives exist.

4.2.2 Level 1

Attributes and elements specified as part of Level 1 are profile specific features. Inclusion of a Level 1 feature requires support for Level 0 features.

User Groups

The provision of switch-based and in-line system test attributes provides a selection mechanism based on general system attributes. This version of SMIL extends this notion with the definition of user test attributes. User test attributes allow presentation authors to define their own test attributes for use in a specific document. 

The elements used to provide user group functionality are: 

The userAttributes element
The userAttributes element contains definitions of each of the user groups. The elements within the section define a collection of author-specified test attributes that can be used in the document. 
The uGroup element 
An author-defined grouping of related media objects. These are defined within the section delineated by the userAttributes elements that make up part of the document header, and they are referenced within a media object definition. 
values: RENDERED | NOT_RENDERED The values are not case-sensitive.
The initial state for the uGroup is given in the value of this attribute. If unspecified, it defaults to RENDERED. The run-time state is defined by the user or the user agent via the SMIL DOM. If a particular playback environment does not (or cannot) support user selection, the uState attribute controls the author-specified default presentation. 
values: allowed | ???? The values are not case-sensitive.
The author is given the ability to block overrides to the initial state by explicitly prohibiting this in the uGroup definition. It is up to the runtime environment to enforce this attribute. The attribute can also be used to influence adaptive behavior at lower level in the transport hierarchy.

It would be good to have more explanation of this last use.

In addition to the userAttributes and uGroup elements, this module provides a uGroup attribute that can be applied to content requiring selection.

The uGroup attribute
The uGroup attribute is evaluated as a test attribute, if the uGroup attribute evaluates to true, the associated element is evaluated, otherwise it and its content is skipped. uGroup attributes whose value doesn't match the id of a uGroup element evaluate to false.

The following example shows how user groups can be applied within a SMIL document:

  1 <smil>
  2    <head>
  3       <layout>
  4          <!-- define projection regions -->
  5       </layout>
  6       userAttributes
  7          <uGroup id="nl_aud" uState="RENDERED" title="Dutch Audio Cap" override="allowed" />
  8          <uGroup id="uk_aud" uState="NOT_RENDERED" title="English Audio Cap" override="allowed" />
  9          <uGroup id="nl_txt" uState="NOT_RENDERED" title="Dutch Text Cap" override="allowed" />
 10          <uGroup id="UK_txt" uState="NOT_RENDERED" title="English Text Cap" override="allowed" />
 11       </userAttributes>
 12    </head>
 13    <body>
 14       ...
 15       <par>
 16          <video src="announcer.rm" region="a"/>
 17          <text src="news_headline.html" region="b"/>
 18          <audio src="story_1_nl.rm" uGroup="nl_aud"/>
 19          <audio src="story_1_uk.rm" uGroup="UK_aud-cam"/>
 20          <text src="story_1_nl.html" uGroup="nl_txt" region="c"/>
 21          <text src="story_1_uk.html" uGroup="UK_txt" region="d"/>
 22       </par>
 23       ...
 24    </body>
 25 </smil>

Lines 6 through 11 define the available groups. Each group contains an identifier and a title (which can be used by the user-agent to label the group), as well as the (optional) initial state definition and override flag. 

In line 7, a uGroup named "nl_aud" is defined for Dutch audio captions that is initially set to RENDERED. The other groups in this (very simple) example are set to NOT_RENDERED

In lines 15 through 22, a SMIL <par> construct is used to identify a portion of a presentation. In this <par>, a single video (line 16) is accompanied by two audio streams (18,19) and two text streams (20,21), one each for English and Dutch. The <par> also contains a text title that contains a headline.

The interaction of the user interface and the initial state determine which objects are rendered. Note that the same attributes are used across the entire document, meaning that the user only needs to select his/her content preferences once to control related groups of information. In the example, user is free to have the video and headline text accompanied by any combination of English and Dutch captions. (Note that if two audio captions are selected, the player will need to determine how these are processed for delivery.) 

While this example shows in-line use of user groups, the groups could also be applied as test attributes in a switch. Similarly, the system test attributes typically found in a switch could also be used in-line as a control attribute on an element along with the uGroup attribute.

4.3 Presentation Optimization

4.3.1 Level 1

Theprefetch element

This element will give a suggestion or hint to a user-agent that a media resource will be used in the future and the author would like part or all of the resource fetched ahead of time to make the document playback smoother. User-agents can ignore prefetch elements, though doing so may cause an interruption in the document playback when the resource is needed. It gives authoring tools or savvy authors the ability to schedule retrieval of resources when they think that there is available bandwidth or time to do it. A prefetch element is contained within the body of an XML document, and its scheduling is based on its lexical order unless explicit timing is present.

The prefetch element, like media object elements, can have id and src. If SMIL Boston Timing is integrated into the document, begin, end, dur, clipBegin, and clipEnd attributes are also available. The id and src elements are the same as for other media objects. id names the element for reference in the document and src names the resource to be prefetched. When a media object with the same src URL is encountered the user-agent can use any data it prefetched to begin playback without rebuffering or other interruption. The timing attributes begin, end, dur would constrain the presentation time period for prefetching the element. At the end of the presentation time specified by end or dur, the prefetch operation should stop. The clipBegin, and clipEnd elements are used to identify the part of the src clip to prefetch, if only the last 30s of the clip are being played, we don't want to prefetch it from the beginning. Likewise if only the middle 30 seconds of the clip are begin played, we don't want to prefetch more data than will be played.

The The mediaSize, mediaTime, and bandwidth Attributes
In addition to the attributes allowed on Media Object Elements, the following attributes are allowed:
values: bytes-value | percent-value
Defines how much of the resource to fetch as a function of the file size of the resource. To fetch the entire resource without knowing its size, specify 100%. The default is 100%.
values: clock-value | percent-value
Defines how much of the resource to fetch as a function of the duration of the resource. To fetch the entire resource without knowing its duration, specify 100%. The default is 100%.
values: bitrate-value | percent-value
Defines how much network bandwidth the user-agent should use when doing the prefetch. To use all that is available, specify 100%. The default is 100%

If both mediaSize and mediaTime are specified, mediaSize is used and mediaTime is ignored.

For discrete media (non-time based media like text/html or image/png) using the mediaTime attribute causes the entire resource to be fetched.

Any attribute with a value of "0%" is ignored and treated as if the attribute wasn't specified.

Documents must still playback even when the prefetch elements are ignored, although rebuffering or pauses in presentation of the document may occur. If the prefetch for a prefetch element is ignored, any timing on the element is still respected, e.g. is a prefetch has a dur="5s", elements that depend on the prefetch element's timing behave as if the prefetch took 5 seconds.

If a prefetch element is repeated, due to restart or repeat on a parent element the prefetch operation should occur again. This insures appropriately "fresh" data is displayed if, for example, the prefetch is for a banner ad to a URL whose content changes with each request.

If the clipBegin or clipEnd in the media object are different from the prefetch, an implementation can use any data that was fetched but the result may not be optimal.

Note that prefetching data from a URL that changes the content dynamically is dangerous if the entire resource isn't prefetched as the subsequent request for the remaining data may yield data from a newer resource. A user-agent should respect any appropriate caching directives applied to the content, e.g. no-cache 822 headers in HTTP. More specifically, content marked as non-cacheable would have to be refetched each time it was played, where content that is cacheable could be prefetched once, with the results of the prefetch cached for future use.

Attribute value syntax

The bytes-value value has the following syntax:

bytes-value ::= Digit+; any positive number

The percent-val value has the following syntax:

percent-value ::= Digit+ "%"; any positive number in the range 0 to 100

The clock-value value has the following syntax:
Clock-val         ::= ( Hms-val | Smpte-val )
Smpte-val         ::= ( Smpte-type )? Hours ":" Minutes ":" Seconds 
                      ( ":" Frames ( "." Subframes )? )?
Smpte-type        ::= "smpte" | "smpte-30-drop" | "smpte-25"
Hms-val           ::= ( "npt=" )? (Full-clock-val | Partial-clock-val 
                      | Timecount-val)
Full-clock-val    ::= Hours ":" Minutes ":" Seconds ("." Fraction)?
Partial-clock-val ::= Minutes ":" Seconds ("." Fraction)?
Timecount-val     ::= Timecount ("." Fraction)? (Metric)?
Metric            ::= "h" | "min" | "s" | "ms"
Hours             ::= DIGIT+; any positive number
Minutes           ::= 2DIGIT; range from 00 to 59
Seconds           ::= 2DIGIT; range from 00 to 59
Frames            ::= 2DIGIT; @@ range?
Subframes         ::= 2DIGIT; @@ range?
Fraction          ::= DIGIT+
Timecount         ::= DIGIT+
2DIGIT            ::= DIGIT DIGIT
DIGIT             ::= [0-9]

For Timecount values, the default metric suffix is "s" (for seconds).

The bitrate-value value specifies a number of bits per second. It has the following syntax:

bitrate-value ::= Digit+; any positive number

  1. Prefetch the image so it can be displayed immediately after the video ends:
      1 <smil>
      2   <body>
      3     <seq>
      4       <par>
      5         <prefetch id="endimage" 
      6           src=""/>
      7         <text id="interlude" 
      8           src="" fill="freeze"/>
      9       </par>
     10       <video id="main-event" src="rtsp://"/>
     11       <image src="" fill="freeze"/>
     12    </seq>
     13   </body>
     14 </smil>

    No timing is specified so default timing applies in the above example. The text is discrete media so it ends immediately, the prefetch is defaulted to prefetch the entire image at full available bandwidth and the prefetch element ends when the image is downloaded. That ends the <par> and the video begins playing. When the video ends the image is shown.

  2. Prefetch the images for a button so that rollover occurs quickly for the end user:
      1 <html>
      2   <body>
      3     <prefetch id="upimage" src=""/>
      4     <prefetch id="downimage" src=""/>
      5     ....
      6     <!-- script will change the graphic on rollover -->
      7     <img src=""/>
      8   </body>
      9 </html>

previous   next   contents