Movatterモバイル変換
[0]ホーム
- Editor for SMIL 3.0
- Dick Bulterman, CWI
- Editors for Earlier Versions of SMIL
- Aaron Cohen, Intel
- Dick Bulterman, Oratrix/CWI
- Erik Hodge, RealNetworks.
This section is informative.
In order to provide better support for multiple layout processors and tomeet the needs of the new SMIL 3.0 Tiny profile, SMIL 3.0 Layout defines theStructureLayout module. Thismodule defines thelayout element,which can now be used to identify the layout mechanism used by a SMIL profileindependently of the SMIL basic layout architecture.
SMIL 3.0 Layout also extends theBasicLayout module with thebackgroundOpacity attribute,which specifies the background opacity of a region. This attribute applies toboth the background color of a SMIL layout region and to the opacity ofbackground images specified for a region (if supported by the profile). Thisattribute complements new features defined in the Media Objects module tocontrol media opacity for media types that support opacity control.
SMIL 3.0 Layout now restricts the functionality in the OverrideLayoutmodule to be dependent on the ability to define dynamic subregions on mediaobjects in theSubRegionLayoutmodule. This removes a functional conflict with overriding behavior on baseregion values when subregion positioning is not supported.
SMIL 3.0 changes the value of thesoundLevel attribute to now contain arelative sound level definition. This provides a logarithmic/exponentialvolume control mechanism for audio.
This version of the SMIL 3.0 Layout modules also provides minor editorialchanges to the text of all of the module descriptions and it provides anexpanded set of informative examples of layout element and attribute use.
This section is normative.
This section defines the SMIL Layout Modules, which contain elements andattributes that allow positioning of media elements on visual and audiorendering surfaces and to control of audio volume. Since these elements andattributes are defined in modules, designers of other markup languages canchoose the appropriate level of functionality to be included in theirlanguages. Language designers incorporating other SMIL modules may includeall, some or none of the modules described in this section.
SMIL 3.0 Layout functionality is partitioned across the following eightmodules:
- StructureLayout
- The StructureLayout module defines the top-most layout element and its attribute. This element identifies the layout mechanism used in a SMIL presentation (if any). All other layout modules are dependent on this functionality.
- BasicLayout
- The BasicLayout module extends theStructureLayout module and defines the core SMIL layout elements and their attributes. Using these attributes, basic positioning may be achieved for simple presentations.
- AudioLayout
- The AudioLayout module extends theBasicLayout module with a single attribute to control audio output sound levels.
- MultiWindowLayout
- The MultiWindowLayout module extends theBasicLayout module by defining an alternative to theroot-layout element for defining the outer containing rendering space for a presentation. This module also defines functionality for supporting multiple top-level windows simultaneously.
- SubRegionLayout
- The SubRegionLayout module extends theBasicLayout module by defining a facility for creating logically nested regions. These regions may be created statically within thelayout element or dynamically on a media object reference.
- AlignmentLayout
- The AlignmentLayout module extends the BasicLayout module by defining attributes to position content within a region based on a set of registration points and alignment algorithms. Several convenience attribute values are also provided to simply common authoring cases.
- BackgroundTilingLayout
- The BackgroundTilingLayout module extends the BasicLayout module by defining a facility to fill a region background with a tiled image instead of simply a background color.
- OverrideLayout
- The OverrideLayout module extends theSubRegionLayout module by allowing per-media-object overrides of various layout attribute values.
This section is informative.
Note that theSMIL2.0 HierarchicalLayout module was deprecated in SMIL 2.1; all of thismodule's functionality was partitioned across other layout modules and thusit is not part of SMIL 3.0 Layout.
The SMIL layout architecture allows support for multiple layout modelswithin a presentation. Media layout may be described using the SMIL layoutsyntax described in this chapter or by using another layout mechanism, suchas CSS2 syntax[CSS2]. Other layout types are possible as well.
Support for multiple layout models is implementation profile dependent. Agiven profile may support multiple layout models simultaneously (withselection performed using the SMILswitch element), or it may dictate thatonly a single layout model is supported (such as the use of CSS2 layoutwithin the XHTML+SMIL candidate profile[XHTMLplusSMIL].
The remainder of this chapter defines the mechanism to identify the layoutmodel used by a presentation and then describes the features of the SMIL 3.0smil-basic layout semantics.
This section is normative.
The SMIL StructureLayout module defines thelayout element, which is used to indicatethe layout model to be used with a given SMIL document. Thelayout element is used in the documenthead section.
This section defines the elements and attributes that make up thefunctionality in the SMIL StructureLayout module.
Thelayout element
Thelayout element contains theelements that define a particular layout model to be used within a SMILpresentation. If present, thelayoutelement must appear in thehead sectionof the document.
If a document contains nolayoutelement, no SMIL-defined default values are assigned and the positioning ofthe body elements is totally implementation-dependent.
SMIL-defineddefaultlayout semantics can be assigned to all renderable elements by selectingthe empty layout element<layout></layout>.
- type
- This attribute specifies which layout language is used in the layout element. If the user agent does not understand this language, it must skip the element and all of its content up until the next</layout> tag. The default value of the type attribute is "text/smil-basic-layout". This identifier value supports SMIL 3.0BasicLayout module layout semantics.
If thetype attribute of thelayout element has the value "text/smil-basic-layout", (or if notype attribute is defined) thelayout element may contain the elements oftheBasicLayout module, plus anyadditional layout modules defined by the profile incorporating these modules.Profiles incorporating the BasicLayout module may define additional elementsthat are allowed as children of the layout element.
If thetype attribute of thelayout element has a value other than"text/smil-basic-layout", the element containscharacter data.
This module does not define any SMIL events.
This module provides a wrapper for a particular layout model. A given SMILrendering agent may support all, some or none of the layout models definedfor use with SMIL 3.0.
The functionality in this module builds on top of the functionality in theStructuremodule, which is a required prerequisite for inclusion of the StructureLayoutmodule.
See the fullDTD for the SMILLayout modules.
This section is normative.
SMIL BasicLayout module defines a layout model for organizing mediaelements into regions on the visual rendering surface. The regions aredeclared within thelayout element inthe documenthead. Media elementsdeclare which region they are to be rendered into with theregion attribute.
Each region has a set of CSS2 compatible properties such astop,left,height,width, andbackgroundColor. These propertiesmay be declared using a syntax defined by thetype attribute of thelayout element. In this way, media layoutcan be described using the either SMIL basic layout syntax or CSS2 [[CSS2 -absolute-positioning]] syntax (note that these are not functionallyidentical). Other layout types are possible as well.
This section is informative.
An example declaration to define a region with the id "r" at location15,20 that is 100 pixels wide by 50 pixels tall using the SMIL BasicLayoutmodule is:
<layout> <region xml:id="r" top="15px" left="20px" width="100px" height="50px"/> </layout>
To display a media element in the region declared above, specify theregion's id as the region attribute of the media element:
<ref region="r" src="http://..." />
This section defines the elements and attributes that make up thefunctionality in the SMIL BasicLayout module.
Theregion element
The region element controls the position, size and scaling of media objectelements that are placed within its rendering space.
The position of a region, as specified by itstop,bottom,left, andright attributes, is always relative to theparent geometry, which is defined by the parent element. For the SMILBasicLayout module, all region elements must have as their immediate parent alayout element, and the region position is defined relative to the rootwindow declared in the siblingroot-layout element. Theroot-layout element is considered tobe the logical parent of all region elements in SMIL BasicLayout. Theintrinsic size of a region is equal to the size of the logical parent'sgeometry.
When region sizes, as specified bywidth andheight attributes are declared relativewith the "%" notation, the size of a region is relative to the size of theparent geometry. Sizes declared as absolute pixel values maintain thoseabsolute values.
Conflicts between the region size and position attributeswidth,height,bottom,left,right, andtop are resolved according tothe rules for placeholder elements as detailed below. The default values ofregion position and size attributes is specified asauto. This attribute value has the same meaning herethat it does in[CSS2], when there is nodistinction drawn between replaced and non-replaced element.
A placeholder element is one which has no intrinsic width or height, butdoes have a bounding-box which has a width and height. SMIL BasicLayoutregions are placeholder elements. Placeholder elements are clipped to thebounding box.
The governing equation for the horizontal dimension is:
bbw (bounding-box-width) = left + width + right
Given that each of these three parameters may have either a value of"auto" or a defined value not "auto", then there are 8 possibilities:
Attribute values | Result before clipping to the bounding box |
left | width | right | left | width | right |
auto | auto | auto | 0 | bbw | 0 |
auto | auto | defined | 0 | bbw - right | right |
auto | defined | auto | 0 | width | bbw - width |
auto | defined | defined | bbw - right - width | width | right |
defined | auto | auto | left | bbw - left | 0 |
defined | auto | defined | left | bbw - right - left | right |
defined | defined | auto | left | width | bbw - left - width |
defined | defined | defined | left | width | bbw - left - width |
The vertical attributesheight,bottom, andtop are resolved similarly.The governing equation for the vertical dimension is:
bbh (bounding-box-height) = top + height + bottom
Given that each of these three parameters may have either a value of"auto" or a defined value not "auto", then there are 8 possibilities:
Attribute values | Result before clipping to the bounding box |
top | height | bottom | top | height | bottom |
auto | auto | auto | 0 | bbh | 0 |
auto | auto | defined | 0 | bbh - bottom | bottom |
auto | defined | auto | 0 | height | bbh - height |
auto | defined | defined | bbh - bottom - height | height | bottom |
defined | auto | auto | top | bbh - top | 0 |
defined | auto | defined | top | bbh - bottom - top | bottom |
defined | defined | auto | top | height | bbh - top - height |
defined | defined | defined | top | height | bbh - top - height |
Theregion element may have thefollowing visual attributes:
- backgroundColor
- The use and definition of this attribute are identical to the "background-color" property in the CSS2 specification. Unlike SMIL 1.0, this module requires support forCSS2 system colors[CSS2], (Section 18.2).
This attribute specifies the background color used to fill the area of a region displaying media that is not filled by the media. The display of the background color when the region is not in use by a media element is controlled by theshowBackground attribute.
ThebackgroundColor attribute may take on the CSS valueinherit. This means that the background color will be that of the parent element. If the parent element does not have an applicable background color property, the default value depends on the language profile: if thebackground-color attribute is supported by the language profile, the default value ofbackgroundColor is inherited frombackground-color. Otherwise, the default value istransparent. The interaction of this attribute withbackgroundOpacity is discussed in theImplementation section. - background-color
- Deprecated. Equivalent tobackgroundColor, which replaces this attribute. The language profile must define whether or not thebackground-color attribute is supported. The default value of thebackground-color attribute istransparent.
- backgroundOpacity
- This attribute defines the opacity of the background of the region. It accepts a percentage value in the range 0-100% or a number in the range 0.0-1.0, with 100% or 1.0 meaning fully opaque. If an implementation cannot support manipulation of the background opacity value, this attribute is ignored. The default value of this attribute is100%. The interaction of this attribute withbackgroundColor is discussed in theImplementation section.
- bottom
- The use and definition of this attribute are identical to the "bottom" property in the CSS2 specification. Attribute values can be non-negative "percentage" values, and a variation of the "length" values defined in CSS2. For "length" values, SMIL BasicLayout only supports pixel units as defined in CSS2. It allows the author to leave out the "px" unit qualifier in pixel values (the "px" qualifier is required in CSS2). Conflicts between the region size attributesbottom,left,right,top,width, andheight are resolved according to the rules for absolutely positioned, replaced elements in[CSS2]. The default value ofbottom attribute isauto.
- fit
- This attribute specifies the behavior if the intrinsic height and width of a visual media object differ from the values specified by the height and width attributes in theregion element. This attribute does not have a one-to-one mapping onto a CSS2 property, but may be simulated in CSS2.
- This attribute may have the following values:
- fill
- Scale the object's height and width independently so that the content just touches all edges of the box.
- hidden
- Has the following effect:
- If the intrinsic height (width) of the media object element is smaller than the height (width) defined in theregion element, render the object starting from the top (left) edge and fill up the remaining height (width) with the background color.
- If the intrinsic height (width) of the media object element is greater than the height (width) defined in theregion element, render the object starting from the top (left) edge until the height (width) defined in theregion element is reached, and clip the parts of the object below (right of) the height (width).
- meet
- Scale the visual media object while preserving its aspect ratio until its height or width is equal to the value specified by the height or width attributes, while none of the content is clipped. The object's left top corner is positioned at the top-left coordinates of the box, and empty space at the right or bottom is filled up with the background color.
- meetBest
- The semantic of this value is identical tomeet except that the image is not scaled to greater than 100% in either dimension. This limits degradation of upwardly-scaled media content.
- scroll
- A scrolling mechanism should be invoked when the element's rendered contents exceed its bounds.
- slice
- Scale the visual media object while preserving its aspect ratio so that its height or width are equal to the value specified by the height and width attributes while some of the content may get clipped. Depending on the exact situation, either a horizontal or a vertical slice of the visual media object is displayed. Overflow width is clipped from the right of the media object. Overflow height is clipped from the bottom of the media object.
The default value offit ishidden.
Note that thefit attribute appliesto visual media once it has an intrinsic two-dimensional size, such as imagesand video. It does not apply to visual media that is rendered and adapted tovarying circumstances, such as the visual display of HTML, until itstwo-dimensional spatial dimensions have been determined, such as after anHTML page has been laid out to specific size.
- height
- The use and definition of this attribute are identical to the "height" property in the CSS2 specification. Attribute values follow the same restrictions and rules as the values of thebottom attribute. The intrinsic height of a region is the same as that of the parent geometry. The default value of theheight attribute isauto.
- left
- The use and definition of this attribute are identical to the "left" property in the CSS2 specification. Attribute values follow the same restrictions and rules as the values of the "bottom" attribute. The default value of theleft attribute isauto.
- regionName
- This attribute assigns a name to thisregion element that can be referred to by theregion attribute of media object elements. TheregionName attribute is not a unique identifier; multipleregionelements can share the sameregionName attribute value. This attribute does not have a default value.
- right
- The use and definition of this attribute are identical to the "right" property in the CSS2 specification. Attribute values follow the same restrictions and rules as the values of the "bottom" attribute. The default value ofright attribute isauto.
- showBackground
- This attribute controls whether thebackgroundColor of a region is shown when no media is being rendered to the region:
- If the value ofshowBackground isalways, then the background color will be shown in the region when no media object is rendering into that region. If the region is part of ahierarchical sub-region layout, then any ancestor regions must also either be active or have ashowBackground value ofalways for the background color to be shown.
- If the value ofshowBackground iswhenActive, then the background color will be not be shown in the region when no media object is rendering into that region. If the region is part of ahierarchical sub-region layout, then the background color will also be shown when any descendent regions are active.
- The default value ofshowBackground isalways.
- top
- The use and definition of this attribute are identical to the "top" property in the CSS2 specification. Attribute values follow the same restrictions and rules as the values of thebottom attribute. The default value of thetop attribute isauto.
- width
- The use and definition of this attribute are identical to the "width" property in the CSS2 specification. Attribute values follow the same restrictions and rules as the values of thebottom attribute. The intrinsic width of a region is the same as that of the parent geometry. The default value ofwidth attribute isauto.
- z-index
- The use and definition of this attribute are identical to the "z-index" property in the CSS2 specification, with the following exception:
- If two boxes generated by elements A and B have the same stack level, then:
- If the display of an element A starts later than the display of an element B, the box of A is stacked on top of the box of B (temporal order).
- Else, if the display of the elements starts at the same time, and an element A occurs later in the SMIL document text than an element B, the box of A is stacked on top of the box of B (document tree order as defined in CSS2).
A profile integrating the SMIL BasicLayout module must provide a means ofdeclaring an XML identifier onregionelements.
This section is informative.
In the following example fragment, the position of a text element is setto a 5 pixel distance from the top border of the rendering window:
<smil xmlns="http://www.w3.org/ns/SMIL" version="3.0" baseProfile="Language">
<head>
...
<layout>
...
<region xml:id="a" top="5" />
...
</layout>
</head>
<body>
...
<text region="a" src="text.html" dur="10s" />
...
</body>
</smil>
Theroot-layout element
Theroot-layout elementdetermines the value of the layout properties of the root element, which inturn determines the size of the window in which the SMIL presentation isrendered.
If more than oneroot-layoutelement is parsed within a singlelayout element, this is an error, and thedocument should not be displayed. This does not includeroot-layout elements skipped by theuser agent (e.g. because the enclosinglayout element was skipped due to anunrecognizedtype or because atest attribute evaluated to false).
The semantics of theroot-layout element are as in SMIL1.0: the attributes of theroot-layout element determine the sizeof the top level presentation window, and the declared sibling regions arearranged within this top level window. If either theheight orwidth of theroot-layout element is not specified,the value of the attribute is implementation-dependent.
- backgroundColor
- Defined inbackgroundColor under theregion element. Note that the effective default behavior istransparent, which implies that, by default, the implementation-dependent window background will be shown.
- background-color
- Deprecated. Defined inbackground-color under theregion element.
- backgroundOpacity
- Defined inbackgroundOpacity under theregion element.
- height
- Sets the height of the root element. Only length values are allowed. For "length" values, SMIL BasicLayout only supports pixel units as defined in CSS2. It allows the author to leave out the "px" unit qualifier in pixel values (the "px" qualifier is required in CSS2).
- width
- Sets the width of the root element. Only length values are allowed. For "length" values, SMIL BasicLayout only supports pixel units as defined in CSS2. It allows the author to leave out the "px" unit qualifier in pixel values (the "px" qualifier is required in CSS2).
Theroot-layout element is anempty element. This element supports the SMIL 1.0 syntax where theroot-layout element is an emptysibling of the top levelregionelements.
This section is informative.
The following example extends the fragment above with a specification oftheroot-layout element:
<smil xmlns="http://www.w3.org/ns/SMIL" version="3.0" baseProfile="Language">
<head>
<layout>
<root-layout width="320" height="480" />
<region xml:id="a" top="5" />
</layout>
</head>
<body>
<text region="a" src="text.html" dur="10s" />
</body>
</smil>
Note that theroot-layoutelement is placed at a peer-level within thelayout section. SMIL Layout also supports anested containment model using thetopLayout element defined in theMultiWindowLayout module.
Theregion attribute
Theregion attribute is added totheref element (and its synonyms). Thetarget of this attribute will be one or more regions with aregionName declared that matches thevalue of this attribute, or a singleregion element with aregion attribute that matches this value.For processing rules, see the sectionImplementationdetails.
SMIL BasicLayout module is consistent with the visual rendering modeldefined in CSS2, it reuses the formatting properties defined by the CSS2specification, and newly introduces thefit attribute[CSS2]. The reader is expectedto be familiar with the concepts and terms defined in CSS2.
SMIL layout regions influence the propagation of user interface events(such as a mouse click, or hyperlink activation) to underlying visibleelements. When the location of an event corresponds to the background of aregion rather than the media that is displayed in that region, aregion background color oftransparent allows user interface events to passthrough to elements lower in the display stacking order. Conversely, regionswith non-transparent background colors willcapture user interface events, not allowing the event to pass through toelements lower in the display stacking order. This behavior is separate fromthat of a language profile's ability to make use of user interface eventscaptured byregion elements.
An element that does not refer to a validregion element will display in the defaultregion. If not otherwise specified by the profile, the default region isdefined as filling and aligned to the upper-left corner of the presentationwindow. This default region takes on default values for all otherregion attributes.
Theregion attribute is applied toan element in order to specify which rendering region is assigned to theelement. The attribute refers to the abstract rendering region (either visualor acoustic) defined within the layout section of the document. Thereferenced abstract rendering region is determined by applying the followingrules, in order:
- Find all elements in the layout section withregionName attributes that are assigned the same value as that of theregion attribute.
- Remove the elements from this collection that are removed from the rendered presentation due to the processing ofswitch elements and test attributes.
- If any elements remain, the media should be rendered in all of the referred to regions. If the implementation cannot render the media simultaneously in multiple regions, then the media should be rendered using the lexically first remaining element.
- If no elements have aregionName attribute that is assigned the same value as that of the region attribute, then select the element in the layout section whose unique identifier is the value of theregion attribute.
If this process selects no rendering surface defined in the layoutsection, the values of the formatting properties of this element are definedby the default layout values, which is described in the section onintegration requirementsfor this module.
The definition ofbackgroundOpacity and the valuetransparent forbackgroundColor are independent.For example, a combination of backgroundOpacity=100% andbackgroundColor=transparent results in a transparent background.
A profile integrating the SMIL BasicLayout module must define the contentmodels for thelayout element if anyelements beyond those specified here are to be allowed as children.
A profile integrating the SMIL BasicLayout module must provide a means ofdeclaring an XML identifier onregionelements if the profile intends on referring toregion elements by XML identifier. Thisvalue is used as the argument value to theregion attribute. This is not required ifthe profile will only use theregionName method of referring to aregion element.
A profile integrating the SMIL BasicLayout module must specify whichelements have aregion attribute andany inheritance of the attribute.
If not otherwise defined by the profile, the default values of the layoutattributes listed in the SMIL layout modules will apply to presented elementsnot otherwise specifying layout semantics.
The functionality in this module builds on top of the functionality in theStructureLayout module, whichis a required prerequisite for inclusion of theBasicLayout module.
See the fullDTD for the SMILLayout modules.
This section is normative.
In SMIL AudioLayout, one attribute is supported that allows the relativesound intensity of an audio object to be specified via thesoundLevel attribute. When used inconjunction with SMIL 3.0 Animation (and if supported by the profile), thevalue of the attribute may be varied over time.
This section is informative.
The following region defines an audio sound level that is set to -6dBrelative to its normal recorded value:
<layout> ... <region xml:id="a" soundLevel="-6dB"/> ... </layout>
The same approximate effect could be obtained by using the attribute'spercentage notation:
<layout> ... <region xml:id="a" soundLevel="50%"/> ... </layout>
SMIL AudioLayout module supports control of aural media volumes via aproperty on theregion element,soundLevel. Multimedia assigned to aregion with an explicitsoundLevel attribute will have itsaudio rendered at the given relative sound intensity. If the profileintegrating this module also include theOverrideLayout module, thesoundLevel attribute may also be placed as modifiers on individual mediareferences.
This section defines thesoundLevel attribute that makes up theSMIL AudioLayout module.
Theregion element defined in theBasicLayout module is extended withthe addition of thesoundLevelattribute.
Theregion element may have thefollowing aural attribute:
- soundLevel
- Specifies the relative volume of the audio portion of a media element assigned to play within the givenregion. This associates theregion element with a sound reproduction unit. Cascaded regions will accumulate their respective sound level settings, as will be explained below. Regions that are used for multiple sources apply their sound level setting to all of them. A sound source may be reproduced by different units, e.g., through application of theregionName attribute. In such a "multiple window" case, a separatesoundLevelmay be applied to each instance of the sound source, one perregion. Sound level settings are as percentage values or in decibels (dB). Assigned level changes accumulate across nested regions by summing values.
Valid values are either non-negativeCSS2 percentage values [CSS2], (section 4.3.3) or signed ("+" or "-") CSS2 numbers[CSS2] (section 4.3.1), immediately followed by the suffix "dB".
Percentage values are interpreted relative to the recorded volume of the media. A setting of '0%' plays the media silently. A value of '100%' will play the media at its recorded volume (0 dB). Similarly, a value of '200%' will play the media nearly twice as loud (6 dB) as its recorded volume (subject to hardware limitations). The default value is '100%'.
Decibel values are interpreted relative to the recorded volume of the media. The values are interpreted as a ratio of the squares of the new signal amplitude (a1) and the recorded amplitude (a0), and are defined in terms of dB:
soundLevel(dB) = 10 log10 (a1*a1 / a0*a0) = 20 log10 (a1 / a0)
A setting of a large negative value effectively plays the media silently. A value of '-6.0dB' will play the media at approximately half the amplitude of its recorded signal amplitude, and is equivalent to a percentage value of 50%. Similarly, a value of '+6dB' will play the media at approximately twice the amplitude of its recorded signal amplitude (subject to hardware limitations), and is equivalent to a percentage notation of 200%. The default value is '+0.0dB', which specifies no change to the recorded signal amplitude.
The absolute sound level of media perceived is further subject to system volume settings, which cannot be controlled with this attribute.
The functionality in this module builds on top of the functionality in theBasicLayout module, which is arequired prerequisite for inclusion of the AudioLayout module.
See the fullDTD for the SMILLayout modules.
This section is normative.
This section defines the functionality in the SMIL MultiWindowLayoutmodule. This level contains elements and attributes providing for creationand control of multiple top level windows on the rendering device.
In the architecture of the SMILBasicLayout module, each presentationis rendered into a single root window of a specific size/shape. The rootwindow contains all of the regions used to manage the rendering of specificmedia objects and is defined by a peer-levelroot-layout element.
The SMIL Layout specification extends the root container level with thenotion of a top-level rendering window, called atopLayout window. A SMILlayout section may support one or moretopLayout windows. The assignmentof the regions to individual top level windows allows independent placementand resizing of each top-level window, if supported by the including profileand implementation. The initial placement of the top level windows on thedisplay device and any available means of relocating the top level windows isimplementation-dependent.
The top-level windows function as rendering containers only, that is, theydo not carry temporal significance. In other words, each window does notdefine a separate timeline or any other time-container properties. There isstill a single master timeline for the SMIL presentation, no matter how manytop-level windows have been created. This is important to allowsynchronization between media displayed in separate top-level windows.
The display of top level windows can be controlled automatically by theplayer, or manually by the user of the application. If a window is closed (bythe user) while any of the elements displayed in that window are active,there is no effect on the timeline (if any) of those elements. However, aplayer may choose not to decode content as a performance improvement. Themeans provided to a user to close top level windows isimplementation-dependent.
For SMIL 1.0 compatibility, theroot-layout element will continue tosupport SMIL 1.0 layout semantics. The newtopLayout element will support theextension semantics and the improved, nested syntax.
Note also that any one region may belong to at most one top-level (orroot-level) window. Regions not declared as children of atopLayout element belong to theroot-layout window. If noroot-layout element has been declared,the region is assigned to an additional window according to the semantics intheBasicLayout module.
This section defines the elements and attributes that make up the SMILMultiWindowLayout module.
ThetopLayout element
ThetopLayout elementdetermines the size of the a window in which the SMIL presentation isrendered, as well as serving as a top level window in which to place childregion elements.
MultipletopLayout elements mayappear within a singlelayoutelement, each declaring an independent top-level window.
Each instance of atopLayoutelement determines the size of a separate top-level presentation window, andthe descendant regions are arranged within this top-level window and relativeto the coordinate system of this window.
This module also provides control over whentopLayout windows open and close in apresentation. Note that the precise mapping oftopLayout windows on to the hostenvironment is implementation-dependent. It is expected that implementationswill "pop up" independent desktop windows if they can, but other means ofsupporting multiple topLayouts, such as by using frames, are allowed. Whenautomatically opening and closing windows, applications should try to complywith the WAI User Agent Guidelines[UAAG] and allow the user to choosewhether to be warned that windows are being opened and closed, and give amethod for disabling automatic opening and closing of windows.
Elementattributes- backgroundColor
- Defined inbackgroundColor under theregion element. Note that the effective default behavior istransparent, which implies that, by default, the implementation-dependent window background will be shown.
- backgroundOpacity
- Defined inbackgroundOpacity under theregion element.
- close
- Specifies when the top level window should be closed. If the value ofclose isonRequest, then the top level window should not be closed automatically by the player and will only close if the user explicitly closes it via the user interface. If the value ofclose iswhenNotActive, then the top level window should close automatically when no media is being displayed in any one of the window's regions. For timed media using theSMIL timing and synchronization modules, this means when there is no media within its active duration or freeze period using any region of thetopLayout. The default value ofclose isonRequest.
- height
- Sets the height of the top-level window. Only length values are allowed. For "length" values, SMIL MultiWindowLayout only supports pixel units as defined in CSS2. It allows the author to leave out the "px" unit qualifier in pixel values (the "px" qualifier is required in CSS2).
- open
- Specifies when the top level window should be opened. If the value ofopen isonStart, then the top level window should be opened when the presentation begins, and if closed, should not be reopened automatically during the presentation. If the value ofopen iswhenActive, then, if not already open, the top level window should be opened when media is displayed in one of the window's regions. For timed media using theSMIL timing and synchronization modules, this means when there is any media within its active duration or freeze period using any region of thetopLayout. The default value ofopen isonStart.
- width
- Sets the width of the top-level window. Only length values are allowed. For "length" values, SMIL MultiWindowLayout only supports pixel units as defined in CSS2. It allows the author to leave out the "px" unit qualifier in pixel values (the "px" qualifier is required in CSS2).
ThetopLayout element maycontain any number ofregionelements, or be empty.
This section is informative.
The following example provides a restatement of theroot-layoutexample:
<smil xmlns="http://www.w3.org/ns/SMIL" version="3.0" baseProfile="Language"> <head> <layout> <topLayout width="320" height="480" /> <region xml:id="a" top="5" /> </topLayout/> </layout> </head> <body> <text region="a" src="text.html" dur="10s" /> </body></smil>
Multiple instances of thetopLayout element may occur within asingle layout element:
<layout> <topLayout xml:id="WinV" title="Video" width="320" height="240"/> <region xml:id="pictures" title="pictures" height="100%" fit="meet"/> </topLayout> <topLayout xml:id="WinC" title="Captions" width="320" height="60"> <region xml:id="captions" title="caption text" top="90%" fit="meet"/> </topLayout> </layout>
In this example, two top-level windows are defined ("WinV" and "WinC"),and two regions are defined with one region ("pictures") assigned to WinV andthe other ("captions") to WinC. These windows may be opened and closedindependently by the presentation or by a user.
The MultiWindowLayout module does not redefine the BasicLayoutlayout element. Instead, it simply extendsthe content model for that element, as described in the followingsubsection.
Thelayout element defined in theSMIL BasicLayout module is extended by addingtopLayout element to the content modelof thelayout element if thetype attribute of thelayout element has the value "text/smil-basic-layout".
This module includes two events that may be included in the integratinglanguage profile.
- topLayoutOpenEvent
- Raised when atopLayout window opens. This event is delivered to the associatedtopLayoutelement. If atopLayout closes and then reopens when additional media becomes active in any of its regions, this event will be raised again, and will be raised every subsequent time it reopens.
- topLayoutCloseEvent
- Raised when atopLayout closes for any reason. This event is delivered to the associatedtopLayoutelement. If atopLayout reopens when additional media becomes active in any of its regions, this event will be raised again if and when thetopLayout closes again, and will be raised every subsequent time it closes.
Allowing multipletopLayoutelements within a singlelayoutelement implies support for multiple top level windows. If an implementationdoes not support multiple top level windows (because of device or processingrestrictions), only content in the first top-level window defined in thelayout will be rendered. Non-renderedobjects will still participate in all SMIL timing and schedulingoperations.
If used together with theroot-layout element, any directpeer-level regions to theroot-layout will be contained withinthe extents of the root-layout.
The functionality in this module builds on top of the functionality in theBasicLayout module, which is arequired prerequisite for inclusion of the MultiWindowLayout module.
The language profile must specify the declarative names for binding thetopLayoutOpenEvent andtopLayoutCloseEvent events described in theMultiWindowLayoutModule Events section, as well as the bubbling behavior of the events.
See the fullDTD for the SMILLayout modules.
This section is normative.
The SubRegionLayout module defines two mechanisms for defining regionsthat are logically contained within a parent region (these are SMIL'ssub-regions). First, the SubRegionLayout module extends the definitionof the region element to allow for the specification of sub-regions withinthe layout section as hierarchical content of regions. Second, theSubRegionLayout module extends the attributes allowed on (media) objectreferences to allow a dynamic sub-region to be defined in-line by that objectinstance only. All values given for placement within sub-regions are definedin terms of the parent region's placement attributes. The ability to definesub-regions may be exploited for authoring convenience or when changing thelocation of a group of related regions using SMIL Animation.
This section is informative.
In the following fragment, a parent region (CaptionedVideo) isdefined that contains two hierarchical sub-regions:image andcaptions. The placement of the image and caption content is specifiedas relative to the dimensions of the parent region. This is an example of astatically-defined hierarchy of sub-regions.
<layout> ... <region xml:id="CaptionedVideo" top="10px" left="20px" width="320" height="300"> <region xml:id="image" title="image content" width="100%" height="240px" fit="meet"/> <region xml:id="captions" title="caption text" top="240px" height="60px" fit="meet"/> </region> ... </layout>
A presentation using the above layout specification could also create adynamic sub-region that is defined for use by this single object:
<body> ... <img xml:id="Title" region="image" top="5%" left="3" bottom="10%" right="15%" src="TitleImage.png"/> ... </body>
This statement creates a sub-region with the named region "image" with thegiven extents. In the example above, the effective boundaries of thesub-region for the placement of this object are defined by declaring the top,bottom, left and right edges of the region to the values shown, and thenfilling the resulting sub-region with the specified image as directed by thefit attribute. If the size of the mediaobject being displayed is smaller than that of the resulting sub-region, thedisplay will be similar to:
The use of in-line sub-region placement is intended as a light-weightalternative to defining a large number of single-use regions. Often, thedimensions used for the sub-region will match the dimensions of the mediaobject being placed, but in all cases the values of thefit attribute will govern rendering of theobject in the sub-region. The other attributes on the media element thatwould have been applied to a referenced region are applied to the sub-regioninstead. Note that the default values for the sub-region attributes are all'auto', meaning that, by default, a sub-region is created having the samesize and position as the parent region.
The use of sub-region positioning leads to authoring convenience and SMILfile compactness, since many separate regions do not need to be defined tohandle incidental layout needs. The support for a hierarchy of sub-regionsalso allows multiple layout objects to be animated in concert by moving theparent region using SMIL Animation facilities.
This section defines extensions to theregion andref elements (and its synonyms) to supportsub-region functionality.
This module extends the definition of theregion element to include the definition ofhierarchical sub-regions.
In the SubRegionLayout module, theregion element has no additional attributesbeyond that provided in the other included layout modules. However, thesemantics of thez-index attributeare extended to support hierarchical sub-regions.
- z-index
- This attribute is defined as in theBasicLayout module with extensions presented here.
- Thez-index attribute defines the level of the region within the parent region stacking context. Elements assigned to higher level regions are rendered in front of lower level regions within the same parent region. Child regions are always placed in front of their parent region. This results in a two stage sorting of region visibility: first by parent-child containment, and then byz-index among siblings.
Just as withsimple non-hierarchical regions, the stacking order of hierarchical regions may be affected by temporal activation. A region becomes active either when media begins rendering into it, or when one of its child regions becomes active. If two sibling regions have the same z-index, the region most recently made active is in front of the other region.
The SMIL SubRegionLayout module extends theregion element content model to includeregion elements.
The SubRegionLayout module extends theref element to allow a separate, unnamedsub-region to be defined for the media object reference containing thesub-region positioning attributes.
The ref element defined in the MediaObject module and its synonyms areextended to include the following positioning attributes.
- top
- This value uniquely identifies the position or the distance (using CSS2 pixel or non-negative percentage values) of the top edge of the sub-region relative to the top of the region. The "px" unit qualifier in pixel values may be omitted. The default value of top isauto.
- bottom
- This value uniquely identifies the position or the distance (using CSS2 pixel or non-negative percentage values) of the bottom edge of the sub-region relative to the bottom of the region. The "px" unit qualifier in pixel values may be omitted. The default value of bottom isauto.
- height
- This value uniquely identifies the position or the distance (using CSS2 pixel or non-negative percentage values) of the bottom edge of the sub-region relative to the top side of the sub-region. The "px" unit qualifier in pixel values may be omitted. The default value of height isauto.
- left
- This value uniquely identifies the position or the distance (using CSS2 pixel or non-negative percentage values) of the left edge of the sub-region relative to the left of the region. The "px" unit qualifier in pixel values may be omitted. The default value of left isauto.
- right
- This value uniquely identifies the position or the distance (using CSS2 pixel or non-negative percentage values) of the right edge of the sub-region relative to the right side of the region. The "px" unit qualifier in pixel values may be omitted. The default value of right isauto.
- width
- This value uniquely identifies the position or the distance (using CSS2 pixel or non-negative percentage values) of the right edge of the sub-region relative to the left side of the sub-region. The "px" unit qualifier in pixel values may be omitted. The default value of width isauto.
Conflicts between the region size attributesbottom,height,left,right,top, andwidth are resolvedaccording to the rules for placeholder elements described in the section ontheregion element.
The sub-region positioning attributes will be ignored if they are used onan element without aregion attribute(or, if supported, theregionNameattribute) that resolves to aregionelement in thelayout section.
This module does not define any SMIL events.
The position of a region, as specified by itstop andleft attributes, is always relative to theparent geometry, which is defined by the parent element. For the SMILSubRegionLayout module, all hierarchical region elements must have as theirimmediate parent aregion ortopLayout element. The position of thehierarchical region is defined relative to that parent element. The intrinsicsize of a region is equal to the size of the parent geometry.
When region sizes, as specified bywidth andheight attributes are declared relativewith the "%" notation, the size of the hierarchical region is relative to thesize of the parent region. Sizes declared as absolute pixel values areabsolute values even when used with a child region.
Note that a (hierarchical) region may be defined in such a way as toextend beyond the limits of its parent. In this case the child region must beclipped to the parent boundaries.
If az-index attribute is definedon the hierarchical region, it is evaluated as a local index within that ofthe parent.
If thefit attribute and alignmentattributesregPoint andregAlign are relevant to the placementof a particular media object, the interaction is the same as described in thedefinition ofregPoint. Ifsub-region positioning attributes are used on a media object along withfit or the alignment attributesregPoint andregAlign, these attributes apply to thesub-region. In this case thefit settingon the referenced region element does not apply to the sub-region.
For both sub-region positioning and registration point use (as defined inthemodule), the value of thez-index attribute on the associatedregion is used. If media objects overlap spatially, existing rules forresolving z-index conflicts are applied.
Note that placement within the region may be defined in such a way as toextend the media object beyond the limits of the region. In this case themedia object must be clipped to the region boundaries.
If two hierarchical regions with the same z-index attribute value overlap,the existing rules forz-indexprocessing defined in theBasicLayout module are applied.Specifically, the rule concerning time priority is maintained, meaning thatin the case of a z-index conflict, the media visible in the overlap will bedetermined by the region that is rendering the media that has most recentlybegun in time. If the conflicting media began at the same time, then the ruleusing the textual order of the media elements in the SMIL document isapplied.
This section is informative.
For example:
<layout> <root-layout width="640px" height="480px" /> <region xml:id="whole" top="0px" left="0px" width="640px" height="480px" z-index="5"/> <region xml:id="right" top="0px" left="320px" width="320px" height="480px" z-index="4"> <region xml:id="inset" top="140px" left="80" width="160px" height="200px" z-index="6"/> <region xml:id="inset2" top="140px" left="80" width="160px" height="200px" z-index="6"/> <region xml:id="inset3" top="140px" left="80" width="160px" height="200px" z-index="7"/> </region></layout>...<par> <img xml:id="A" region="whole" src="imageA.jpg" dur="10s"/> <img xml:id="B" region="inset" src="imageB.jpg" dur="10s"/></par><par> <img xml:id="D" region="inset2" src="imageD.jpg" begin="1s" dur="10s"/> <img xml:id="C" region="inset" src="imageC.jpg" begin="0s" dur="10s"/></par><par> <img xml:id="E" region="inset2" src="imageE.jpg" dur="10s"/> <img xml:id="F" region="inset3" src="imageF.jpg" dur="10s"/></par>
- In the first "par", image "A" and image "B" begin at the same time. Image A will obscure image "B", even though the z-index of "inset" is greater than that of "whole". This is because the z-index of "right", which is the region containing "inset" is less than that of "whole".
- In the second "par", images "C" and "D" are rendered into regions occupying the same area of the rendering surface. Image "C" will be shown for one second and then obscured by Image "D", since "D" begins after image "C". Note that lexical order is irrelevant here.
- In the third "par", the z-index of region "inset" is considered when computing stacking between siblings, and therefore image "F" will be shown, but image "E" will be obscured for the entire 10 seconds that they are both active.
The functionality in this module builds on top of the functionality in theBasicLayout module and theMediaObject module, which are required prerequisites for inclusion of theSubRegionLayout module. If the functionality in this module is to be usedwith thetopLayout construct, theMultiWindowLayout module is aprerequisite.
See the fullDTD for theSMIL Layout modules.
This section is normative.
A registration element is an element defined within this module that isused to define a point within a region and a default object alignmentalgorithm about that point. The element may be used in a media objectelement, where it is associated with a region and an optional overridealignment algorithm. The placement values within registration elements can beeither percentages or pixels.
The use of registration points allows for consistent relative placementacross regions. As such, registration points are defined outside of anysingle region.
Registration points may be used to coordinate the placement of a set ofmedia objects that do not share the same sizes. (For example, a set of imagesmay be aligned to the center of a region.) They can also be used tocoordinate the display of images about a particular point in a region.
For authoring convenience, SMIL AlignmentLayout module provides severalpre-defined region registration points includingtopLeft,topMid,topRight,midLeft,center,midRight,bottomLeft,bottomMid, andbottomRight.
As a further convenience, SMIL AlignmentLayout module provides themediaAlign attribute, which defines acombination ofregAlign andregPoint attributes. For example, mediaobjects may be centered in any region usingmediaAlign as follows:
<ref ... mediaAlign="center" />
If themediaAlign attributeand either (or both) of theregPoint andregAlign attributes are used together,theregPoint and/orregAlign value(s) will override thecorresponding effectiveregPoint/regAlign value(s) defined by themediaAlign value.
The default value ofregAlignfor a region istopLeft. If theregAlignattribute is used without aregPoint attribute, the alignmentoperation is relative to the upper left point of the region containing thisobject, that is, the behavior is the same as if theregPoint were to be specified astopLeft.
Rules for handling clipping of objects within regions based on theregPointandregAlign attributes are defined below.
This section is informative.
An example is given in the following code of two registration points (withid values "midPoint" and "topMargin"), one of which is defined as a relativelocation and one at a fixed pixel location, using the SMIL AlignmentLayoutsyntax:
<layout>
<regPoint xml:id="midPoint" top="50%" left="50%" regAlign="center" />
<regPoint xml:id="topMargin" top="10" left="15" regAlign="topLeft" />
<region xml:id="a" ... />
<region xml:id="b" ... />
</layout>
In this example, the registration point with the id value "midPoint" has adefault alignment algorithm that centers the media object about the definedpoint, while the registration point with the id value "topMargin" has adefault alignment algorithm that places the top-left point of the mediaobject at the registration point.
Various media elements could be displayed in the regions using thealignment points as follows:
<ref region="a" src="rtsp://..." dur="2s" regPoint="midPoint" />
<ref region="b" src="http://..." dur="2s"
regPoint="midPoint" regAlign="bottomRight"/>
<ref region="a" src="http://..." dur="2s" regPoint="topMargin" />
<ref region="b" src="http://..." dur="2s"
regPoint="topMargin" regAlign="center"/>
In the first example, a media object is centered in the middle ofregiona. In the second example, a media object has its bottom rightcorner centered in the middle of regionb. Similarly, in the thirdexample, a media object has its top left corner placed at a point 10,15within regiona, and in the fourth example, an object is centeredaround the point 10,15 in regionb.
The following example illustrates how images may be aligned at aparticular point in a region:
<layout>
<regPoint xml:id="middle" top="50%" left="50%" regAlign="center" />
<region xml:id="a" ... />
</layout>
...
<seq>
<ref region="a" src="rtsp://..." dur="2s" regPoint="middle"
regAlign="bottomRight"/>
<ref region="a" src="http://..." dur="2s" regPoint="middle"
regAlign="bottomLeft"/>
<ref region="a" src="http://..." dur="2s" regPoint="middle"
regAlign="topLeft"/>
<ref region="a" src="http://..." dur="2s" regPoint="middle"
regAlign="topRight"/>
</seq>
In this example, four objects are aligned over time to the middle ofregion. If any media element extends outside the bounds of a region, it willbe clipped to the region.
In the following example, media objects may be centered in any regionusing pre-defined registration and alignment points:
<ref ... regPoint="center" regAlign="center" />
Note that registration points are global within the context of a layout,and are not tied to a particular region, but can be reused across regions. Assuch, pixel-based offsets should be used with care.
This section defines the elements and attributes that make up the SMILAlignmentLayout module.
This element extends the content model of thelayout element to support the registrationpoint functionality described in this section.
If the type attribute of the layout element has the value "text/smil-basic-layout", it is extended to contain thefollowing elements:
- region
- root-layout
- regPoint
TheregPoint element
TheregPoint element determinesthe (x, y) coordinates of a point relative to a region upper-left corner foruse in aligning elements in the document's body on regions within a visualrendering surface. AregPoint maybe defined using absolute (pixel) or relative (percentage) based values. TheregPoint functionality is notdefined and may not be used for media without intrinsic size.
For the purposes ofregPointfunctionality, media and regions are defined to be rectangular, withperpendicular sides, with the sides ordered clockwise top, right, bottom, andleft. The top side is the edge closest to the point or edge of the displaydevice considered "up".
- top
- This value uniquely identifies the position or the distance (using CSS2 pixel or non-negative percentage values) of the registration point relative to the top of the region. The "px" unit qualifier in pixel values may be omitted. The default value of top isauto.
- bottom
- This value uniquely identifies the position or the distance (using CSS2 pixel or non-negative percentage values) of the registration point relative to the bottom of the region. The "px" unit qualifier in pixel values may be omitted. The default value of bottom isauto.
- left
- This value uniquely identifies the position or the distance (using CSS2 pixel or non-negative percentage values) of the registration point relative to the left location of the region. The "px" unit qualifier in pixel values may be omitted. The default value of left isauto.
- right
- This value uniquely identifies the position or the distance (using CSS2 pixel or non-negative percentage values) of the registration point relative to the right location of the region. The "px" unit qualifier in pixel values may be omitted. The default value of right isauto.
- regAlign
- This attribute specifies the default alignment algorithm which is associated with aregPoint relative to the media object. The value oftopLeft is the default. The following values are allowed:
- topLeft
- Align the top-left corner of the object with the registration point.
- topMid
- Align the top-middle point of the object with the registration point. The top-middle is the point offset width/2 to the right of the object top-left corner.
- topRight
- Align the top-right corner of the object with the registration point.
- midLeft
- Align the middle-left point of the object with the registration point. The middle-left is the point offset height/2 down from the object top-left corner.
- center
- Align the center of the object with the registration point.
- midRight
- Align the middle-right point of the object with the registration point. The middle-right is the point offset height/2 down from the object top-right corner.
- bottomLeft
- Align the bottom-left corner of the object with the registration point.
- bottomMid
- Align the bottom-middle point of the object with the registration point. The bottom-middle is the point offset width/2 right from the object bottom-left corner.
- bottomRight
- Align the bottom-right corner of the object with the registration point.
None.
This module extends the definition of theregion element to include the definition ofdefault alignment policies for content in that region.
- regPoint
- This attribute is identical to theregPoint attribute on media objects defined below, except that it defines a default alignment point for all media objects placed in the region. The default value for this attribute when used on theregion element istopLeft.
- regAlign
- This attribute is identical to theregAlign attribute on media objects defined below, except that it defines a default alignment policy for all media objects placed in the region. The default value for this attribute when used on theregion element istopLeft.
- mediaAlign
- This attribute is identical to themediaAlign attribute on media objects defined below, except that it defines a default combination registration point/alignment policy for all media objects placed in the region. The default value for this attribute when used on theregion element is undefined; the default behavior of this attribute is the behavior resulting from the application of theregPoint andregAlign attributes. (Note that this defines an effective default behavior oftopLeft.)
- soundAlign
- This attribute is identical to thesoundAlign attribute on media objects defined below, except that it defines a default 2D placement of the audio portion of a media element assigned to play within the givenregion. The default value for this attribute when used on theregion element isboth.
SMIL AlignmentLayout module does not extend theregion element content model.
The AlignmentLayout module extends theref element to allow the positioning ofmedia content within a region based on the an alignment registration pointand an alignment policy.
Theref element defined in theMediaObject module is extended to include themediaAlign andregPoint attributes, both in conjunction with theregPoint element. If aregPoint attribute is missing or refersto a non-existentregPoint elementthe value of theregAlignattributes are applied to the top-left point of the region containing themedia object.
- regPoint
- This value uniquely identifies the registration point to be used for the placement of the object. The value should be an XML identifier of aregPoint element.
- The following values are predefined registration points that do not have to be declared asregPoint elements before they are used:
- topLeft
- Same as using top="0%" left="0%" on the element without theregPoint attribute.
- topMid
- Same as using top="0%" left="50%" on the element without theregPoint attribute.
- topRight
- Same as using top="0%" left="100%" on the element without theregPoint attribute.
- midLeft
- Same as using top="50%" left="0%" on the element without theregPoint attribute.
- center
- Same as using top="50%" left="50%" on the element without theregPoint attribute.
- midRight
- Same as using top="50%" left="100%" on the element without theregPoint attribute.
- bottomLeft
- Same as using top="100%" left="0%" on the element without theregPoint attribute.
- bottomMid
- Same as using top="100%" left="50%" on the element without theregPoint attribute.
- bottomRight
- Same as using top="100%" left="100%" on the element without theregPoint attribute.
- Note that the predefined registration points have the same meaning relative to the region as theregAlign attribute values have relative to the media. The default value is inherited from theregPoint value defined for the associatedregion. This implies a default behavior oftopLeft.
- regAlign
- This value uniquely identifies the registration algorithm to be used for theregPoint defined for the object, and overrides anyregAlignattribute on the referencedregPoint element. Permissible values are those defined under theregAlign attribute for theregPoint element. If used without an explicitregPoint attribute, the value is relative to the top left point of the region used by the associated media object. The default value is inherited from theregAlign value defined for the associatedregion. This implies a default behavior oftopLeft.
- mediaAlign
- This value uniquely identifies a short-hand notation for combining set combinations ofregAlign andregPoint attributes. Valid values are:
- topLeft
- Same as using theregPoint ="topLeft" andregAlign="topLeft" attributes.
- topMid
- Same as using theregPoint ="topMid" andregAlign="topMid" attributes.
- topRight
- Same as using theregPoint ="topRight" andregAlign="topRight" attributes.
- midLeft
- Same as using theregPoint ="midLeft" andregAlign="midLeft" attributes.
- center
- Same as using theregPoint ="center" andregAlign="center" attributes.
- midRight
- Same as using theregPoint ="midRight" andregAlign="midRight" attributes.
- bottomLeft
- Same as using theregPoint ="bottomLeft" andregAlign="bottomLeft" attributes.
- bottomMid
- Same as using theregPoint ="bottomMid" andregAlign="bottomMid" attributes.
- bottomRight
- Same as using theregPoint ="bottomRight" andregAlign="bottomRight" attributes.
If specified together with either (or both) of theregPoint and/orregAlign attributes, the effect values of the respective positioning attribute(s) specified bymediaAlign will be overridden by the values given forregPoint and/orregAlign. This attribute does not have a default value; the default behavior is inherited from the effective values of theregPoint andregAlign attributes. - soundAlign
- Specifies the coarse 2D placement of the audio portion of a media element assigned to play within the givenregion. The default value is inherited from theregion. The following values are allowed:
- both
- Place the audio on both channels. If stereo or other dual-channel audio is used, the audio will be reproduced on both channels, implementation permitting.
- left
- Place the audio on the left channel only. If stereo audio is used, only the left source audio will be reproduced on the left audio channel, implementation permitting.
- right
- Place the audio on the right channel only. If stereo audio is used, only the right source audio will be reproduced on the right audio channel, implementation permitting.
SMIL AlignmentLayout module does not extend theref element content model.
This module does not define any SMIL events.
If an implementation cannot support thesoundLevel attribute, it may beignored. Even when processing is ignored, the attribute must be correctlyparsed.
TheregPoint element may onlyappear as an immediate child of alayout element.
If the registration point functionality is used on a media object thatalso usessub-regionpositioning, the registration point applies to the subregion.
For registration point use, the value of thez-index attribute on the associated regionis used. If media objects overlap spatially, existing rules for resolvingz-index conflicts are applied.
Note that placement within the region may be defined in such a way as toextend the media object beyond the limits of the region. In this case themedia object must be clipped to the region boundaries.
The default value ofregAlignfor a region istopLeft. If theregAlignattribute is used without aregPoint attribute, the alignmentoperation is relative to the upper left point of the region containing thisobject, that is, the behavior is the same as if theregPoint were to be specified astopLeft.
If the registration point or alignment functionality is used on a mediaobject, the interaction between theregPoint attribute value, theregAlign attribute value, and thefit attribute value of the region in which themedia object is displayed is as follows:
- fillfit value:
- This depends on the value of theregAlign attribute. (Note: in all cases, the media must maintain proper alignment over theregPoint):
- topLeftregAlign value:
- Scale the object's height and width independently so that the content just touches the bottom and right edges of the box.
- topMidregAlign value:
- Scale the object's height and width independently so that the content just touches the bottom edge of the box, and the nearest (to theregPoint) of the left or right edges of the box.
- topRightregAlign value:
- Scale the object's height and width independently so that the content just touches the bottom and left edges of the box.
- midLeftregAlign value:
- Scale the object's height and width independently so that the content just touches the nearest (to theregPoint) of the top or bottom edges of the box, and touches the right edge of the box.
- centerregAlign value:
- Scale the object's height and width independently so that the content just touches the nearest (to theregPoint) of the top or bottom edges of the box, and touches the nearest (to theregPoint) of the left or right edges of the box.
- midRightregAlign value:
- Scale the object's height and width independently so that the content just touches the nearest (to theregPoint) of the top or bottom edges of the box, and touches the left edge of the box.
- bottomLeftregAlign value:
- Scale the object's height and width independently so that the content just touches the top and right edges of the box.
- bottomMidregAlign value:
- Scale the object's height and width independently so that the content just touches the top edge of the box, and the nearest (to theregPoint) of the left or right edges of the box.
- bottomRightregAlign value:
- Scale the object's height and width independently so that the content just touches the top and left edges of the box.
- hidden fit value:
- Align the media over the givenregPoint per theregAlign attribute. If the media so positioned extends past the bounds of the region, clip the excess media. If the media so positioned doesn't meet the bounds of the region, fill the remaining space with the background color of the region.
- meet fit value:
- This depends on the value of theregAlign attribute. Any part of the region that is not covered by the media is then filled with the region's background color. (Note: in all cases, the media must maintain proper alignment over theregPoint):
- topLeftregAlign value:
- Scale the visual media object's height and width while maintaining its aspect ratio so that the content just touches the right or bottom edge of the box while none of the content is clipped.
- topMidregAlign value:
- Scale the visual media object's height and width while maintaining its aspect ratio so that the content just touches at least one of the left, right, or bottom edges while none of the content is clipped.
- topRightregAlign value:
- Scale the visual media object's height and width while maintaining its aspect ratio so that the content just touches the left or bottom edge of the box while none of the content is clipped.
- midLeftregAlign value:
- Scale the visual media object's height and width while maintaining its aspect ratio so that the content just touches at least one of the top, right, or bottom edges while none of the content is clipped.
- centerregAlign value:
- Scale the visual media object's height and width while maintaining its aspect ratio so that the content just touches at least one of the top, left, right, or bottom edges while none of the content is clipped.
- midRightregAlign value:
- Scale the visual media object's height and width while maintaining its aspect ratio so that the content just touches at least one of the top, left, or bottom edges while none of the content is clipped.
- bottomLeftregAlign value:
- Scale the visual media object's height and width while maintaining its aspect ratio so that the content just touches the top or right edge of the box while none of the content is clipped.
- bottomMidregAlign value:
- Scale the visual media object's height and width while maintaining its aspect ratio so that the content just touches at least one of the top, left, or right edges while none of the content is clipped.
- bottomRightregAlign value:
- Scale the visual media object's height and width while maintaining its aspect ratio so that the content just touches the top or left edge of the box while none of the content is clipped.
- meetBest fit value:
- This interaction with theregAlign andregPoint attributes is identical that that of themeet fit value, with the exception that the size of the related media object is never scaled above 100%.
- scroll fit value:
- Align the media over the givenregPoint per theregAlign attribute. If any part of the media extends beyond the bounds of the region, a scrolling mechanism should be invoked that allows viewing of the media that is clipped beyond the bounds of the region.
- slice fit value:
- This depends on the value of theregAlign attribute. (Note: in all cases, the media must maintain proper alignment over theregPoint):
- topLeftregAlign value:
- Scale the visual media object's height and width while maintaining its aspect ratio so that the content just touches the right or bottom edge of the box, whichever requires the largest scale factor. Any content that extends beyond the bounds of the region is clipped.
- topMidregAlign value:
- Scale the visual media object's height and width while maintaining its aspect ratio so that the content just touches the left, right, or bottom edge of the box, whichever requires the largest scale factor. Any content that extends beyond the bounds of the region is clipped. Clipping will occur on up to two sides of the region.
- topRightregAlign value:
- Scale the visual media object's height and width while maintaining its aspect ratio so that the content just touches the left or bottom edge of the box, whichever requires the largest scale factor. Any content that extends beyond the bounds of the region is clipped.
- midLeftregAlign value:
- Scale the visual media object's height and width while maintaining its aspect ratio so that the content just touches the top, right, or bottom edge of the box, whichever requires the largest scale factor. Any content that extends beyond the bounds of the region is clipped. Clipping will occur on up to two sides of the region.
- centerregAlign value:
- Scale the visual media object's height and width while maintaining its aspect ratio so that the content just touches the top, left, right, or bottom edge of the box, whichever requires the largest scale factor. Any content that extends beyond the bounds of the region is clipped. Clipping will occur on up to three sides of the region.
- midRightregAlign value:
- Scale the visual media object's height and width while maintaining its aspect ratio so that the content just touches the top, left, or bottom edge of the box, whichever requires the largest scale factor. Any content that extends beyond the bounds of the region is clipped. Clipping will occur on up to two sides of the region.
- bottomLeftregAlign value:
- Scale the visual media object's height and width while maintaining its aspect ratio so that the content just touches the top or right edge of the box, whichever requires the largest scale factor. Any content that extends beyond the bounds of the region is clipped.
- bottomMidregAlign value:
- Scale the visual media object's height and width while maintaining its aspect ratio so that the content just touches the top, left, or right edge of the box, whichever requires the largest scale factor. Any content that extends beyond the bounds of the region is clipped. Clipping will occur on up to two sides of the region.
- bottomRightregAlign value:
- Scale the visual media object's height and width while maintaining its aspect ratio so that the content just touches the top or left edge of the box, whichever requires the largest scale factor. Any content that extends beyond the bounds of the region is clipped.
For example, a wide-screen video may be made to play in "letterbox" modein a region, whose width-to-height ratio is smaller, by usingregPoint ="center" andregAlign="center" and setting the region's fit value to "meet". The result is the video will touch the left andright edges of the region and will be centered vertically with the gaps aboveand below filled in with the region's background color.
The functionality in this module builds on top of the functionality in theBasicLayout module and theMediaObject module, which are required prerequisites for inclusion of theAlignmentLayout module.
See the fullDTD for the SMILLayout modules.
This section is normative.
The SMIL BackgroundTilingLayout module defines abackgroundImage attribute thatallows an image to be placed onto the background of a layoutregion. It also provides the samecapability for theroot-layoutand any of thetopLayoutelement(s), if supported by the language profile. This module also definesthebackgroundRepeatattribute to control tiling of the background image. These facilities areprovided as a convenience extension to SMIL's use of a background color in aregion. Although similar functionality can be defined by using a combinationof the image media object, thez-index attribute andsubregions positioning, this wouldrequire substantially more authoring effort.
The BackgroundTilingLayout module allows simple convenience tiling supportin a manner that is consistent with CSS2[CSS2]. For more complexbackground image operations such as support for animated images or non-imagebackground content, users are expected to use the standard media placementand alignment facilities available in SMIL Layout.
The opacity of the background images, whether or not tiled, is defined bythe value of thebackgroundOpacity attribute.
If abackgroundImage isdefined along with abackgroundColorattribute, the background color will be used to color any part of the background leftexposed after processing the background image.
When used with theshowBackground attribute.the background image behaves as if it were a simple background color.
This section defines thebackgroundImage andbackgroundRepeat attributes thatmake up the SMIL BackgroundTilingLayout module.
This module extends the attribute set for theregion,root-layout andtopLayout elements.
- backgroundImage
- This attribute may be used to specify an image that may be placed as the background of a region.
- In SMIL Layout, the image is treated as a single image frame; any behavior that is specified in the image (such as animations or multiple frames) will be ignored. The legal values for this attribute are:
- <uri>
- This value consists of a URI containing the location of an image to be used as a background image. If the image is larger than the background, it will be clipped as if a fit attribute of hidden was specified. If the image is smaller in either or both dimensions than the region's dimensions, it will be processed according to the value of the backgroundRepeat attribute.
- none
- This value indicates that no background image should be used.
- inherit
- This value indicates that the same background image should be used as the logical parent of this region.
- The default value isnone.
- backgroundRepeat
- This attribute allows a repeat or tiling strategy to be specified for the background image. The legal values for this attribute are:
- repeat
- This value indicates that the background image should be repeated horizontally and vertically (that is, it should be tiled).
- repeatX
- This value indicates that the background image should be repeated horizontally only.
- repeatY
- This value indicates that the background image should be repeated vertically only.
- noRepeat
- This value indicates that the background image should not be repeated.
- inherit
- This value indicates that the same background repeat policy should be used as in the logical parent of this region.
- The default value isrepeat.
The SMIL BackgroundTilingLayout module does not extend the content model forelements integrating these attributes.
This module does not define any SMIL events.
For purposes of establishing an inheritance default value, the root-layoutelement defined in SMILBasicLayoutis considered the root of the background image inheritance tree. In thiscase, bothbackgroundImageandbackgroundRepeat may beused with theroot-layout andregion elements.
For profiles implementing the SMIL MultiWindowLayout module, eachtop-level layout element is considered to define a separate root of thebackground image inheritance tree. In this case, bothbackgroundImage andbackgroundRepeat may be used withanytopLayout elements.
The functionality in this module builds on top of the functionality in theBasicLayout module, which is arequired prerequisite for inclusion of the BackgroundTilingLayout module. Ifthis functionality is to be applied to multiple top-level windows, theMultiWindowLayout module must beincluded.
See the fullDTD for the SMILLayout modules.
This section is normative.
The SMIL OverrideLayout module includes the ability to override thedefault values of thefit,z-index,backgroundColor andbackgroundOpacity attributes onobjects displayed in a (dynamically created) sub-region. This functionalitymay only be used in conjunction with sub-region positioning.
For languages and profiles integrating the AlignmentLayout module, theability to specify override behavior for theregAlign,regPoint,mediaAlign, andsoundAlign, attributes are defined aspart of that module's specification and do not need to be explicitlyspecified in the OverrideLayout module.
This module does not define any new elements. It provides extensions totheref element (and its synonyms).
ThebackgroundColor,backgroundOpacity,fit,soundLevel andz-index attributes are added to mediaobject references.
- backgroundColor
- This attribute specifies the background color that will be used in a media reference. The range of legal values are the same as thebackgroundColor attribute on theregion element. The default value for this attribute istransparent.
- backgroundOpacity
- This attribute specifies the background opacity that will be used in a media reference. The range of legal values are the same as with thebackgroundOpacity attribute under theregion element. The default value for this attribute is100%.
- soundLevel
- This attribute specifies the background opacity that will be used in a media reference. The range of legal values are the same as with thesoundLevel attribute under theregion element. The default value for this attribute is100% (0db).
- fit
- This attribute is used on a media element to override thefit attribute defined in the corresponding region definition. It takes the same values as thefit attribute on theregion element, and has the same semantics with the exception that the declaredfit only applies to the media element using it, and not to other elements which may use the same parentregion. The default value for this attribute is inherited from theregion element.
- z-index
- This attribute is used on a media element to override thez-index attribute defined in the corresponding region definition. It takes the same values as thez-index attribute on theregion element, and has the same semantics with the exception that the declaredz-index only applies to the dynamic subregion that contains the media element, and not to other elements which may use the same parentregion. The default value for this attribute is inherited from theregion element.
The SMIL OverrideLayout module does not extend the content model for theref element integrating theseattributes.
This module does not define any SMIL events.
The OverrideLayout module allows individual media object references tooverride the default values for certain attributes. In all cases, theattributes will apply only to a dynamically created sub-region that iscreated by the the activation of the media object reference. Changes will notpropagate to child sub-regions or to parent regions.
The functionality in this module builds on top of the functionality in theSubRegionLayout module, whichis a required prerequisite for inclusion of the OverrideLayout module.
See the fullDTD for the SMILLayout modules.
[8]ページ先頭