Copyright © 1999 W3C® (MIT, INRIA, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply.
This is a W3C Working Draft for review by W3C members and other interested parties. It is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to use W3C Working Drafts as reference material or to cite them as other than "work in progress". This is work in progress and does not imply endorsement by, or the consensus of, either W3C or members of the SYMM working group.
This document has been produced as part of the W3C Multimedia Activity. The authors of this document are the SYMM WG members.
This document is for public review. Comments on this document should be sent to the public mailing list www-smil@w3.org.
A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR.
This specification defines the Document Object Model (DOM) specification for synchronized multimedia functionality. It is part of work in the Synchronized Multimedia Working Group (SYMM) towards a next version of the SMIL language and SMIL modules. Related documents describe the specific application of this SMIL DOM for SMIL documents and for HTML and XML documents that integrate SMIL functionality. The SMIL DOM builds upon the DOM Core functionality, adding support for timing and synchronization, media integration and other extensions to support synchronized multimedia documents.
Copyright © 1995-1999 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved.
Public documents on the W3C site are provided by the copyright holders under the following license. The software or Document Type Definitions (DTDs) associated with W3C specifications are governed by the Software Notice.
By using and/or copying this document, or the W3C document from which this statement is linked, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions:
Permission to use, copy, and distribute the contents of this document, or the W3C document from which this statement is linked, in any medium for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the document, or portions thereof, that you use:
When space permits, inclusion of the full text of this NOTICE should be provided. We request that authorship attribution be provided in any software, documents, or other items or products that you create pursuant to the implementation of the contents of this document, or any portion thereof.
No right to create modifications or derivatives of W3C documents is granted pursuant to this license. However, subsequent to additional requirements documented in the Copyright FAQ, modifications or derivatives are sometimes granted by the W3C to individuals complying with those terms.
THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.
The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to this document or its contents without specific, written prior permission. Title to copyright in this document will at all times remain with copyright holders.
The first W3C Working Group on Synchronized Multimedia (SYMM) developed SMIL - Synchronized Multimedia Integration Language. This XML-based language is used to express synchronization relationships among media elements. SMIL 1.0 documents describe multimedia presentations that can be played in SMIL-conformant viewers.
SMIL 1.0 did not define a Document Object Model. Because SMIL is XML based, the basic functionality defined by the Core DOM is available. However, just as HTML and CSS have defined DOM interfaces to make it easier to manipulate these document types, there is a need to define a specific DOM interface for SMIL functionality. The current SYMM charter includes a deliverable for a SMIL-specific DOM to address this need, and this document specifies the SMIL DOM interfaces.
Broadly defined, the SMIL DOM is an Application Programming Interface (API) for SMIL documents and XML/HTML documents that integrate SMIL functionality. It defines the logical structure of documents and the way a document is accessed and manipulated. This is described more completely in "What is the Document Object Model".
The SMIL DOM will be based upon the DOM Core functionality (see DOM Core: The SMIL DOM Foundation). This describes a set of objects and interfaces for accessing and manipulating document objects. The SMIL DOM will also require the additional event interfaces described in the DOM Level 2 Events module. The SMIL DOM extends these interfaces to describe elements, attributes, methods and events specific to SMIL functionality.
Note that the SMIL DOM does not require support for DOM Level 2 Views, Stylesheets, CSS, Traversal, and Model Range modules.
The SYMM Working Group is also working towards a modularization of SMIL functionality, to better support integration with HTML and XML applications. Accordingly, the SMIL DOM is defined in terms of the SMIL modules.
The design and specification of the SMIL DOM must meet the following set of requirements.
General requirements:
SMIL specific requirements:
It is not yet clear what all the requirements ([DOM Requirements]) on the SMIL DOM will be related to the modularization of SMIL functionality. While the HTML Working Group is also working on modularization of XHTML, a modularized HTML DOM is yet to be defined. In addition, there is no general mechanism yet defined for combining DOM modules for a particular profile.
The SMIL DOM has as its foundation the Core DOM. The SMIL DOM includes the support defined in the DOM Level 2 Core, and the DOM Level 2 Events.
The DOM Level 2 Core describes the general functionality needed to manipulate hierarchical document structures, elements and attributes. The SMIL DOM describes functionality that is associated with or depends upon SMIL elements and attributes. Where practical, we would like to simply inherit functionality that is already defined in the DOM Level 2 Core. Nevertheless, we want to present an API that is easy to use, and familiar to script authors that work with the HTML DOM definitions.
Following the pattern of the HTML DOM, the SMIL DOM defines a naming convention for properties, methods, events, collections and data types. All names are defined as one or more English words concatenated together to form a single string. The property or method name starts with the initial keyword in lowercase, and each subsequent word starts with a capital letter. For example, a method that converts a time on an element local timeline to global document time might be called "localToGlobalTime". The attribute "xml:link" will be called "xmlLink" in DOM.
In the ECMAScript binding, properties are exposed as properties of a given object. In Java, properties are exposed with get and set methods.
Most of the properties are directly associated with attributes defined in the SMIL syntax. By the same token, most
The SMIL DOM methods support functionality that is directly associated with SMIL functionality (such as control of an element timeline).
In some instances, the SMIL DOM defines constraints on the Level 2 Core interfaces. These are introduced to simplify the SMIL associated runtime engines. The constraints include:
One of the goals of the DOM Level 2 Event Model is the design of a generic event system which allows registration of event handlers, describes event flow through a tree structure, and provides basic contextual information for each event. The SMIL event model includes the definition of a standard set of events for synchronization control and presentation change notifications, a means of defining new events dynamically, and the defined contextual information for these events.
The DOM Level 2 Events specification currently defines a base Event interface and three broad event classifications:
In HTML documents, elements generally behave in a passive (or sometimes reactive) manner, with most events being user-driven (mouse and keyboard events). In SMIL, all timed elements behave in a more active manner, with many events being content-driven. Events are generated for key points or state on the element timeline (at the beginning, at the end and when the element repeats). Media elements generate additional events associated with the synchronization management of the media itself.
The SMIL DOM makes use of the general UI and mutation events, and also defines new event types, including:
Some runtime platforms will also define new UI events, e.g. associated with a control unit for web-enhanced television (e.g. channel change and simple focus navigation events). In addition, media players within a runtime may also define specific events related to the media player (e.g. low memory).
The SMIL events are grouped into four classifications:
In addition to defining the basic event types, the DOM Level 2 Events specification describes event flow and mechanisms to manipulate the event flow, including:
The SMIL DOM defines the behavior of Event capture, bubbling and cancellation in the context of SMIL and SMIL-integrated Documents.
In the HTML DOM, events originate from within the DOM implementation, in response to user interaction (e.g. mouse actions), to document changes or to some runtime state (e.g. document parsing). The DOM provides methods to register interest in an event, and to control event capture and bubbling. In particular, events can be handled locally at the target node or centrally at a particular node. This support is included in the SMIL DOM. Thus, for example, synchronization or media events can be handled locally on an element, or re-routed (via the bubbling mechanisms) to a parent element or even the document root. Event registrants can handle events locally or centrally.
Note: It is currently not resolved precisely how event flow (dispatch, bubbling, etc.) will be defined for SMIL timing events. Especially when the timing containment graph is orthogonal to the content structure (e.g. in XML/SMIL integrated documents), it may make more sense to define timing event flow relative to the timing containment graph, rather than the content containment graph. This may also cause problems, as different event types will behave in very different ways within the same document.
Note: In Documents using SMIL Layout, it is currently not resolved precisely how certain user interface events (e.g. onmouseover, onmouseout) will be defined and will behave. It may make more sense to define these events relative to the regions and layout model, rather than the timing graph.
We have found that the DOM has utility in a number of scenarios, and that these scenarios have differing requirements and constraints. In particular, we find that editing application scenarios require specific support that the browser or runtime environment typically does not. We have identified the following requirements that are directly associated with support for editing application scenarios as distinct from runtime or playback scenarios:
Due to the time-varying behavior of SMIL and SMIL-integrated document types, we need to be able to impose different constraints upon the model depending upon whether the environment is editing or browsing/playing back. As such, we need to introduce the notion of modality to the DOM (and perhaps more generally to XML documents). We need a means of defining modes, of associating a mode with a document, and of querying the current document mode.
We are still considering the details, but it has been proposed to specify an active mode that is most commonly associated with browsers, and a non-active or editing mode that would be associated with an editing tool when the author is manipulating the document structure.
Associated with the requirement for modality is a need to represent a lock or read-only qualification on various elements and attributes, dependent upon the current document mode.
For an example that illustrates this need within the SMIL DOM: To simplify runtime engines, we want to disallow certain changes to the timing structure in an active document mode (e.g. to preclude certain structural changes or to make some properties read-only). However when editing the document, we do not want to impose these restrictions. It is a natural requirement of editing that the document structure and properties be mutable. We would like to represent this explicitly in the DOM specification.
There is currently some precedent for this in HTML browsers. E.g. within Microsoft Internet Explorer, some element structures (such as tables) cannot be manipulated while they are being parsed. Also, many script authors implicitly define a "loading" modality by associating script with the document.onLoad event. While this mechanism serves authors well, it nevertheless underscores the need for a generalized model for document modality.
DOMException NO_MODIFICATION_ALLOWED_ERR
.
)A related requirement to modality support is the need for a simplified transaction model for the DOM. This would allow us to make a set of logically grouped manipulations to the DOM, deferring all mutation events and related notification until the atomic group is completed. We specifically do not foresee the need for a DBMS-style transaction model that includes rollback and advanced transaction functionality. We are prepared to specify a simplified model for the atomic changes. For example, if any error occurs at a step in an atomic change group, the atomicity can be broken at that point.
As an example of our related requirements, we will require support to optimize the propagation of changes to the time-graph modeled by the DOM. A typical operation when editing a timeline shortens one element of a timeline by trimming material from the beginning of the element. The associated changes to the DOM require two steps:
Typically, a timing engine will maintain a cache of the global begin and end times for the elements in the timeline. These caches are updated when a time that they depend on changes. In the above scenario, if the timeline represents a long sequence of elements, the first change will propagate to the whole chain of time-dependents and recalculate the cache times for all these elements. The second change will then propagate, recalculating the cache times again, and restoring them to the previous value. If the two operations could be grouped as an atomic change, deferring the change notice, the cache mechanism will see no effective change to the end time of the original element, and so no cache update will be required. This can have a significant impact on the performance of an application.
When manipulating the DOM for a timed multimedia presentation, the efficiency and robustness of the model will be greatly enhanced if there is a means of grouping related changes and the resulting event propagation into an atomic change.
A DOM application can use the hasFeature
method of the
DOMImplementation
interface to determine whether the SMIL Object Model interfaces are
supported or not. The feature string for the fundamental interfaces listed
in this section is "SMIL". The version number of this feature for SMIL
Boston is "2.0".
The purpose of the SMIL Boston DOM is to provide an easy access to the attributes and functionalities of the SMIL Boston specification ([SMIL Boston]). Not all SMIL Boston attributes are accessible with the following API but the user can still use the DOM Core ([DOM Level 2]) to access them (see setAttributeNS and getAttributeNS).
A SMIL document is the root of the SMIL Hierarchy and holds the entire content. Beside providing access to the hierarchy, it also provides some convenience methods for accessing certain sets of information from the document.
interface SMILDocument : Document { };
The SMILElement
interface is the base for all SMIL element
types. It follows the model of the HTMLElement
in the HTML DOM, extending the base Element
class to denote SMIL-specific elements.
Note that the SMILElement
interface overlaps with the
HTMLElement
interface. In practice, an integrated document profile that include HTML
and SMIL modules will effectively implement both interfaces (see also the
DOM documentation discussion of
Inheritance vs
Flattened Views of the API).
interface SMILElement : Element { attribute DOMString id; // raises(DOMException) on setting };
id
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
@@TODO.
interface SMILMetaElement : SMILElement { attribute DOMString content; // raises(DOMException) on setting attribute DOMString name; // raises(DOMException) on setting attribute DOMString skipContent; // raises(DOMException) on setting };
content
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
name
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
skipContent
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
This module includes the layout, root_layout and region elements, and associated attributes.
Declares layout type for the document. See the LAYOUT element definition in SMIL 1.0.
interface SMILLayoutElement : SMILElement { attribute DOMString type; // raises(DOMException) on setting };
type
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
Declares layout properties for the root element. See the root-layout element definition in SMIL 1.0.
interface SMILRootLayoutElement : SMILElement { attribute DOMString title; // raises(DOMException) on setting attribute DOMString skipContent; // raises(DOMException) on setting attribute DOMString backgroundColor; // raises(DOMException) on setting attribute long height; // raises(DOMException) on setting attribute long width; // raises(DOMException) on setting };
title
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
skipContent
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
backgroundColor
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
height
of type long
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
width
of type long
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
Controls the position, size and scaling of media object elements. See the region element definition in SMIL 1.0.
interface SMILRegionElement : SMILElement { attribute DOMString title; // raises(DOMException) on setting attribute DOMString skipContent; // raises(DOMException) on setting attribute DOMString fit; // raises(DOMException) on setting attribute DOMString backgroundColor; // raises(DOMException) on setting attribute long height; // raises(DOMException) on setting attribute long width; // raises(DOMException) on setting attribute DOMString top; // raises(DOMException) on setting attribute long zIndex; // raises(DOMException) on setting };
title
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
skipContent
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
fit
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
backgroundColor
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
height
of type long
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
width
of type long
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
top
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
zIndex
of type long
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
The layout module also includes the region attribute, used in SMIL layout to associate layout with content elements. This is represented as an individual interface, that is supported by content elements in SMIL documents (i.e. in profiles that use SMIL layout).
Declares rendering surface for an element. See the region attribute definition in SMIL 1.0.
interface SMILRegionInterface { attribute SMILRegionElement region; };
region
of type SMILRegionElement
This module includes extensions for timing and synchronization.
The Time
interface is a datatype that represents times
within the timegraph. A Time
has a type, key values to
describe the time, and a boolean to indicate whether the values are
currently unresolved. Note that if the boolean value "resolved" is
false
, then the time must be considered to be "indefinite"
(although the other values are still set to describe the
Time
).
interface Time { readonly attribute boolean resolved; readonly attribute double resolvedOffset; // TimeTypes const unsigned short SMIL_TIME_INDEFINITE = 0; const unsigned short SMIL_TIME_OFFSET = 1; const unsigned short SMIL_TIME_SYNC_BASED = 2; const unsigned short SMIL_TIME_EVENT_BASED = 3; const unsigned short SMIL_TIME_WALLCLOCK = 4; const unsigned short SMIL_TIME_MEDIA_MARKER = 5; readonly attribute unsigned short timeType; attribute double offset; // raises(DOMException) on setting attribute Element baseElement; // raises(DOMException) on setting attribute boolean baseBegin; // raises(DOMException) on setting attribute DOMString event; // raises(DOMException) on setting attribute DOMString marker; // raises(DOMException) on setting };
resolved
of type boolean
, readonlyTime
has been
fully resolved to the document schedule. Note that for this to be
true, the current Time
must be defined (not indefinite),
the syncbase and all Time
's that the syncbase depends on
must be defined (not indefinite), and the begin Time
of
all ascendent time containers of this element and all Time
elements that this depends upon must be defined (not indefinite).
Time
is based upon an event, this
Time
will only be resolved once the specified event has
happened, subject to the constraints of the time container.
resolvedOffset
of type double
, readonly
An integer indicating the type of this time value.
SMIL_TIME_INDEFINITE |
The Time is specified to be "indefinite". The
Time may have a resolved value, if a method call is made
to activate this time (beginElement for a begin time, or endElement
for an active end time). If the Time is resolved, the
resolvedOffset will reflect the time at which the method call was
made.
The Time attributes offset, baseBegin, event and marker
are undefined for this type.
|
SMIL_TIME_OFFSET |
The value is a simple offset from the default syncbase. The
baseElement will be the default syncbase element defined by the time
model, the baseBegin indicates whether the default syncbase is
relative to the begin or active end of the baseElement, and the
offset will be the specified offset.
The Time attributes baseElement, baseBegin, event and
marker are undefined for this type.
|
SMIL_TIME_SYNC_BASED |
The value is relative to the begin of the specified baseElement. The
baseElement will be the specified syncbase, the baseBegin indicates
whether the default syncbase is relative to the begin or active end
of the baseElement, and the offset will be the specified offset.
Note that this includes times specified with the logical syncbases
"prev.begin" or "prev.end".
The Time attributes event and marker are undefined for this type.
|
SMIL_TIME_EVENT_BASED |
The value is relative to the specified event raised on the
baseElement. The baseElement will be the specified syncbase, and the
offset will be the specified offset. If the Time is
resolved, the resolvedOffset will reflect the time at which the event
was raised.
The Time attributes baseBegin and marker are undefined
for this type.
|
SMIL_TIME_WALLCLOCK |
The value is specified as a wallclock value. If the
Time is resolved, the resolvedOffset will reflect the
wallclock time, converted to document time.
The Time attributes baseElement, baseBegin, event and marker are undefined for this type.
|
SMIL_TIME_MEDIA_MARKER |
The value is specified as a marker value associated with a given
media element. The baseElement will be the specified media element,
and the marker will be the name of the media marker value. If the
Time is resolved, the resolvedOffset will reflect the
time associated with the specified marker value.
The Time attributes offset, baseElement and event are
undefined for this type.
|
timeType
of type unsigned short
, readonly
offset
of type double
0
.
|
NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this readonly attribute. |
baseElement
of type Element
|
NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this readonly attribute. |
baseBegin
of type boolean
true
, indicates that a sync-based time is relative to
the begin of the baseElement. If false
, indicates that a
sync-based time is relative to the active end of the baseElement.
|
NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this readonly attribute. |
event
of type DOMString
null
.
|
NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this readonly attribute. |
marker
of type DOMString
null
.
|
NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this readonly attribute. |
The TimeList
interface provides the abstraction of an
ordered collection of times, without defining or
constraining how this collection is implemented.
The items in the TimeList
are accessible via an
integral index, starting from 0.
interface TimeList { Time item(in unsigned long index); readonly attribute unsigned long length; };
length
of type unsigned long
, readonlylength-1
inclusive.
item
index
th item in the collection.
If index
is greater than or equal to the number
of times in the list, this returns null
.
|
| Index into the collection. |
The time at the |
This interface defines the set of timing attributes that are common to all timed elements.
interface ElementTime { attribute TimeList begin; // raises(DOMException) on setting attribute TimeList end; // raises(DOMException) on setting attribute float dur; // raises(DOMException) on setting attribute float repeatCount; // raises(DOMException) on setting attribute long repeatDur; // raises(DOMException) on setting boolean beginElement(); boolean endElement(); void pauseElement(); void resumeElement(); void seekElement(inout DOMString seekTo); };
begin
of type TimeList
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
end
of type TimeList
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
dur
of type float
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
repeatCount
of type float
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
repeatDur
of type long
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
beginElement
|
|
endElement
|
|
pauseElement
resumeElement
seekElement
|
| The desired position on the local timeline. |
Events:
resumeElement
method is invoked, and only if the
element was actually paused.
This interface support use-cases commonly associated with animation.
interface ElementTimeManipulation { attribute float speed; // raises(DOMException) on setting attribute float accelerate; // raises(DOMException) on setting attribute float decelerate; // raises(DOMException) on setting attribute boolean autoReverse; // raises(DOMException) on setting };
speed
of type float
1.0
(no modification of speed).
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
accelerate
of type float
0
to
100
. Default value is 0
(no acceleration).
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
decelerate
of type float
0
to
100
. Default value is 0
(no deceleration).
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
autoReverse
of type boolean
false
.
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
The synchronization behavior extension.
interface ElementTimeSynchronization { readonly attribute DOMString syncBehavior; readonly attribute float syncTolerance; readonly attribute DOMString defaultSyncBehavior; readonly attribute float defaultSyncTolerance; readonly attribute boolean syncMaster; };
syncBehavior
of type DOMString
, readonly
syncTolerance
of type float
, readonlysyncBehavior="locked"
.
defaultSyncBehavior
of type DOMString
, readonly
defaultSyncTolerance
of type float
, readonly
syncMaster
of type boolean
, readonly
This is a placeholder - subject to change. This represents generic timelines.
interface ElementTimeContainer : ElementTime { readonly attribute NodeList timeChildrens; NodeList getActiveChildrenAt(inout DOMString instant); };
timeChildrens
of type NodeList
, readonlyNodelist
is empty.
Note: An iterator is more appropriate here than a node list but it requires Traversal module support.
getActiveChildrenAt
|
| The desired position on the local timeline. |
|
List of timed child-elements active at instant. |
A parallel
container defines a simple parallel time grouping
in which multiple elements can play back at the same time.
interface ElementParallelTimeContainer : ElementTimeContainer { attribute DOMString endSync; // raises(DOMException) on setting };
endSync
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
A seq
container defines a sequence of elements in which
elements play one after the other.
interface ElementSequentialTimeContainer : ElementTimeContainer { };
This interface defines a time container with semantics based upon par, but with the additional constraint that only one child element may play at a time.
interface ElementExclusiveTimeContainer : ElementTimeContainer { attribute DOMString endSync; // raises(DOMException) on setting };
endSync
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
This module includes the media elements, and associated attributes. They are all currently represented by a single interface, as there are no specific attributes for individual media elements.
Declares media content.
interface SMILMediaElement : ElementTime, SMILElement { attribute DOMString abstractAttr; // raises(DOMException) on setting attribute DOMString alt; // raises(DOMException) on setting attribute DOMString author; // raises(DOMException) on setting attribute DOMString clipBegin; // raises(DOMException) on setting attribute DOMString clipEnd; // raises(DOMException) on setting attribute DOMString copyright; // raises(DOMException) on setting attribute DOMString longdesc; // raises(DOMException) on setting attribute DOMString src; // raises(DOMException) on setting attribute DOMString title; // raises(DOMException) on setting attribute DOMString type; // raises(DOMException) on setting };
abstractAttr
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
alt
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
author
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
clipBegin
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
clipEnd
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
copyright
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
longdesc
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
src
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
title
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
type
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
interface SMILRefElement : SMILMediaElement { };
This module will include interfaces associated with animations extensions.
The following interface comes from the SMIL Animation draft.
interface ElementTimeControl { boolean beginElement() raises(DOMException); boolean endElement() raises(DOMException); };
beginElement
|
|
|
SYNTAX_ERR: The element was not defined with the appropriate
syntax to allow |
endElement
|
|
|
SYNTAX_ERR: The element was not defined with the appropriate
syntax to allow |
This interface define the set of animation extensions.
interface ElementAnimation : ElementTime, ElementTimeControl { attribute Element targetElement; // raises(DOMException) on setting attribute DOMString href; // raises(DOMException) on setting };
targetElement
of type Element
href
and targetElement
are specified in the
animation document, the default value of this attribute is the first
element ancestor. If a href
is not null
,
setting this attribute has no effect.
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
href
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
This interface represents the SMIL animate
element, the SMIL
animateColor
element and the SMIL animateMotion
element.
interface SMILAnimateElement : ElementAnimation, SMILElement { attribute TimeList keyTimes; // raises(DOMException) on setting attribute TimeList keySplines; // raises(DOMException) on setting };
keyTimes
of type TimeList
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
keySplines
of type TimeList
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
This interface represents the set
element.
interface SMILSetElement : ElementAnimation, SMILElement { };
This interface present the animationMotion
element in
SMIL.
interface SMILAnimateMotionElement : SMILAnimateElement { attribute DOMString path; // raises(DOMException) on setting attribute DOMString origin; // raises(DOMException) on setting };
path
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
origin
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
This module will include interfaces associated with transition markup. This is yet to be defined.
This module includes interfaces for content control markup.
Defines a block of content control. See the switch element definition in SMIL 1.0.
interface SMILSwitchElement : SMILElement { attribute DOMString title; // raises(DOMException) on setting };
title
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
Defines the test attributes interface. See the Test attributes definition in SMIL 1.0.
interface ElementTest { attribute DOMString systemBitrate; // raises(DOMException) on setting attribute DOMString systemCaptions; // raises(DOMException) on setting attribute DOMString systemLanguage; // raises(DOMException) on setting attribute DOMString systemOverdubOrCaption; // raises(DOMException) on setting attribute DOMString systemRequired; // raises(DOMException) on setting attribute DOMString systemScreenSize; // raises(DOMException) on setting attribute DOMString systemScreenDepth; // raises(DOMException) on setting };
systemBitrate
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
systemCaptions
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
systemLanguage
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
systemOverdubOrCaption
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
systemRequired
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
systemScreenSize
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
systemScreenDepth
of type DOMString
|
NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. |
This appendix contains the complete OMG IDL for the SYMM Object Model definitions. The definitions are divided into SYMM.
The IDL files are also available as: http://www.w3.org/TR/1999/WD-smil-boston-dom-19991115/idl.zip
// File: smil.idl #ifndef _SMIL_IDL_ #define _SMIL_IDL_ #include "dom.idl" #pragma prefix "dom.w3c.org" module smil { typedef dom::Element Element; typedef dom::DOMString DOMString; typedef dom::NodeList NodeList; typedef dom::Document Document; interface SMILRegionElement; interface SMILRegionInterface { attribute SMILRegionElement region; }; interface Time { readonly attribute boolean resolved; readonly attribute double resolvedOffset; // TimeTypes const unsigned short SMIL_TIME_INDEFINITE = 0; const unsigned short SMIL_TIME_OFFSET = 1; const unsigned short SMIL_TIME_SYNC_BASED = 2; const unsigned short SMIL_TIME_EVENT_BASED = 3; const unsigned short SMIL_TIME_WALLCLOCK = 4; const unsigned short SMIL_TIME_MEDIA_MARKER = 5; readonly attribute unsigned short timeType; attribute double offset; // raises(dom::DOMException) on setting attribute Element baseElement; // raises(dom::DOMException) on setting attribute boolean baseBegin; // raises(dom::DOMException) on setting attribute DOMString event; // raises(dom::DOMException) on setting attribute DOMString marker; // raises(dom::DOMException) on setting }; interface TimeList { Time item(in unsigned long index); readonly attribute unsigned long length; }; interface ElementTime { attribute TimeList begin; // raises(dom::DOMException) on setting attribute TimeList end; // raises(dom::DOMException) on setting attribute float dur; // raises(dom::DOMException) on setting attribute float repeatCount; // raises(dom::DOMException) on setting attribute long repeatDur; // raises(dom::DOMException) on setting boolean beginElement(); boolean endElement(); void pauseElement(); void resumeElement(); void seekElement(inout DOMString seekTo); }; interface ElementTimeManipulation { attribute float speed; // raises(dom::DOMException) on setting attribute float accelerate; // raises(dom::DOMException) on setting attribute float decelerate; // raises(dom::DOMException) on setting attribute boolean autoReverse; // raises(dom::DOMException) on setting }; interface ElementTimeSynchronization { readonly attribute DOMString syncBehavior; readonly attribute float syncTolerance; readonly attribute DOMString defaultSyncBehavior; readonly attribute float defaultSyncTolerance; readonly attribute boolean syncMaster; }; interface ElementTimeContainer : ElementTime { readonly attribute NodeList timeChildrens; NodeList getActiveChildrenAt(inout DOMString instant); }; interface ElementParallelTimeContainer : ElementTimeContainer { attribute DOMString endSync; // raises(dom::DOMException) on setting }; interface ElementSequentialTimeContainer : ElementTimeContainer { }; interface ElementExclusiveTimeContainer : ElementTimeContainer { attribute DOMString endSync; // raises(dom::DOMException) on setting }; interface ElementTimeControl { boolean beginElement() raises(dom::DOMException); boolean endElement() raises(dom::DOMException); }; interface ElementAnimation : ElementTime, ElementTimeControl { attribute Element targetElement; // raises(dom::DOMException) on setting attribute DOMString href; // raises(dom::DOMException) on setting }; interface ElementTest { attribute DOMString systemBitrate; // raises(dom::DOMException) on setting attribute DOMString systemCaptions; // raises(dom::DOMException) on setting attribute DOMString systemLanguage; // raises(dom::DOMException) on setting attribute DOMString systemOverdubOrCaption; // raises(dom::DOMException) on setting attribute DOMString systemRequired; // raises(dom::DOMException) on setting attribute DOMString systemScreenSize; // raises(dom::DOMException) on setting attribute DOMString systemScreenDepth; // raises(dom::DOMException) on setting }; interface SMILDocument : Document { }; interface SMILElement : Element { attribute DOMString id; // raises(dom::DOMException) on setting }; interface SMILMetaElement : SMILElement { attribute DOMString content; // raises(dom::DOMException) on setting attribute DOMString name; // raises(dom::DOMException) on setting attribute DOMString skipContent; // raises(dom::DOMException) on setting }; interface SMILLayoutElement : SMILElement { attribute DOMString type; // raises(dom::DOMException) on setting }; interface SMILRootLayoutElement : SMILElement { attribute DOMString title; // raises(dom::DOMException) on setting attribute DOMString skipContent; // raises(dom::DOMException) on setting attribute DOMString backgroundColor; // raises(dom::DOMException) on setting attribute long height; // raises(dom::DOMException) on setting attribute long width; // raises(dom::DOMException) on setting }; interface SMILRegionElement : SMILElement { attribute DOMString title; // raises(dom::DOMException) on setting attribute DOMString skipContent; // raises(dom::DOMException) on setting attribute DOMString fit; // raises(dom::DOMException) on setting attribute DOMString backgroundColor; // raises(dom::DOMException) on setting attribute long height; // raises(dom::DOMException) on setting attribute long width; // raises(dom::DOMException) on setting attribute DOMString top; // raises(dom::DOMException) on setting attribute long zIndex; // raises(dom::DOMException) on setting }; interface SMILMediaElement : ElementTime, SMILElement { attribute DOMString abstractAttr; // raises(dom::DOMException) on setting attribute DOMString alt; // raises(dom::DOMException) on setting attribute DOMString author; // raises(dom::DOMException) on setting attribute DOMString clipBegin; // raises(dom::DOMException) on setting attribute DOMString clipEnd; // raises(dom::DOMException) on setting attribute DOMString copyright; // raises(dom::DOMException) on setting attribute DOMString longdesc; // raises(dom::DOMException) on setting attribute DOMString src; // raises(dom::DOMException) on setting attribute DOMString title; // raises(dom::DOMException) on setting attribute DOMString type; // raises(dom::DOMException) on setting }; interface SMILRefElement : SMILMediaElement { }; interface SMILAnimateElement : ElementAnimation, SMILElement { attribute TimeList keyTimes; // raises(dom::DOMException) on setting attribute TimeList keySplines; // raises(dom::DOMException) on setting }; interface SMILSetElement : ElementAnimation, SMILElement { }; interface SMILAnimateMotionElement : SMILAnimateElement { attribute DOMString path; // raises(dom::DOMException) on setting attribute DOMString origin; // raises(dom::DOMException) on setting }; interface SMILSwitchElement : SMILElement { attribute DOMString title; // raises(dom::DOMException) on setting }; }; #endif // _SMIL_IDL_
This appendix contains the complete Java bindings for the SYMM Object Model. The definitions are divided into SMIL.
The Java files are also available as http://www.w3.org/TR/1999/WD-smil-boston-dom-19991115/java-binding.zip
package org.w3c.dom.smil; import org.w3c.dom.Document; public interface SMILDocument extends Document { }
package org.w3c.dom.smil; import org.w3c.dom.DOMException; import org.w3c.dom.Element; public interface SMILElement extends Element { public String getId(); public void setId(String id) throws DOMException; }
package org.w3c.dom.smil; import org.w3c.dom.DOMException; public interface SMILMetaElement extends SMILElement { public String getContent(); public void setContent(String content) throws DOMException; public String getName(); public void setName(String name) throws DOMException; public String getSkipContent(); public void setSkipContent(String skipContent) throws DOMException; }
package org.w3c.dom.smil; import org.w3c.dom.DOMException; public interface SMILLayoutElement extends SMILElement { public String getType(); public void setType(String type) throws DOMException; }
package org.w3c.dom.smil; import org.w3c.dom.DOMException; public interface SMILRootLayoutElement extends SMILElement { public String getTitle(); public void setTitle(String title) throws DOMException; public String getSkipContent(); public void setSkipContent(String skipContent) throws DOMException; public String getBackgroundColor(); public void setBackgroundColor(String backgroundColor) throws DOMException; public int getHeight(); public void setHeight(int height) throws DOMException; public int getWidth(); public void setWidth(int width) throws DOMException; }
package org.w3c.dom.smil; import org.w3c.dom.DOMException; public interface SMILRegionElement extends SMILElement { public String getTitle(); public void setTitle(String title) throws DOMException; public String getSkipContent(); public void setSkipContent(String skipContent) throws DOMException; public String getFit(); public void setFit(String fit) throws DOMException; public String getBackgroundColor(); public void setBackgroundColor(String backgroundColor) throws DOMException; public int getHeight(); public void setHeight(int height) throws DOMException; public int getWidth(); public void setWidth(int width) throws DOMException; public String getTop(); public void setTop(String top) throws DOMException; public int getZIndex(); public void setZIndex(int zIndex) throws DOMException; }
package org.w3c.dom.smil; public interface SMILRegionInterface { public SMILRegionElement getRegion(); public void setRegion(SMILRegionElement region); }
package org.w3c.dom.smil; import org.w3c.dom.DOMException; import org.w3c.dom.Element; public interface Time { public boolean getResolved(); public double getResolvedOffset(); // TimeTypes public static final short SMIL_TIME_INDEFINITE = 0; public static final short SMIL_TIME_OFFSET = 1; public static final short SMIL_TIME_SYNC_BASED = 2; public static final short SMIL_TIME_EVENT_BASED = 3; public static final short SMIL_TIME_WALLCLOCK = 4; public static final short SMIL_TIME_MEDIA_MARKER = 5; public short getTimeType(); public double getOffset(); public void setOffset(double offset) throws DOMException; public Element getBaseElement(); public void setBaseElement(Element baseElement) throws DOMException; public boolean getBaseBegin(); public void setBaseBegin(boolean baseBegin) throws DOMException; public String getEvent(); public void setEvent(String event) throws DOMException; public String getMarker(); public void setMarker(String marker) throws DOMException; }
package org.w3c.dom.smil; public interface TimeList { public Time item(int index); public int getLength(); }
package org.w3c.dom.smil; import org.w3c.dom.DOMException; public interface ElementTime { public TimeList getBegin(); public void setBegin(TimeList begin) throws DOMException; public TimeList getEnd(); public void setEnd(TimeList end) throws DOMException; public float getDur(); public void setDur(float dur) throws DOMException; public float getRepeatCount(); public void setRepeatCount(float repeatCount) throws DOMException; public int getRepeatDur(); public void setRepeatDur(int repeatDur) throws DOMException; public boolean beginElement(); public boolean endElement(); public void pauseElement(); public void resumeElement(); public void seekElement(String seekTo); }
package org.w3c.dom.smil; import org.w3c.dom.DOMException; public interface ElementTimeManipulation { public float getSpeed(); public void setSpeed(float speed) throws DOMException; public float getAccelerate(); public void setAccelerate(float accelerate) throws DOMException; public float getDecelerate(); public void setDecelerate(float decelerate) throws DOMException; public boolean getAutoReverse(); public void setAutoReverse(boolean autoReverse) throws DOMException; }
package org.w3c.dom.smil; public interface ElementTimeSynchronization { public String getSyncBehavior(); public float getSyncTolerance(); public String getDefaultSyncBehavior(); public float getDefaultSyncTolerance(); public boolean getSyncMaster(); }
package org.w3c.dom.smil; import org.w3c.dom.NodeList; public interface ElementTimeContainer extends ElementTime { public NodeList getTimeChildrens(); public NodeList getActiveChildrenAt(String instant); }
package org.w3c.dom.smil; import org.w3c.dom.DOMException; public interface ElementParallelTimeContainer extends ElementTimeContainer { public String getEndSync(); public void setEndSync(String endSync) throws DOMException; }
package org.w3c.dom.smil; public interface ElementSequentialTimeContainer extends ElementTimeContainer { }
package org.w3c.dom.smil; import org.w3c.dom.DOMException; public interface ElementExclusiveTimeContainer extends ElementTimeContainer { public String getEndSync(); public void setEndSync(String endSync) throws DOMException; }
package org.w3c.dom.smil; import org.w3c.dom.DOMException; public interface SMILMediaElement extends ElementTime, SMILElement { public String getAbstractAttr(); public void setAbstractAttr(String abstractAttr) throws DOMException; public String getAlt(); public void setAlt(String alt) throws DOMException; public String getAuthor(); public void setAuthor(String author) throws DOMException; public String getClipBegin(); public void setClipBegin(String clipBegin) throws DOMException; public String getClipEnd(); public void setClipEnd(String clipEnd) throws DOMException; public String getCopyright(); public void setCopyright(String copyright) throws DOMException; public String getLongdesc(); public void setLongdesc(String longdesc) throws DOMException; public String getSrc(); public void setSrc(String src) throws DOMException; public String getTitle(); public void setTitle(String title) throws DOMException; public String getType(); public void setType(String type) throws DOMException; }
package org.w3c.dom.smil; public interface SMILRefElement extends SMILMediaElement { }
package org.w3c.dom.smil; import org.w3c.dom.DOMException; public interface ElementTimeControl { public boolean beginElement() throws DOMException; public boolean endElement() throws DOMException; }
package org.w3c.dom.smil; import org.w3c.dom.DOMException; import org.w3c.dom.Element; public interface ElementAnimation extends ElementTime, ElementTimeControl { public Element getTargetElement(); public void setTargetElement(Element targetElement) throws DOMException; public String getHref(); public void setHref(String href) throws DOMException; }
package org.w3c.dom.smil; import org.w3c.dom.DOMException; public interface SMILAnimateElement extends ElementAnimation, SMILElement { public TimeList getKeyTimes(); public void setKeyTimes(TimeList keyTimes) throws DOMException; public TimeList getKeySplines(); public void setKeySplines(TimeList keySplines) throws DOMException; }
package org.w3c.dom.smil; public interface SMILSetElement extends ElementAnimation, SMILElement { }
package org.w3c.dom.smil; import org.w3c.dom.DOMException; public interface SMILAnimateMotionElement extends SMILAnimateElement { public String getPath(); public void setPath(String path) throws DOMException; public String getOrigin(); public void setOrigin(String origin) throws DOMException; }
package org.w3c.dom.smil; import org.w3c.dom.DOMException; public interface SMILSwitchElement extends SMILElement { public String getTitle(); public void setTitle(String title) throws DOMException; }
package org.w3c.dom.smil; import org.w3c.dom.DOMException; public interface ElementTest { public String getSystemBitrate(); public void setSystemBitrate(String systemBitrate) throws DOMException; public String getSystemCaptions(); public void setSystemCaptions(String systemCaptions) throws DOMException; public String getSystemLanguage(); public void setSystemLanguage(String systemLanguage) throws DOMException; public String getSystemOverdubOrCaption(); public void setSystemOverdubOrCaption(String systemOverdubOrCaption) throws DOMException; public String getSystemRequired(); public void setSystemRequired(String systemRequired) throws DOMException; public String getSystemScreenSize(); public void setSystemScreenSize(String systemScreenSize) throws DOMException; public String getSystemScreenDepth(); public void setSystemScreenDepth(String systemScreenDepth) throws DOMException; }
This appendix contains the complete ECMA Script binding for the SYMM Object Model definitions. The definitions are divided into SMIL.
index
is equivalent to
invoking the item method with that index.
This document has been prepared by the Synchronized Multimedia Working Group (WG) of the World Wide Web Consortium. The WG includes the following individuals: