previous   next   contents  

7. SMIL 2.1 Media Object Modules Updates

Editor for SMIL 2.1
Dick C.A. Bulterman, CWI/Amsterdam
Editor for SMIL 2.0
Rob Lanphier, RealNetworks

7.1 Overview and Summary of Changes for SMIL 2.1

The only change for to the Media Object Modules for SMIL 2.1 is the introduction of a facility to predefine sets of common param element values in the document head section and a facility to refer to these definitions from media object references within the body section. This change is made to reduce the size of a SMIL document containing many similar parameter definitions and to ease the authoring and maintenance of SMIL 2.1 documents that use the elements and attributes in the MediaParam Module.

This change has resulted in an expanded definition of the MediaParam module. No other changes have been made to the other media object modules for the SMIL 2.1 release.

The following sections will highlight any text changes to the media object modules specification. Where no changes have been made, this is explicitly noted.

7.2 Definitions

This entire section remains unchanged.

7.3 Definitions

This entire section remains unchanged.

7.4 SMIL BasicMedia Module

This entire section remains unchanged.

7.5 SMIL MediaParam Module

The introduction of this section remains unchanged.

SMIL 2.1 adds a new facility to predefine commonly-used parameters in the document head section. The new sections below define the new elements and attributes of the SMIL 2.1 MediaParam Module. Unless explicitly noted, all of the functionality of the SMIL 2.0 MediaParam Module remain unchanged.

7.5.1 The paramelement

This section expands the definition of the param element for SMIL 2.1 to include the integration of the paramGroup element.

The param element allows a general parameter value to be sent to a media object renderer as a name/value pair. This parameter is sent to the renderer at run-time. Any number of param elements may appear (in any order) in the content of a media object element or in a paramGroup element.

The syntax of names and values is assumed to be understood by the object's implementation. This document does not specify how user agents should retrieve name/value pairs nor how they should interpret parameter names that appear multiple times within the same paramGroup element or as children of a media object.

Attribute definitions
name
(CDATA) This attribute defines the name of a run-time parameter, assumed to be known by the inserted object. Whether the property name is case-sensitive depends on the specific object implementation.
value
(CDATA) This attribute specifies the value of a run-time parameter specified by name. Property values have no meaning to SMIL; their meaning is determined by the object in question.
valuetype
["data"|"ref"|"object"] This attribute specifies the type of the value attribute. Possible values:
  • data: This is default value for the attribute. It means that the value specified by value will be evaluated and passed to the object's implementation as a string.
  • ref: The value specified by value is a URI [URI] that designates a resource where run-time values are stored. This allows support tools to identify URIs given as parameters. The URI must be passed to the object as is, i.e., unresolved.
  • object: The value specified by value is an identifier that refers to a media object declaration in the same document. The identifier must be the value of the id attribute set for the declared media object element.
type
This attribute specifies the content type of the resource designated by the value attribute only in the case where valuetype is set to "ref". This attribute thus specifies for the user agent, the type of values that will be found at the URI designated by value. See 6.7 Content Type in [HTML4] for more information.

Example

To illustrate the use of param: suppose that we have a facial animation plug-in that is able to accept different moods and accessories associated with characters. These could be defined in the following way:
<ref src="http://www.example.com/herbert.face">
  <param name="mood" value="surly" valuetype="data"/>
  <param name="accessories" value="baseball-cap,nose-ring" valuetype="data"/>

</ref>

7.5.2 TheparamGroupelement

The paramGroup element provides a convenience mechanism for defining a group of media parameters that may be used with several different media objects. If present, the paramGroup element must appear in the head section of the document. The content of the paramGroup element consists of zero or more param elements. The paramGroup element may not contain nested paramGroup element definitions.

Element attributes

id
This attribute specifies the ID by which the param group is referenced in a media object reference.

Examples

This section contains several fragments that illustrate uses of the paramGroup element.

In the following fragment, a paramGroup is created to define parameters that are passed to several different media objects:

<smil ... >
  <head>
    ...
    <paramGroup id="clown">
       <param name="mood" value="upBeat" valuetype="data"/>
       <param name="accessories" value="flowers,dunceCap"/>
    </paramGroup>
    ...
  </head>
  <body>
    ...
    <ref src="http://www.example.com/andy.face" paramGroup="clown"/>
    ...
    <ref src="http://www.example.com/sally.face" paramGroup="clown"/>
    ...
  </body>
</smil>

In the following example, a media object provides an additional param value:

<smil ... >
  <head>
    ...
    <paramGroup id="clown">
       <param name="mood" value="upBeat" valuetype="data"/>
       <param name="accessories" value="flowers,dunceCap"/>
    </paramGroup>
    ...
  </head>
  <body>
    ...
    <ref src="http://www.example.com/andy.face" paramGroup="clown">
      <param name="gender" value="male"/>
    </ref>
    ...
  </body>
</smil>

In this final example, a media object provides an duplicate param value. The behavior in this case depends on the media render; all param values are passed to the renderer in the lexical order of the SMIL source file.

<smil ... >
  <head>
    ...
    <paramGroup id="clown">
       <param name="mood" value="upBeat" valuetype="data"/>
       <param name="accessories" value="flowers,dunceCap"/>
    </paramGroup>
    ...
  </head>
  <body>
    ...
    <ref src="http://www.example.com/andy.face" paramGroup="clown">
      <param name="gender" value="male"/>
      <param name="mood" value="depressed" valuetype="data"/>
    </ref>
    ...
  </body>
</smil>

7.5.3 7.4.2 Element Attributes for All Media Objects

In addition to the element attributes defined in BasicMedia, media object elements may have the attributes and attribute extensions defined below. The inclusion or exclusion of these elements is left as an option in the language profile.

SMIL 2.1 adds the paramGroup attribute to the list of attibutes available for media objects. For completeness, the entire set of attributes is reproduced here.

erase
Controls the behavior of the media object after the effects of any timing are complete. For example, when SMIL Timing is applied to a media element, erase controls the display of the media when the active duration of the element and when the freeze period defined by the fill attribute is complete (see SMIL Timing and Synchronization).

Values:

never (default)
When this is specified (or implied) the media removal occurs at the end of any applied timing.
whenDone
When this value is specified, the last state of the media is kept displayed until the display area is reused (or if the display area is already being used by another media object). Any profile that integrates this element must define what is meant by "display area" and further define the interaction. Intrinsic hyperlinks (e.g., Flash, HTML) and explicit hyperlinks (e.g., area, a) stay active as long as the hyperlink is displayed. If timing is reapplied to an element, the effect of the erase=never is cleared. For example, when an element is restarted according to the SMIL Timing and Synchronization module, the element is cleared immediately before it restarts.

Example:

<par>
  <seq>
    <par>
      <img src="image1.jpg" region="foo1" fill="freeze" erase="never" .../>
      <audio src="audio1.au"/>        
    </par>

    <par>
      <img src="image2.jpg" region="foo2" fill="freeze" erase="never" .../>
      <audio src="audio2.au"/>        
    </par>
     ...
    <par>
      <img src="imageN.jpg" region="fooN" fill="freeze" erase="never" .../>
      <audio src="audioN.au"/>        
    </par>
  </seq>
</par>

In this example, each image is successively displayed and remains displayed until the end of the presentation.

mediaRepeat
Used to strip the intrinsic repeat value of the underlying media object. The interpretation of this attribute is specific to the media type of the media object, and is only applicable to those media types for which there is a definition of a repeat value found in the media type format specification. Media type viewers used in SMIL implementations will need to expose an interface for controlling the repeat value of the media for this attribute to be applied. For all media types where there is an expectation of interoperability between SMIL implementations, there should be a formal specification of the exact repeat value to which the mediaRepeat attribute applies.

Values:

strip
Strip the intrinsic repeat value of the media object.
preserve (default)
Leave the intrinsic repeat value of the media object intact.

As an example of how this would be used, many animated GIFs intrinsically repeat indefinitely. The application of mediaRepeat= "strip" allows an author to remove the intrinsic repeat behavior of an animated GIF on a per-reference basis, causing the animation to display only once, regardless of the repeat value embedded in the GIF.

When mediaRepeat is used in conjunction with SMIL Timing Module attributes, this attribute is applied first, so that the repeat behavior can then be controlled with the SMIL Timing Module attributes such as repeatCount and repeatDur.

paramGroup
Used to specify the name of a paramGroup that was defined in the document head. The value is a single IDREF. If the named paramGroup does not exist, this attribute is ignored.

sensitivity
Used to provide author control over the sensitivity of media to user interface selection events, such as the SMIL 2.0 activateEvent, and hyperlink activation. If the media is sensitive at the event location, it captures the event, and will not pass the event through to underlying media objects.  If not, it allows the event to be passed through to any media objects lower in the display hierarchy.

Values:

opaque
The media is sensitive to user interface selection events over the entire area of the media.  This is the default.
transparent
The media is not sensitive to user interface selection events over the entire area of the media. Any user interface selection events will be "passed through" to any underlying media.
percentage-value
The media sensitivity to user interface selection events is dependent upon the opacity of the media at the location of the event (the alpha channel value). If rendered media supports an alpha channel and the opacity of the media is less than the given percentage value at the event location, the behavior will be transparent as specified above. Otherwise the behavior will be as opaque. Valid values are non-negative CSS2 percentage values.

7.5.4 Integration Requirements

This section remains unchanged.

7.6 SMIL MediaClipping Module

This entire section remains unchanged.

7.7 SMIL MediaClipMarkers Module

This entire section remains unchanged.

7.8 SMIL BrushMedia Module

This entire section remains unchanged.

7.9 SMIL MediaAccessibility Module

This entire section remains unchanged.

7.10 SMIL MediaDescription Module

This entire section remains unchanged.

7.11 Appendices

7.11.1 Appendix A: Changes to SMIL 1.0 Media Object Attributes

This sub-section remains unchanged.

7.11.2 Appendix B: Changes to SMIL 1.0 Media Object Elements

New child elements for media objects

This entire section remains unchanged.

The param element

The text in this section is changed to highlight the media parameter definition facility in SMIL 2.1.

A new param element provides a generalized mechanism to attach media-specific attributes to media objects. A new paramGroup element provides a convenience grouping mechanism to collect commonly used param element definitions into a single unit that may be referenced by multiple media objects.

The brush element

This entire section remains unchanged.


previous   next   contents