What Is the Default Value of SMIL Restart?
This article examines the restart attribute in the
Synchronized Multimedia Integration Language (SMIL), identifying its
default value across major SMIL specifications and explaining how this
setting governs multimedia and animation playback behavior.
Overview of the Restart Attribute in SMIL
In the Synchronized Multimedia Integration Language (SMIL) and its
integrated profiles (such as SVG animation), the restart
attribute dictates how timed elements react when triggered to begin
while already running or after finishing playback. It helps developers
control user interactions, event triggers, and synchronization rules to
prevent unexpected overlapping or restarting of media clips and
animations.
The Default Value Across SMIL Versions
Across all versions of SMIL that define the attribute—including
SMIL 2.0, SMIL 2.1, and SMIL 3.0 (as well as the SVG
animation specifications derived from SMIL)—the default value of the
restart attribute is
always.
SMIL 1.0
SMIL 1.0 did not include the restart attribute. Timing
in SMIL 1.0 relied on a simpler model with static begin times,
durations, and basic repeat attributes without granular
restart controls.
SMIL 2.0 and SMIL 2.1
The restart attribute was formally introduced in SMIL
2.0 as part of the Timing and Synchronization module to handle advanced
interactive scenarios and DOM event activations. The default behavior
was established as restart="always".
SMIL 3.0
SMIL 3.0 retained the established timing model. The default value
remained restart="always", ensuring complete backward
compatibility with SMIL 2.x documents.
Valid Values and Behavior
The restart attribute accepts three discrete keyword
values:
always(Default): The element can be restarted at any point in time. If a begin condition or event occurs while the element is currently active, the current playback interval is terminated, and a new interval begins immediately.whenNotActive: The element can only be restarted if it is not currently playing. Any begin triggers or events that occur during the element's active duration are ignored.never: The element can only begin once per document lifecycle. Any subsequent attempts to trigger or re-activate the element are disregarded.
Controlling Defaults
via restartDefault
SMIL specifications also provide the restartDefault
attribute, which can be applied to parent time containers (such as
<par>, <seq>, or
<excl>) or document root elements.
When individual child elements do not explicitly declare a
restart attribute, they inherit the behavior specified by
the ancestor's restartDefault attribute. If no ancestor
defines restartDefault, the standard fallback throughout
the hierarchy remains always.