What Are SMIL's Core Timing Containers?
Synchronized Multimedia Integration Language (SMIL) relies on three
core timing containers to structure and synchronize multimedia elements:
<seq>, <par>, and
<excl>. These containers establish how child
elements—such as audio, video, text, and images—relate to one another on
a timeline. Understanding how each container controls playback order,
duration, and element interaction is essential for designing
synchronized multimedia presentations.
1. The Sequential Container
(<seq>)
The <seq> element defines a strictly ordered,
sequential timeline. Child elements placed within a
<seq> container play one after another in the exact
order they appear in the markup.
- Start behavior: The first child begins playing as
soon as the
<seq>container starts. Each subsequent child element begins playing only after the preceding element has ended. - Duration: By default, the total duration of a
<seq>container equals the sum of the durations of all its child elements. - Common use cases: Slide presentations, step-by-step video tutorials, and sequential audio playlists where content must never overlap.
2. The Parallel Container
(<par>)
The <par> element allows multiple media elements
to play at the same time, grouping them into a shared, simultaneous
timeline.
- Start behavior: By default, all child elements
within a
<par>container start playing simultaneously at the moment the container becomes active, unless an explicit start offset is defined for an individual element. - Duration: The default duration of a
<par>container is determined by its longest-running child element. However, attributes likeendsynccan alter this behavior to end the container when the first child finishes (endsync="first"), when a specific element finishes (endsync="id(...)"), or when all elements finish (endsync="last"). - Common use cases: Playing a background music track alongside a video, displaying real-time subtitles over spoken dialogue, or showing synchronized captions next to an animation.
3. The Exclusive Container
(<excl>)
Introduced in SMIL 2.0, the <excl> container
allows multiple media elements to be defined within a group, but ensures
that only one child element can play at any given moment.
- Start behavior: Unlike
<seq>, child elements in an<excl>container do not automatically play in source order. Instead, they typically start based on external events, user interactions, or explicit timing triggers. - Interruption management: When a new child element
starts playing within an
<excl>container, it pauses, stops, or defers the currently active child based on defined priority attributes (priorityClass,peers, andhigher). - Common use cases: Interactive multimedia menus, user-triggered audio commentary tracks, and multi-language audio selection where choosing a new track immediately replaces the active one.