The SMIL 2.1 Language Profile describes the SMIL 2.1 modules that are included in the SMIL 2.1 Language and details how these modules are integrated. It contains support for all of the major SMIL 2.1 features including animation, content control, layout, linking, media object, meta-information, structure, timing and transition effects. It is designed for Web clients that support direct playback from SMIL 2.1 markup.
This section is informative.
The SMIL 2.1 Language Profile is defined as a markup language. The syntax of this language is formally described with a document type definition (DTD) or an XML Schema which is based on the SMIL modules as defined in "The SMIL 2.1 Modules".
The SMIL 2.1 Language Profile design requirements are:
This section is normative.
This version of SMIL provides a definition of strictly conforming SMIL 2.1 documents, which are restricted to tags and attributes from the SMIL 2.1 namespace. The Section "Extending SMIL 2.1 Language" provides information on using SMIL 2.1 with other namespaces, for instance, on including new tags within SMIL 2.1 documents.
A SMIL 2.1 document is a conforming SMIL 2.1 document if it adheres to the specification described in this document (Synchronized Multimedia Integration Language (SMIL) 2.1 Language Profile Specification) including SMIL 2.1's DTD (see Document Type Definition). A conforming SMIL 2.1 document must meet all of the following criteria:
The SMIL 2.1 Language DOCTYPE is:
<!DOCTYPE smil PUBLIC "-//W3C//DTD SMIL 2.1//EN" "http://www.w3.org/2005/SMIL21/SMIL21.dtd">
If a document contains this declaration, it must be a valid XML
document.
Note that this implies that extensions to the syntax defined in the DTD
are not allowed. If the document is invalid, the user agent should issue
an error.
A document is a conforming SMIL 2.1 document if it satisfies the
requirements of this specification (Synchronized Multimedia Integration
Language (SMIL) 2.1 Language Profile Specification) and is valid per the
normative DTD identified by
http://www.w3.org/TR/2005/REC-SMIL2-20051213/smil21DTD/smil21.dtd
Per section 7.6 of the W3C Process Document, W3C will make every effort to make this normative DTD available, in its original form, at this URI.
The SYMM WG also publishes a non-normative SMIL 2.1 DTD identified by
http://www.w3.org/2005/SMIL21/SMIL21.dtd
The SYMM WG plans to make changes to this DTD over time to correct errata. If you choose to refer to this DTD, please note that it is subject to change without notice at any time. The SYMM WG MAY publish a normative "snapshot" of the corrected DTD at a new URI by following the W3C Process for modifying a Recommendation.
Individuals are free to use either of the two URIs above as the system identifier in the SMIL 2.1 language DOCTYPE, according to the desired level of stability.
<smil xmlns="http://www.w3.org/2005/SMIL21/Language"> ... </smil>
The default namespace declaration must be xmlns="http://www.w3.org/2005/SMIL21/Language".
This namespace URI will only be used to refer to this version of this specification: different URIs will be used for any and all new versions of the specification. This namespace name may be reused in any update of the specification which is made for the purpose of clarification or bug fixes. These changes will be minor in that they do not (a) change the meaning of existing documents written using the namespace, or (b) affect the operation of existing software written to process such documents. The SYMM WG may reuse this namespace URI in a future specification that revises the SMIL 2.1 DTD, thus affecting the validity of published documents.
Declare a SMIL 2.1 document with custom extensions conforming to a custom DTD:
<!DOCTYPE smil SYSTEM "http://www.example.org/myveryownSMIL.dtd"> <smil xmlns="http://www.w3.org/2005/SMIL21/Language" xmlns:mysmil="http://www.example.org/2005/SMIL30/Language"> <mysmil:foo> ... </mysmil:foo> </smil>
If all non-SMIL 2.1 namespace elements and attributes and all xmlns attributes which refer to non-SMIL 2.1 namespace elements are removed from the given document and if the appropriate <!DOCTYPE ... > statement which points to the SMIL 2.1 DTD is included, the result is a valid XML document.
<smil xmlns="http://www.w3.org/2005/SMIL21/Language" xmlns:BasicInlineTiming="http://www.w3.org/2005/SMIL21/BasicInlineTiming"> ... <ref begin="5s" BasicInlineTiming:begin="5s"/> ... </smil>
The SMIL 2.1 language or these conformance criteria provide no designated size limits on any aspect of SMIL 2.1 content. There are no maximum values on the number of elements, the amount of character data, or the number of characters in attribute values.
SMIL 2.1 deprecates base as a property value for the content attribute of the element of SMIL 1.0 in favor of the more general XML Base URI mechanisms.
The SMIL 2.1 Language Profile supports the XML Base Recommendation [XMLBase]. XML Base is supported on all elements, and affects the interpretation of URIs as specified in the individual modules defining the URI attributes. Specifically, any applicable XML Base base URI must be applied to the interpretation of the href attribute of the link elements a, area and anchor, as well as the src attribute of the media elements audio, video, img, animation, textstream, text, and ref. XML Base must also be applied on longdesc attributes of all of the SMIL 2.1 Language elements.
The rules above should be revised once a normative XML Schema for SMIL 2.1 is available. This revision will take into account XML Schema validation.
A SMIL 2.1 user agent is a program which can parse and process a SMIL 2.1 document and render the contents of the document onto output media. A conforming SMIL 2.1 user agent must meet all of the following criteria:
Examples:
1) A pure SMIL 1.0 document:
<smil xmlns="http://www.w3.org/TR/REC-smil"> ... </smil>
2) A pure SMIL 2.1 document:
<smil xmlns="http://www.w3.org/2005/SMIL21/Language"> ... </smil>
3) A SMIL 1.0 document that has been extended to use the excl element:
<smil xmlns="http://www.w3.org/TR/REC-smil" xmlns:smil21="http://www.w3.org/2005/SMIL21/" > <smil21:excl> ... </smil21:excl> </smil>
4) A SMIL 2.1 document that has been extended to use the 'foo' element from a fictitious SMIL 3.0 version of SMIL:
<smil xmlns="http://www.w3.org/2005/SMIL21/Language" xmlns:smil30="http://www.example.org/2005/SMIL30/" > <smil30:foo> ... </smil30:foo> </smil>
The Web Accessibility Initiative is defining "User Agent Accessibility Guidelines 1.0" [UAAG]. Developers are encouraged to design user agents that satisfy at least the Level A requirements of that document. Should UAAG 1.0 become a W3C Recommendation, a future version of SMIL is likely to require Level A conformance to UAAG 1.0 as part of SMIL user agent conformance.
The SMIL 2.1 Language Profile supports the timeline-centric multimedia features found in the SMIL 2.1 modules. It uses only modules from the SMIL 2.1 recommendation. As the language profile includes the mandatory modules, it is a SMIL Host Language conforming language profile. This language profile includes the following SMIL 2.1 modules:
The collection names contained in the following table define the SMIL 2.1 Language Profile vocabulary.
SMIL 2.1 Language Profile | |
---|---|
Collection Name | Elements in Collection |
Animation | animate, set, animateMotion, animateColor |
ContentControl | switch, prefetch |
Layout | region, root-layout, layout, regPoint, topLayout |
LinkAnchor | a, area (anchor) |
MediaContent | text, img, audio, video, ref, animation, textstream, brush, param |
Metainformation | , |
Structure | smil, head, body |
Schedule | par, seq, excl |
Transition | transition |
Other | customAttributes, customTest, paramGroup, priorityClass |
In the following sections, we define the set of elements and attributes used in each of the modules included in the SMIL 2.1 Language Profile. The content model for each element is described. The content model of an element is a description of elements which can appear as its direct children. The special content model "EMPTY" means that a given element may not have children.
Collection Name | Attributes in Collection |
---|---|
Core | id (ID), class(NMTOKEN), title (CDATA), alt (CDATA), longdesc (CDATA), xml:base (CDATA) |
I18n | xml:lang (NMTOKEN) |
The id, classand titleattributes in the collection Core are defined for all the elements of the SMIL 2.1 Language Profile. The idattribute is used in the SMIL 2.1 Language Language Profile to assign a unique XML identifier to every element in a SMIL document. In this document, equivalent but deprecated attributes and elements are in parentheses.
The Animation Module provides a framework for incorporating animation into a timing framework, and a mechanism for composing the effects of multiple animations. The Animation Module uses the timing modules included in this profile for the underlying model of time. The SMIL 2.1 Language Profile includes the animation functionality of the BasicAnimation module. The BasicAnimation Module defines the semantics for the animate, set, animateMotion and animateColor elements.
In the SMIL 2.1 Language Profile, Animation elements can have the
following attributes and content model :
Animation Module | ||
---|---|---|
Elements | Attributes | Content model |
animate | Core, I18n, basicTiming, Test, attributeName, attributeType, targetElement, from, to, by, values, calcMode, accumulate, additive, skip-content, customTest, fill (freeze | remove | hold | auto | default), fillDefault ( remove | freeze | hold | transition | auto | inherit ) | EMPTY |
set | Core, I18n, basicTiming, Test, attributeName, attributeType, targetElement, to, skip-content, customTest, fill (freeze | remove | hold | auto | default), fillDefault ( remove | freeze | hold | transition | auto | inherit ) | EMPTY |
animateMotion | Core, I18n, basicTiming, Test, targetElement, origin, from, to, by, values, calcMode, accumulate, additive, skip-content, customTest, fill (freeze | remove | hold | auto | default), fillDefault ( remove | freeze | hold | transition | auto | inherit ) | EMPTY |
animateColor | Core, I18n, basicTiming, Test, attributeName, attributeType, targetElement, from, to, by, values, calcMode, accumulate, additive, skip-content, customTest, fill (freeze | remove | hold | auto | default), fillDefault ( remove | freeze | hold | transition | auto | inherit ) | EMPTY |
This profile adds the animate, set, animateMotion and animateColor elements to the content model of the par, seq, excl and priorityClass elements of the Timing and Synchronization Modules. It also adds these elements to the content model of the body element of the Structure Module.
Specifying the target element of the animation
The animation target elements supported in the SMIL 2.1 Language Profile are the region element defined in the Layout Modules, the area (anchor) element defined in the Linking Modules and the text, img, audio, animation, video, ref, textstream and the brush elements defined in the Media Objects modules.
The SMIL 2.1 Language Profile uses the targetElement attribute to identify the element to be affected by animation elements. As recommended in the BasicAnimation Module when the targetElement attribute is supported, this profile excludes the XLink attributes href, type, actuate and show from the animate, set, animateMotion and animateColor elements.
Specifying the target attribute of the animation
The target attributes of the animations are a subset of those of the region, area (anchor), and media elements. The animatable attributes of the region, area (anchor), and media elements are listed in the table below.
The area (anchor) element has the coords attribute which can be subject to animation. The attribute coords is considered of type string in this profile. This means that only discrete non-additive animation is supported on this attribute.
The media elements have the following sub-region attributes which can be
subject to animation: left, right, top, bottom, width, height, z-indexand backgroundColor.
Integration definitions
The SMIL 2.1 Language Profile defines a set of integration definitions as required by the Animation modules. These definitions are:
coerced-integer-value = Math.floor( interpolated-value + 0.5 )
The Content Control
Modules provide a framework for selecting content based on a set of test
attributes. The Content Control
Modules define semantics for the switch, prefetch, customAttributes and customTest elements. The SMIL 2.1
Language Profile includes the Content Control functionality of the BasicContentControl, CustomTestAttributes, PrefetchControl and SkipContentControl modules.
In the SMIL 2.1 Language Profile, Content Control elements can have the
following attributes and content model :
Content Control Module | ||
---|---|---|
Elements | Attributes | Content model |
switch | Core, I18n, Test, customTest | (Schedule | priorityClass | MediaContent | ContentControl | LinkAnchor | Animation )* | (layout )* |
prefetch | Core, I18n, Test, Timing, mediaSize, mediaTime, bandwidth, src, clipBegin (clip-begin), clipEnd (clip-end), skip-content, customTest | EMPTY |
customAttributes | Core, I18n, Test, skip-content | customTest+ |
customTest | Core, I18n, skip-content, defaultState (true|false) 'false', override (visible | hidden) 'hidden', uid (URI) | EMPTY |
This profile adds the switch element to the content model of the par, seq and excl elements of the Timing and Synchronization Modules, of the body and the head elements of the Structure Module, of the content model of the a element of the Linking Modules. The profile adds the customAttributes element to the content model of the head and the customTest element to the content model of the customAttributes element.
The Content Control functionality is used to define the Attribute set "Test":
Collection Name | Attributes in Collection |
---|---|
Test | systemBitrate (system-bitrate), systemCaptions (system-captions), systemLanguage (system-language), , systemRequired (system-required), systemScreenSize (system-screen-size),systemScreenDepth (system-screen-depth), systemOverdubOrSubtitle, systemAudioDesc, , systemCPU, systemComponent |
The collection of Attributes Test is added to all the elements defined in the SMIL 2.1 Language Profile, except customTest and customAttributes. A SMIL 2.1 user agent must support all of the values for the and systemCPUattributes listed in the Content Control Modules. In addition, the user agent should accept namespaced values as future extensions, and not declare a syntax error. The user agent should return false for unrecognized values of the and systemCPUattributes.
The Layout Modules provide a framework for spatial layout of visual components. The Layout Modules define semantics for the region, root-layout, topLayout, layout and the regPoint elements. The SMIL 2.1 Language Profile includes the Layout functionality of the AlignmentLayout Module, AudioLayout Module, BackgroundTilingLayout Module, BasicLayout Module, MultiWindowLayout Module, OverrideLayout Module, SubRegionLayout Module modules.
In the SMIL 2.1 Language Profile, Layout elements can have the following
attributes and content model :
Layout Module | ||
---|---|---|
Elements | Attributes | Content model |
region | Core, I18n, Test, backgroundColor (background-color), showBackground (always | whenActive), bottom, fit (fill | hidden | meet | scroll | slice | meetBest), width, height, left, right, top, soundLevel, z-index, skip-content, customTest, regionName, backgroundImage, backgroundRepeat, regPoint (topLeft | topMid | topRight | midLeft | center | midRight | bottomLeft | bottomMid | bottomRight), regAlign (topLeft | topMid | topRight | midLeft | center | midRight | bottomLeft | bottomMid | bottomRight), mediaAlign (topLeft | topMid | topRight | midLeft | center | midRight | bottomLeft | bottomMid | bottomRight), soundAlign (left | both | right) | region* |
root-layout | Core, I18n, Test, backgroundColor(background-color), width, height, skip-content, customTest, backgroundImage, backgroundRepeat | EMPTY |
topLayout | Core, I18n, Test, backgroundColor(background-color), width, height, open, close, skip-content, customTest, backgroundImage, backgroundRepeat | region* |
layout | Core, I18n, Test, type, customTest | (root-layout | region | topLayout | regPoint)* |
regPoint | Core, I18n, Test, top, bottom, left, right, regAlign, skip-content, customTest | EMPTY |
(**) The "background-color" attribute of SMIL1.0 is deprecated in favor of "backgroundColor", but both are supported.
The attribute collection SubregionAttributes is defined as follows:
Collection Name | Attributes in Collection |
---|---|
SubregionAttributes | top, left, bottom, right, width, height, z-index, fit, backgroundColor, regPoint, regAlign, mediaAlign, soundAlign |
This profile adds the layout element to the content model of the head element of the Structure Module. It also adds this element to the content model of the switch element of the Content Control Modules, when the switch element is a child of the head element.
The Linking Modules provide a framework for relating documents to content, documents and document fragments. The Linking Modules define semantics for the a and area (anchor) elements. They define also the semantics of a set of attributes defined for these elements. The SMIL 2.1 Language Profile includes the Linking functionality of the BasicLinking, LinkingAttributes and ObjectLinking modules.
Both the a and area elements have an href attribute, whose value must be a valid URI.
Support for URIs with XPointer fragment identifier syntax is not required.
In the SMIL 2.1 Language Profile, Linking elements can have the following
attributes and content model :
Linking Module | ||
---|---|---|
Elements | Attributes | Content model |
a | Core, I18n, basicTiming, Test, href, sourceLevel, destinationLevel, sourcePlaystate(play | pause | stop) 'pause', destinationPlaystate (play | pause) 'play', show(new | replace | pause) 'replace', accesskey, tabindex, target, external, actuate, customTest | (Schedule | MediaContent | ContentControl | Animation )* |
area (anchor) | Core, I18n, basicTiming, Test, shape, coords, href, nohref, sourceLevel, destinationLevel, sourcePlaystate, destinationPlaystate, show, accesskey, tabindex, target, external, actuate, shape, fragment, skip-content, customTest | (animate | set)* |
This profile adds the a element to the content model of the par, seq, and excl elements of the Timing and Synchronization Modules. It also adds these elements to the content model of the body element of the Structure Module.
In the SMIL 2.1 language profile, a value of onLoad set on the attribute actuate indicates that the link is automatically traversed when the linking element becomes active. For linking elements containing SMIL timing, this is when the active duration of the linking element begins.
The attribute tabindex specifies the position of the element in the tabbing order at a particular instant for the current document. The tabbing order defines the order in which elements will receive focus when navigated by the user via an input device such as a keyboard. At any particular point in time, only active elements are taken into account for the tabbing order; inactive elements are ignored.
When a media object element has a tabindex attribute and becomes active, then its ordered tab index is inserted in the SMIL tab index at the location specified by the media object's tabindex attribute value. This assumes that the media object itself has tab indices, such as embedded HTML with tabindex attributes. This enables all link starting points in a SMIL presentation to have a place on the ordered list to be tab-keyed through, including those in embedded presentations.
For SMIL 1.0 backward compatibility, the anchorelement is available but deprecated in favor of area. The anchor element supports the same attributes as area, both the new SMIL 2.1 attributes and the SMIL 1.0 attributes as defined in [SMIL10].
SMIL 1.0 backward compatibility: The show attribute value pause is deprecated in favor of setting the show attribute to new and the sourcePlaystate attribute to pause.
The Media Object Modules provide a framework for declaring media. The Media Object Modules define semantics for the ref, animation, audio, img, video, text, textstream and brush elements. The SMIL 2.1 Language Profile includes the Media functionality of the BasicMedia, MediaClipping, MediaClipMarkers, MediaParam, BrushMedia and MediaAccessibility modules.
In the SMIL 2.1 Language Profile, media elements can have the following attributes and content model:
Media Object Module | ||
---|---|---|
Elements | Attributes | Content model |
text, img, audio, animation, video, ref, textstream | Core, I18n, Timing, Test, SubregionAttributes, region, fill (freeze | remove | hold | transition | auto | default), , copyright, abstract, src, type, erase, mediaRepeat, sensitivity, tabindex, customTest, transIn, transOut,clipBegin (clip-begin), clipEnd (clip-end), readIndex, endsync, paramGroup. | (param | area (anchor)| switch | Animation)* |
brush | Core, I18n, Timing, Test, SubregionAttributes, abstract, region, fill (freeze | remove | hold | transition | auto | default), , copyright, color, skip-content, erase, sensitivity, tabindex, customTest, transIn, transOut, readIndex, endsync, paramGroup. | (param | area (anchor) | switch | Animation)* |
param | Core, I18n, Test, name, value, valuetype (data | ref | object), type, skip-content | EMPTY |
paramGroup | Core, I18n, skip-content | param* |
SMIL 1.0 only allowed anchoras a child element of a media element. In addition to anchor, the following elements are allowed in SMIL 2.1 as children of a SMIL media object: area, param, animate, set, animateColor, animateMotion (note that the a element is not included). The switch element is allowed, with the restriction that in this case the content of the switch may only be from the same set of elements.
This section is informative.
The members of the W3C SYMM Working Group believe that the following MIME types will be widely supported by SMIL user agents:
Implementers of SMIL user agents should thus strive to provide support for each of these types. Note, however, that this section is non-normative, and that support for these MIME types is not a precondition for conformance to this specification.
Authors are encouraged to encode media objects using one of the widely supported MIME types whenever possible. This will ensure that their SMIL documents can be played back by a wide range of SMIL user agents.
If authors use a MIME type that is not in the list of widely supported types, they should provide an alternative version encoded using a baseline format. This can be achieved by using a switch element as shown in the following example:
<switch> <audio src="non-baseline-format-object" /> <audio src="baseline-format-object" /> </switch>
In this example, a user agent that supports the non-baseline format will play the first audio media object, and a user agent that does not support the non-baseline format will play the second media object.
This section is normative.
The MediaParam module defines the eraseattribute, and defers definition of the "display area" to the language profile. "Display area" for the purposes of the SMIL 2.1 Language corresponds to a SMIL BasicLayout region. The effects of erase="never" apply after the active duration of the media object and any fill period (defined by SMIL Timing and Synchronization), and only until other media plays to the region targeted by the media object, or until the same media object restarts.
The Metainformation Module provides a framework for describing a document, either to inform the human user or to assist in automation. The Metainformation Module defines semantics for the and elements. The SMIL 2.1 Language Profile includes the Metainformation functionality of the Metainformation module.
In the SMIL 2.1 Language Profile, Metainformation elements can have the following attributes and content model :
Metainformation Module | ||
---|---|---|
Elements | Attributes | Content model |
Core, I18n, skip-content, content (CDATA), name (CDATA) | EMPTY | |
Core, I18n, skip-content | EMPTY |
This profile adds the element to the content model of the head element of the Structure Module.
The content model of metadata is empty. Profiles that extend the SMIL 2.1 Language Profile can define the RDF (Resource Description Framework) schema to be used in extending the content model of the metadata element. The Resource Description Framework is defined in the W3C RDF Recommendation [RDFsyntax].
The Structure Module provides a framework for structuring a SMIL document. The Structure Module defines semantics for the smil, head, and body elements. The SMIL 2.1 Language Profile includes the Structure functionality of the Structure module.
In the SMIL 2.1 Language Profile, the Structure elements can have the following attributes and content model :
Structure Module | ||
---|---|---|
Elements | Attributes | Content model |
smil | Core, I18n, Test, xmlns | (head?,body?) |
head | Core, I18n | (*, (customAttributes,*)?,(,*)?,((layout|switch),*)?, (transition+,*)?, (paramGroup+,*)?) |
body | Core, I18n, Timing, fill, abstract, , copyright | (Schedule | MediaContent | ContentControl | a )* |
The body element acts as the root element to span the timing tree. The body element has the behavior of a seq element. Timing on the body element is supported. The syncbase of the body element is the application begin time, which is implementation dependent, as is the application end time. Note that the effect of fillon the bodyelement is between the end of the presentation and the application end time, and therefore the effect of fill is implementation dependent.
The Timing and Synchronization Modules provide a framework for describing timing structure, timing control properties and temporal relationships between elements. The Timing and Synchronization Modules define semantics for par, seq, excl and priorityClass elements. In addition, these modules define semantics for attributes including begin, dur, end, repeat (deprecated), repeatCount, repeatDur, syncBehavior, syncTolerance, syncBehaviorDefault, syncToleranceDefault, restartDefault, fillDefault, restart, min, max.The SMIL 2.1 Language Profile includes the Timing functionality of the AccessKeyTiming Module, BasicInlineTiming Module, BasicTimeContainers Module, BasicExclTimeContaine Module, BasicPriorityClassContainers Module, EventTiming Module, FillDefault Module, MediaMarkerTiming Module, MinMaxTiming Module, MultiArcTiming Module, RepeatTiming Module, RepeatValueTiming Module, RestartDefault Module, RestartTiming Module, SyncbaseTiming Module, SyncBehavior Module, SyncBehaviorDefault Module, WallclockTiming Module modules.
In the SMIL 2.1 Language Profile, Timing and Synchronization elements can have the following attributes and content model :
Timing and Synchronization Module | ||
---|---|---|
Elements | Attributes | Content model |
par | Core, I18n, Timing, Test, endsync, customTest, fill(freeze | remove | hold | auto | default), abstract, , copyright, region | (Schedule | MediaContent | ContentControl | a | Animation)* |
seq | Core, I18n, Timing, Test, customTest, fill (freeze | remove | hold | auto | default), abstract, , copyright, region | (Schedule | MediaContent | ContentControl | a | Animation * |
excl | Core, I18n, Timing, Test, endsync, skip-content, customTest, fill (freeze | remove | hold | auto | default ), abstract, , copyright, region | ((Schedule | MediaContent | ContentControl | a | Animation)* | priorityClass+) |
priorityClass | Core, I18n, Test, peers ( stop | pause| defer | never ) 'stop', higher ( stop | pause ) 'pause', lower ( defer | never ) 'defer', skip-content, pauseDisplay, customTest, abstract, , copyright | ((Schedule | MediaContent | ContentControl | a | Animation)*) |
The Attribute collections Timing and basicTiming are defined as follows:
Collection Name | Attributes in Collection |
---|---|
Timing | begin, dur, end, repeat (deprecated), repeatCount, repeatDur, syncBehavior ( canSlip | locked | independent | default), syncTolerance, syncBehaviorDefault ( canSlip | locked | independent | inherit ) 'inherit', syncToleranceDefault, restartDefault (always | whenNotActive | never), fillDefault ( remove | freeze | hold | transition | auto | inherit ), restart (always | whenNotActive | never | default), min, max |
basicTiming | begin, dur, end, repeat(deprecated), repeatCount, repeatDur, min, max |
This profile adds the par, seq, and excl elements to the content model of the body element of the Structure Module and adds these elements to the content model of the a element of the Linking Modules.
Elements of the Media Object Modules have the attributes describing timing and properties of contents.
The SMIL 2.1 Language Profile specifies which types of events can be used as part of the begin and end attribute values. The supported events are described as Event-symbols according to the syntax introduced in the SMIL Timing and Synchronization module.
The supported event symbols in the SMIL 2.1 Language Profile are:
Event | example |
---|---|
focusInEvent (In DOM Level 2: "DOMFocusIn") | end="foo.focusInEvent + 3s" |
focusOutEvent (In DOM Level 2: "DOMFocusOut") | begin="foo.focusOutEvent" |
activateEvent (In DOM Level 2: "DOMActivate") | begin="foo.activateEvent" |
beginEvent | begin="foo.beginEvent + 2s" |
endEvent | end="foo.endEvent + 2s" |
repeatEvent | end="foo.repeatEvent" |
inBoundsEvent | end="foo.inBoundsEvent" |
outOfBoundsEvent | begin="foo.outOfBoundsEvent + 5s" |
topLayoutCloseEvent | end="toplayout1.topLayoutCloseEvent" |
topLayoutOpenEvent | end="toplayout2.topLayoutOpenEvent+5s" |
<ref id="x" end="30s" src="15s.mpg" /> <ref id="y" end="10s" src="20s.mpg" /> <ref id="z" repeatCount="4" src="5s.mpg" />
x.endEvent occurs at roughly 30s when the active duration is reached, y.endEvent occurs at roughly 10s when the playback of the continuous media is ended early by the active duration being reached, and z.endEvent occurs at roughly 20s when the fourth and final repeat has completed, thus reaching the end of its active duration. The endEvent is delivered to elements which support timing, such as media elements and time containers, and does not bubble.
A media element's bounds are restrained by the bounds of the region in which it is contained., i.e., a media element's bounds do not extend beyond its region's bounds. The inBoundsEvent is delivered to media elements only, and does not bubble.
Note that, unlike with keyboard focus which can only be active on one object at a time, the state of being within an object's bounds can be true for multiple objects simultaneously. For instance, if one object is on top of another and the cursor is placed on top of both objects, both would have raised an inBoundsEvent more recently than the raising of any respective outOfBoundsEvent.
A media element's bounds are restrained by its region's bounds, i.e., a media element's bounds do not extend beyond its region's bounds. The outOfBoundsEvent is delivered to media elements only, and does not bubble.
There will be cases where events occur simultaneously. To ensure that each SMIL 2.1 Language implementation handles them in the same order, the following order must be used to resolve ties:
Events are listed in order of precedence, e.g., if event #6 in this list occurs at the same time as event #7, then #6 must be raised prior to #7.
The InBoundsEvent, focusInEvent, OutOfBoundsEvent, activateEvent, and focusOutEvent events do not bubble and are delivered to the target media element.
The beginEvent, endEvent and repeatEvent events do not bubble and are delivered to the timed element on which the event occurs.
The topLayoutOpenEvent and topLayoutCloseEvent events do not bubble and are delivered to the topLayout element on which the event occurs.
The SMIL 2.1 Language Profile supports an extensible set of events. In order to resolve possible name conflicts with the events that are supported in this profile qualified event names are supported. Namespace prefixes are used to qualify the event names. As a result, the colon is reserved in begin and end attributes for qualifying event names.
For example:
<smil ... xmlns:example="http://www.example.com"> <img id="foo" .../> <audio begin="foo.example:focusInEvent".../> ... </smil>
A SMIL document's begin time is defined as the moment a user agent begins the timeline for the overall document. A SMIL document's end time is defined as equal to the end time of the body element.
The Transition Modules provide a framework for describing transitions such as fades and wipes. The Transition Modules define semantics for the transition element. The SMIL 2.1 Language Profile includes the functionality of the BasicTransitions, TransitionModifiers and the FullScreenTransitions Module modules.
In the SMIL 2.1 Language Profile, Transition Effects elements have the following attributes and content model :
Transition Effects Module | ||
---|---|---|
Elements | Attributes | Content model |
transition | Core, I18n, Test, dur, type, subtype, startProgress, endProgress, direction, fadeColor, scope, horzRepeat, vertRepeat, borderWidth, borderColor, skip-content, customTest | EMPTY |
This profile adds the transition element to the content model of the head element of the Structure Module.
The Transition Effects Modules add transIn and transOut attributes to ref, animation, audio, img, video, text, textstream and brush elements of the Media Object Modules.
The Transition Effects Modules add the transition value to the fill attribute for all elements on which this value of the fill attribute is supported.
This section is normative
In the future, SMIL 2.1 Language may be extended by other W3C Recommendations, or by private extensions. For these extensions, the following rules must be obeyed:
Conformant SMIL 2.1 user agents are prepared to handle documents containing extensions that obey these two rules.
This section is normative.
The SMIL 2.1 Language Profile Document Type Definition is defined as a set of SMIL 2.1 modules. All SMIL 2.1 modules are integrated according to the guidelines in the W3C Note "Synchronized Multimedia Modules based upon SMIL 1.0" [SMIL-MOD], and defined within their respective module sections.