1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
3
<html xmlns="http://www.w3.org/1999/xhtml">
5
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
<title>Multimedia – SVG Tiny 1.2</title>
7
<link rel="stylesheet" href="style/svg-style.css" type="text/css"/>
8
<link rel="stylesheet" href="http://www.w3.org/StyleSheets/TR/W3C-REC" type="text/css"/>
9
<link rel="contents" href="expanded-toc.html"/>
10
<link rel="prev" href="painting.html"/>
11
<link rel="next" href="interact.html"/>
16
SVG Tiny 1.2 – 20081222
18
<li><a href="index.html">Top</a></li>
19
<li><a href="expanded-toc.html">Contents</a></li>
20
<li><a href="painting.html">Previous</a></li>
21
<li><a href="interact.html">Next</a></li>
22
<li><a href="elementTable.html">Elements</a></li>
23
<li><a href="attributeTable.html">Attributes</a></li>
26
<h1 id="multimedia">12 Multimedia</h1>
28
<h2 id="toc">Contents</h2>
30
<li>12.1 <a href="multimedia.html#Smil2Media">Media elements</a>
32
<li>12.1.1 <a href="multimedia.html#MediaTimeline">Media timeline and document timeline</a></li>
33
<li>12.1.2 <a href="multimedia.html#MediaAvailability">Media availability</a></li>
34
<li>12.1.3 <a href="multimedia.html#PlatformLimits">Platform limits</a></li>
35
<li>12.1.4 <a href="multimedia.html#AudioMixing">Audio mixing for 'audio' and 'video' elements</a></li>
36
<li>12.1.5 <a href="multimedia.html#AudioVideoControl">Discrete control of audio and video</a></li>
37
<li>12.1.6 <a href="multimedia.html#Script_Control">Controlling media playback through script</a></li>
39
<li>12.2 <a href="multimedia.html#AudioElement">The 'audio' element</a></li>
40
<li>12.3 <a href="multimedia.html#VideoElement">The 'video' element</a>
42
<li>12.3.1 <a href="multimedia.html#transformBehavior">Restricting the transformation of the 'video' element</a></li>
43
<li>12.3.2 <a href="multimedia.html#compositingBehavior">Restricting compositing of the 'video' element</a></li>
44
<li>12.3.3 <a href="multimedia.html#restrictedVideoExample">Examples</a></li>
46
<li>12.4 <a href="multimedia.html#AnimationElement">The 'animation' element</a></li>
47
<li>12.5 <a href="multimedia.html#AudioLevelProperty">The 'audio-level' property</a></li>
48
<li>12.6 <a href="multimedia.html#Smil2Sync">Attributes for runtime synchronization</a></li>
49
<li>12.7 <a href="multimedia.html#initialVisibilityMediaAttribute">The 'initialVisibility' attribute</a></li>
52
<h2 id="Smil2Media">12.1 Media elements</h2>
55
SVG supports <a href="intro.html#TermMediaElement"><span class="svg-term">media elements</span></a> similar to the
56
<a href="http://www.w3.org/TR/2005/REC-SMIL2-20051213/extended-media-object.html">SMIL 2.1 Media Elements</a>
57
([<a href="refs.html#ref-SMIL21">SMIL21</a>], chapter 7).
58
Media elements define their own timelines within their time container. All SVG media elements support the
59
<a href="animate.html#TimingAttributes">SVG timing attributes</a> and <a href="multimedia.html#Smil2Sync">runtime synchronization attributes</a>.
60
The default <a href="animate.html#event-baseElement">event-base element</a> for all SVG media elements is the element itself.
64
The following elements are media elements:
69
<a href="multimedia.html#AudioElement"><span class="element-name">'audio'</span></a>
72
<a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a>
75
<a href="multimedia.html#AnimationElement"><span class="element-name">'animation'</span></a>
79
<h3 id="MediaTimeline">12.1.1 Media timeline and document timeline</h3>
80
<p><a href="intro.html#TermMediaElement"><span class="svg-term">Media elements</span></a> start playing when they become active, i.e. at a time specified in the document timeline which depends on their <span class="attr-name">'begin'</span> attribute (see <a href="animate.html#TimingAttributes">SVG timing attributes</a>). However, depending on the value of the <a href="struct.html#SVGElementTimelineBegin"><span class="attr-name">'timelineBegin'</span></a> attribute on the <a href="intro.html#TermRootmostSVGElement"><span class="svg-term">rootmost 'svg' element</span></a>, the actual beginning of the document timeline may be delayed until the whole document is loaded. This is the case when <a href="struct.html#SVGElementTimelineBegin"><span class="attr-name">'timelineBegin'</span></a> is set to <span class="attr-value">'onLoad'</span>. In that case, the beginning of the actual playback of the media will be delayed, but the media begin time in the document timeline will remain as specified.
82
<p>Note: <a href="struct.html#ImageElement"><span class="element-name">'image'</span></a> elements are not considered as media elements because they are not timed. They start playing at time 0 in the document timeline.</p>
83
<p>The following examples illustrate this behavior:</p>
85
<div class="example"><div class="exampleheader"><strong>Example:</strong> video-timelineBegin-01.svg</div><div class="examplesource"><pre><?xml version="1.0"?>
86
<svg xml:id="A" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" baseProfile="tiny"
87
timelineBegin="onLoad"> <!-- process time = t0 -->
88
<!-- ...[many elements]... --> <!-- additional process time = t1 = 5s -->
89
<video xlink:href="myvideo.mp4" begin="0s"/> <!-- additional process time = t2 = 1s -->
93
<p>In this example, the document timeline will start after the document is fully processed, i.e. at time <var>t0</var>+<var>t1</var>+<var>t2</var> ≥ 6s. The video will start when the document is loaded. But, at that time, the document time will be 0. So, the video will start with the first frame of the video.</p>
95
<div class="example"><div class="exampleheader"><strong>Example:</strong> video-timelineBegin-02.svg</div><div class="examplesource"><pre><?xml version="1.0"?>
96
<svg xml:id="B" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" baseProfile="tiny"
97
timelineBegin="onStart"> <!-- process time = t0 -->
98
<!-- ...[many elements]... --> <!-- additional process time = t1 = 5s -->
99
<video xlink:href="myvideo.mp4" begin="0s"/> <!-- additional process time = t2 = 1s -->
100
</svg></pre></div></div>
102
<p>In this example, the document timeline will start when the <a href="struct.html#SVGElement"><span class="element-name">'svg'</span></a> element is fully parsed and processed, i.e. at time <var>t0</var>. The video will also start at document time 0, but since the video will only be processed when document time is <var>t0</var>+<var>t1</var>+<var>t2</var>, the video will start displaying the frame at time <var>t0</var>+<var>t1</var>+<var>t2</var> in the video timeline.</p>
104
<p>Furthermore, the time in the media timeline which is played, e.g. the exact frame of video or the exact sample of audio that is played, can be altered by the <a href="multimedia.html#SyncBehaviorAttribute"><span class="attr-name">'syncBehavior'</span></a> attribute. The following examples illustrate this behavior. These examples are the same as the previous ones, but the values of the <a href="multimedia.html#SyncBehaviorAttribute"><span class="attr-name">'syncBehavior'</span></a> attributes are changed from the default value <!--(<span class="attr-value">'default'</span>, interpreted as <span class="attr-value">'locked'</span> in that case since the <a href="#Smil2SyncSyncBehaviorDefault"><span class="attr-name">'syncBehaviorDefault'</span></a> is not specified)--> to <span class="attr-value">'independent'</span>.</p>
106
<div class="example"><div class="exampleheader"><strong>Example:</strong> video-timelineBegin-03.svg</div><div class="examplesource"><pre><?xml version="1.0"?>
107
<svg xml:id="A" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" baseProfile="tiny"
108
timelineBegin="onLoad"> <!-- process time = t0 -->
109
<!-- ...[many elements]... --> <!-- additional process time = t1 = 5s -->
110
<video xlink:href="myvideo.mp4" begin="0s" syncBehavior="independent"/> <!-- additional process time = t2 = 1s -->
114
<div class="example"><div class="exampleheader"><strong>Example:</strong> video-timelineBegin-04.svg</div><div class="examplesource"><pre><?xml version="1.0"?>
115
<svg xml:id="B" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" baseProfile="tiny"
116
timelineBegin="onStart"> <!-- process time = t0 -->
117
<!-- ...[many elements]... --> <!-- additional process time = t1 = 5s -->
118
<video xlink:href="myvideo.mp4" begin="0s" syncBehavior="independent"/> <!-- additional process time = t2 = 1s -->
119
</svg></pre></div></div>
121
<p>In <span class="example-ref">example video-timelineBegin-03.svg</span>, the video does not start until the document's load event, whereas in <span class="example-ref">example video-timelineBegin-04.svg</span>, the video begins as soon as the video element is parsed and the video is ready for rendering. In both cases, since the timeline of the document and of the video are independent, when the video will start, it will start from the first frame, i.e. time 0 in the media timeline.</p>
123
<h3 id="MediaAvailability">12.1.2 Media availability</h3>
124
<p>The value of the <a href="struct.html#ExternalResourcesRequiredAttribute"><span class="attr-name">'externalResourcesRequired'</span></a> attribute may also delay the actual time at which a media (even images) will start playing, but it does not affect the time in the document timeline. Indeed, media elements and the image element may require external resources referenced by the <span class="attr-name">'xlink:href'</span> attribute. If the <a href="struct.html#ExternalResourcesRequiredAttribute"><span class="attr-name">'externalResourcesRequired'</span></a> attribute is set to <span class="attr-value">'true'</span>, on the resource or on a parent in the scene tree, e.g. a <a href="struct.html#GElement"><span class="element-name">'g'</span></a> element, then this external resource has to become available before the media can start. If the <a href="struct.html#ExternalResourcesRequiredAttribute"><span class="attr-name">'externalResourcesRequired'</span></a> attribute is set to <span class="attr-value">'false'</span>, the media element or the image element will start playing as soon as it becomes active.</p>
126
<p>The meaning of "available" depends on the media type, on the protocol used to access the resource as well as on the implementation. For example, if a protocol like HTTP is used, "available" may mean that the whole resource is downloaded. It may also mean that a coarse version of the resource is available, for example in case of progressive PNG (see <a href="http://www.w3.org/TR/PNG/#4Concepts.EncodingPassAbs">PNG Pass extraction</a> ([<a href="refs.html#ref-PNG">PNG</a>], section 4.5.2)). In that case, it is an implementation choice to decide whether to display the coarse version before the whole resource is downloaded. Another example is when streaming protocols like RTSP/RTP are used. In that case, "available" usually means that enough stream has been buffered before the playback may start. To reduce the amount of time required for a media to become available, authors are encouraged to use the <a href="struct.html#PrefetchElement"><span class="element-name">'prefetch'</span></a> element to signal that external resources have to be prefetched.</p>
128
<h3 id="PlatformLimits">12.1.3 Platform limits</h3>
129
<p>Particular platforms may have restrictions on the number of audio voices or channels that can be mixed, or the number of video streams that may be presented concurrently. Since these vary, the SVG language itself does not impose any such limits on audio or video.</p>
131
<h3 id="AudioMixing">12.1.4 Audio mixing for <span class="element-name">'audio'</span> and <span class="element-name">'video'</span> elements</h3>
132
<p> If two or more audio streams from <a href="multimedia.html#AudioElement"><span class="element-name">'audio'</span></a> or <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> elements are active at the same time, their rendering should be mixed in proportions equal to the computed value of the <a href="multimedia.html#AudioLevelProperty"><span class="prop-name">'audio-level'</span></a> property of each audio stream. An audio stream may be active if it is referred to by an active audio element or if it is part of video content that is referred to by an active <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> element.</p>
134
<h3 id="AudioVideoControl">12.1.5 Discrete control of audio and video</h3>
135
<p>Authors may wish to independently control both the visual and auditory aspects of the <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> element. Through a combination of the various properties available, all permutations are possible, as described below: </p>
137
<li>play both video and audio: this is the default setting, and nothing special needs to be done</li>
138
<li>play video with no audio: use the <a href="multimedia.html#AudioLevelProperty"><span class="prop-name">'audio-level'</span></a> property with a value of <span class="prop-value">0</span></li>
139
<li>play audio with no video: use the <a href="painting.html#VisibilityProperty"><span class="prop-name">'visibility'</span></a> property with a value of <a href="painting.html#VisibilityHidden"><span class="prop-value">hidden</span></a></li>
140
<li>hide both video and audio: use the <a href="painting.html#DisplayProperty"><span class="prop-name">'display'</span></a> property with a value of <span class="prop-value">none</span></li>
143
<h3 id="Script_Control">12.1.6 Controlling media playback through script</h3>
144
<p>In addition to setting fixed timeline attribute values or using declarative animation to control the playback of <a href="intro.html#TermMediaElement"><span class="svg-term">media elements</span></a> such as <a href="multimedia.html#AudioElement"><span class="element-name">'audio'</span></a>,
145
<a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a>, and
146
<a href="multimedia.html#AnimationElement"><span class="element-name">'animation'</span></a>, SVG allows scripted control. See the uDOM section on <a href="svgudom.html#Multimedia_Control">Multimedia control</a> for details.</p>
149
<h2 id="AudioElement">12.2 The <span class="element-name">'audio'</span> element</h2>
152
The <a href="multimedia.html#AudioElement"><span class="element-name">'audio'</span></a> element specifies an audio file which is to be rendered to provide synchronized audio. The usual SMIL timing features are used to start and stop the audio at the appropriate times. An <a href="multimedia.html#AudioElementHrefAttribute"><span class="attr-name">'xlink:href'</span></a> must be used to link to the audio content. No visual representation shall be produced. However, content authors can if desired create graphical representations of control panels to start, stop, pause, rewind, or adjust the volume of audio content.
156
The <a href="multimedia.html#AudioElement"><span class="element-name">'audio'</span></a> element must reference content with an audio stream.
159
<div class="schema"><div class="schemaheader"><strong>Schema:</strong> audio<div class="schemasource"><pre> <define name='audio'>
160
<element name='audio'>
161
<ref name='audio.AT'/>
162
<ref name='audio.CM'/>
166
<define name='audio.AT' combine='interleave'>
167
<ref name='svg.Core.attr'/>
168
<ref name='svg.XLinkEmbed.attr'/>
169
<ref name='svg.Conditional.attr'/>
170
<ref name='svg.External.attr'/>
171
<ref name='svg.AnimateTiming.attr'/>
172
<ref name='svg.AnimateSync.attr'/>
173
<ref name='svg.Media.attr'/>
174
<ref name='svg.ContentTypeAnim.attr'/>
177
<define name='audio.CM'>
180
<ref name='svg.Desc.group'/>
181
<ref name='svg.Animate.group'/>
182
<ref name='svg.Handler.group'/>
183
<ref name='svg.Discard.group'/>
187
</pre></div></div></div>
189
<div class="adef-list">
191
<p><em>Attribute definitions:</em></p>
193
<dl class="definitions">
194
<dt><a id="AudioElementHrefAttribute" name="AudioElementHrefAttribute"></a> <span class="adef">xlink:href</span> = "<span class="attr-value"><a href="types.html#DataTypeIRI"><IRI></a></span>"</dt>
195
<dd><p>An <a href="linking.html#IRIReference">IRI
197
<a href="intro.html#TermInvalidIRIReference"><span class="svg-term">invalid IRI reference</span></a>
198
is an <a href="intro.html#TermUnsupportedValue"><span class="svg-term">unsupported value</span></a>. An empty string value (<span class="attr-value">xlink:href=""</span>)
199
disables playback of the element. The
200
<a href="intro.html#TermLacunaValue"><span class="svg-term">lacuna value</span></a>
201
is the empty string.</p>
202
<p>When the value of this attribute is animated or otherwise modified,
203
if the media timeline can be controlled, then the media timeline is
204
restarted only if the
205
<a href="multimedia.html#SyncBehaviorAttribute"><span class="attr-name">'syncBehavior'</span></a>
206
attribute is set to <span class="attr-value">independent</span>. If
207
the media timeline cannot be controlled, then the media timeline is
208
unaffected by such modification.</p>
209
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>:
212
<dt><a id="AudioElementTypeAttribute" name="AudioElementTypeAttribute"></a> <span class="adef">type</span> = "<span class="attr-value"><a href="types.html#DataTypeContentType"><content-type></a></span>"</dt>
214
<dd><p>The audio format. Implementations may choose not to fetch audios of formats that
215
they do not support. For optimizing download time by requiring a particular content format authors are encouraged to use
216
<a href="struct.html#RequiredFormatsAttribute"><span class="attr-name">'requiredFormats'</span></a>, instead of <a href="multimedia.html#AudioElementTypeAttribute"><span class="attr-name">'type'</span></a>.</p>
218
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>:
220
<dt><span class="adef">Runtime synchronization attributes</span></dt>
221
<dd>See <a href="multimedia.html#Smil2Sync">definition</a>.</dd>
222
<dt><span class="adef">SVG timing attributes</span></dt>
223
<dd>If the <a href="animate.html#FillAttribute"><span class="attr-name">'fill'</span></a> attribute is
224
specified, it has no effect. See <a href="animate.html#TimingAttributes">definition</a>.</dd>
229
The following example illustrates the use of the <a href="multimedia.html#AudioElement"><span class="element-name">'audio'</span></a> element. When the button is pushed, the audio file is played three times.
232
<div class="example"><div class="exampleheader"><strong>Example:</strong> media01.svg</div><div class="examplesource"><pre>
233
<svg width="100%" height="100%" version="1.2" baseProfile="tiny"
234
xmlns="http://www.w3.org/2000/svg"
235
xmlns:xlink="http://www.w3.org/1999/xlink">
237
<desc>SVG audio example</desc>
239
<audio xlink:href="ouch.ogg" audio-level="0.7" type="application/ogg"
240
begin="mybutton.click" repeatCount="3"/>
242
<g xml:id="mybutton">
243
<rect width="150" height="50" x="20" y="20" rx="10"
244
fill="#ffd" stroke="#933" stroke-width="5"/>
245
<text x="95" y="55" text-anchor="middle" font-size="30"
246
fill="#933">Press Me</text>
249
<rect x="0" y="0" width="190" height="90" fill="none" stroke="#777"/>
252
</pre></div><div class="exampleimage"><img alt="Rendering of media01.svg" src="examples/media01.png" /></div></div>
255
This specification does not mandate support for any particular audio format. Content can check for a particular audio codec with the <a href="struct.html#RequiredFormatsAttribute"><span class="attr-name">'requiredFormats'</span></a> <a href="intro.html#TermConditionalProcessingAttribute"><span class="svg-term">conditional processing attribute</span></a>.
259
<h2 id="VideoElement">12.3 The <span class="element-name">'video'</span> element</h2>
261
<p> The <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> element specifies a video file which is to be rendered to provide synchronized video. The usual SMIL timing features are used to start and stop the video at the appropriate times. An <a href="multimedia.html#VideoElementHrefAttribute"><span class="attr-name">'xlink:href'</span></a> must be used to link to the video content. It is assumed that the video content may also include an audio stream, since this is the usual way that video content is produced, and thus the audio shall be controlled by the <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> element's media attributes. </p>
263
<p>The <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> element must reference content with a video stream.
267
The <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> element produces a rendered result, and thus has <a href="multimedia.html#VideoElementWidthAttribute"><span class="attr-name">'width'</span></a>, <a href="multimedia.html#VideoElementHeightAttribute"><span class="attr-name">'height'</span></a>, <a href="multimedia.html#VideoElementXAttribute"><span class="attr-name">'x'</span></a> and <a href="multimedia.html#VideoElementYAttribute"><span class="attr-name">'y'</span></a> attributes.
270
<p>The <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> element can have two different transform behaviors, either geometric or pinned, depending on the value of the <a href="multimedia.html#transformBehaviorAttribute">transformBehavior</a> attribute. If the transform behavior is geometric, the <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> element must establish a new viewport for the referenced document as described in <a href="coords.html#EstablishingANewViewport">Establishing a new viewport</a>. In this case, the <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> element supports the <a href="painting.html#viewport-fill-property"><span class="prop-name">'viewport-fill'</span></a> and <a href="painting.html#viewport-fill-opacity-property"><span class="prop-name">'viewport-fill-opacity'</span></a> properties. The bounds for the new viewport shall be defined by attributes <a href="multimedia.html#VideoElementXAttribute"><span class="attr-name">'x'</span></a>, <a href="multimedia.html#VideoElementYAttribute"><span class="attr-name">'y'</span></a>, <a href="multimedia.html#VideoElementWidthAttribute"><span class="attr-name">'width'</span></a> and <a href="multimedia.html#VideoElementHeightAttribute"><span class="attr-name">'height'</span></a>. The placement and scaling of the referenced video shall be controlled by the <a href="coords.html#PreserveAspectRatioAttribute"><span class="attr-name">'preserveAspectRatio'</span></a> attribute on the <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> element. In the case of pinned transform behavior, a new viewport must not be established. As such, <a href="painting.html#viewport-fill-property"><span class="prop-name">'viewport-fill'</span></a>, <a href="painting.html#viewport-fill-opacity-property"><span class="prop-name">'viewport-fill-opacity'</span></a>, <a href="multimedia.html#VideoElementWidthAttribute"><span class="attr-name">'width'</span></a>, <a href="multimedia.html#VideoElementHeightAttribute"><span class="attr-name">'height'</span></a>, or <a href="coords.html#PreserveAspectRatioAttribute"><span class="attr-name">'preserveAspectRatio'</span></a> have no effect.</p>
272
<p>The value of the <a href="coords.html#ViewBoxAttribute"><span class="attr-name">'viewBox'</span></a> attribute to use when evaluating the <a href="coords.html#PreserveAspectRatioAttribute"><span class="attr-name">'preserveAspectRatio'</span></a> attribute shall be defined by the referenced content. For content that clearly identifies a <a href="coords.html#ViewBoxAttribute"><span class="attr-name">'viewBox'</span></a> that value shall be used. For most video content the bounds of the video should be used (i.e. the <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> element has an implicit <a href="coords.html#ViewBoxAttribute"><span class="attr-name">'viewBox'</span></a> of <span class="attr-value">"0 0 <var>video-width</var> <var>video-height</var>"</span>). Where no value is readily available the
274
<a href="coords.html#ViewBoxAttribute"><span class="attr-name">'preserveAspectRatio'</span></a> attribute shall be ignored.</p>
277
<div class="schema"><div class="schemaheader"><strong>Schema:</strong> video<div class="schemasource"><pre> <define name='video'>
278
<element name='video'>
279
<ref name='video.AT'/>
280
<ref name='video.CM'/>
284
<define name='video.AT' combine='interleave'>
285
<ref name='svg.Core.attr'/>
286
<ref name='svg.FocusHighlight.attr'/>
287
<ref name='svg.Media.attr'/>
288
<ref name='svg.XLinkEmbed.attr'/>
289
<ref name='svg.Conditional.attr'/>
290
<ref name='svg.External.attr'/>
291
<ref name='svg.AnimateTiming.attr'/>
292
<ref name='svg.AnimateSync.attr'/>
293
<ref name='svg.Focus.attr'/>
294
<ref name='svg.Transform.attr'/>
295
<ref name='svg.XYWH.attr'/>
296
<ref name='svg.PAR.attr'/>
297
<ref name='svg.ContentTypeAnim.attr'/>
298
<ref name='svg.InitialVisibility.attr'/>
300
<attribute name='transformBehavior' svg:animatable='no' svg:inheritable='false'>
302
<value>geometric</value>
303
<value>pinned</value>
304
<value>pinned90</value>
305
<value>pinned180</value>
306
<value>pinned270</value>
311
<attribute name='overlay' svg:animatable='no' svg:inheritable='false'>
313
<value>none</value>
314
<value>top</value>
320
<define name='video.CM'>
323
<ref name='svg.Desc.group'/>
324
<ref name='svg.Animate.group'/>
325
<ref name='svg.Handler.group'/>
326
<ref name='svg.Discard.group'/>
330
</pre></div></div></div>
333
<div class="adef-list">
335
<p><em>Attribute definitions:</em></p>
337
<dl class="definitions">
338
<dt><a id="VideoElementXAttribute" name="VideoElementXAttribute"></a> <span class="adef">x</span> = "<span class="attr-value"><a href="types.html#DataTypeCoordinate"><coordinate></a></span>"</dt>
340
<p>The <var>x</var>-axis coordinate of the rectangular region into which the video is placed. The <a href="intro.html#TermLacunaValue"><span class="svg-term">lacuna value</span></a>
341
is <span class="attr-value">'0'</span>.</p>
342
<p>If the transform behavior of the video is geometric, this coordinate is one corner of the rectangular region. If it is pinned, this coordinate is the pin point of the rectangular region.
343
See the <a href="multimedia.html#transformBehaviorAttribute"><span class="attr-name">'transformBehavior'</span></a> attribute for the interpretation of this attribute.</p>
345
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: yes.</p>
348
<dt><a id="VideoElementYAttribute" name="VideoElementYAttribute"></a> <span class="adef">y</span> = "<span class="attr-value"><a href="types.html#DataTypeCoordinate"><coordinate></a></span>"</dt>
350
<p>The <var>y</var>-axis coordinate of the rectangular region into which the video is placed. The <a href="intro.html#TermLacunaValue"><span class="svg-term">lacuna value</span></a>
351
is <span class="attr-value">'0'</span>.</p>
352
<p>If the transform behavior of the video is geometric, this coordinate is one corner of the rectangular region. If it is pinned, this coordinate is the pin point of the rectangular region.
353
See the <a href="multimedia.html#transformBehaviorAttribute"><span class="attr-name">'transformBehavior'</span></a> for the interpretation of this attribute.</p>
354
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: yes.</p>
357
<dt><a id="VideoElementWidthAttribute" name="VideoElementWidthAttribute"></a> <span class="adef">width</span> = "<span class="attr-value"><a href="types.html#DataTypeLength"><length></a></span>"</dt>
358
<dd><p>The width of the rectangular region into which the
360
A negative value shall be treated as <a href="intro.html#TermUnsupportedValue"><span class="svg-term">unsupported</span></a>.
361
The <a href="intro.html#TermLacunaValue"><span class="svg-term">lacuna value</span></a>
362
is <span class="attr-value">'0'</span>.</p>
363
<p>If the transform behavior of the video is geometric, a value of zero shall disable rendering of the element. If it is pinned, this attribute shall have no effect on rendering.</p>
365
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>:
368
<dt><a id="VideoElementHeightAttribute" name="VideoElementHeightAttribute"></a> <span class="adef">height</span> = "<span class="attr-value"><a href="types.html#DataTypeLength"><length></a></span>"</dt>
369
<dd><p>The height of the rectangular region into which the
371
A negative value shall be treated as <a href="intro.html#TermUnsupportedValue"><span class="svg-term">unsupported</span></a>.
372
The <a href="intro.html#TermLacunaValue"><span class="svg-term">lacuna value</span></a>
373
is <span class="attr-value">'0'</span>.</p>
374
<p>If the transform behavior of the video is geometric, a value of zero shall disable rendering of the element. If it is pinned, this attribute shall have no effect on rendering.</p>
375
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>:
378
<dt><a id="VideoElementHrefAttribute" name="VideoElementHrefAttribute"></a> <span class="adef">xlink:href</span> = "<span class="attr-value"><a href="types.html#DataTypeIRI"><IRI></a></span>"</dt>
379
<dd><p>An <a href="intro.html#TermIRIReference">IRI reference</a> to the video content. An
380
<a href="intro.html#TermInvalidIRIReference"><span class="svg-term">invalid IRI reference</span></a>
381
is an <a href="intro.html#TermUnsupportedValue"><span class="svg-term">unsupported value</span></a>. An empty string value (<span class="attr-value">xlink:href=""</span>) disables rendering of the element.
382
The <a href="intro.html#TermLacunaValue"><span class="svg-term">lacuna value</span></a>
383
is the empty string.</p>
384
<p>When the value of this attribute is animated or otherwise modified,
385
if the media timeline can be controlled, then the media timeline is
386
restarted only if the
387
<a href="multimedia.html#SyncBehaviorAttribute"><span class="attr-name">'syncBehavior'</span></a>
388
attribute is set to <span class="attr-value">independent</span>. If
389
the media timeline cannot be controlled, then the media timeline is
390
unaffected by such modification.</p>
391
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>:
394
<dt><a id="VideoElementPreserveAspectRatioAttribute" name="VideoElementPreserveAspectRatioAttribute"></a> <span class="adef">preserveAspectRatio</span> = <span class="attr-value">[defer] <align> [<meet>]</span></dt>
395
<dd><p>Indicates whether or not to force uniform scaling. (See the <a href="coords.html#PreserveAspectRatioAttribute"><span class="attr-name">'preserveAspectRatio'</span></a> for the syntax of <align> and the interpretation of this attribute.)</p>
396
<span class="anim-target"><a href="animate.html#Animatable">Animatable</a>: yes.</span></dd>
397
<dt><a id="VideoElementTypeAttribute" name="VideoElementTypeAttribute"></a>
398
<span class="adef">type</span> = "<span class="attr-value"><a href="types.html#DataTypeContentType"><content-type></a></span>"</dt>
399
<dd><p>The video format. Implementations may choose not to fetch videos of formats that
400
they do not support. For optimizing download time by requiring a particular content format authors are encouraged to use
401
<a href="struct.html#RequiredFormatsAttribute"><span class="attr-name">'requiredFormats'</span></a>, instead of <a href="multimedia.html#VideoElementTypeAttribute"><span class="attr-name">'type'</span></a>.</p>
402
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: yes.</p></dd>
404
<dt><a id="VideoElementTransBehaviorAttribute" name="VideoElementTransBehaviorAttribute"></a> <span class="adef">transformBehavior</span> = "<span class="attr-value">geometric</span>" | "<span class="attr-value">pinned</span>" | "<span class="attr-value">pinned90</span>" | "<span class="attr-value">pinned180</span>" | "<span class="attr-value">pinned270</span>" </dt>
405
<dd><p>See <a href="multimedia.html#transformBehaviorAttribute">attribute definition</a> for description.</p>
406
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: no.</p></dd>
408
<dt><a id="VideoElementOverlayAttribute" name="VideoElementOverlayAttribute"></a> <span class="adef">overlay</span> = "<span class="attr-value">top</span>" | "<span class="attr-value">none</span>"</dt>
409
<dd><p>See <a href="multimedia.html#compositingBehaviorAttribute">attribute definition</a> for description.</p>
410
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: no.</p></dd>
411
<dt><a id="VideoInitialVisibilityAttribute" name="videoInitialVisibilityAttribute"></a><span class="adef">initialVisibility</span> = "<span class="attr-value">whenStarted</span>" | "<span class="attr-value">always</span>"</dt>
412
<dd><p>See <a href="multimedia.html#initialVisibilityMediaAttribute">attribute definition</a> for description.</p>
413
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: no.</p></dd>
415
<dt><a id="VideoFocusableAttribute" name="videoFocusableAttribute"></a> <span class="adef">focusable</span> = "<span class="attr-value">true</span>" | "<span class="attr-value">false</span>" | "<span class="attr-value">auto</span>"</dt>
416
<dd><p>See <a href="interact.html#focusable-attr">attribute definition</a> for description.</p>
417
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: yes.</p></dd>
418
<dt><span class="adef">Navigation Attributes</span></dt>
419
<dd><p>See <a href="interact.html#specifyingnavigation">definition</a>.</p></dd>
421
<dt><span class="adef">Runtime synchronization attributes</span></dt>
422
<dd><p>See <a href="multimedia.html#Smil2Sync">definition</a>.</p></dd>
423
<dt><span class="adef">SVG timing attributes</span></dt>
424
<dd><p>See <a href="animate.html#TimingAttributes">definition</a>.</p></dd>
431
The following example illustrates the use of the <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> element. The video content is partially obscured by other graphics elements. This example shows the <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> element being rendered into an offscreen buffer and then transformed and composited in the normal way, so that it behaves like any other graphical primitive such as an image or a rectangle. In this manner, the <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> element may be scaled, rotated, skewed, displayed at various sizes, and animated.
435
<div class="example"><div class="exampleheader"><strong>Example:</strong> media02.svg</div><div class="examplesource"><pre><svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny"
436
xmlns:xlink="http://www.w3.org/1999/xlink"
437
width="420" height="340" viewBox="0 0 420 340">
438
<desc>SVG 1.2 video example</desc>
440
<circle cx="0" cy="0" r="170" fill="#da4" fill-opacity="0.3"/>
441
<video xlink:href="noonoo.avi" audio-level=".8" type="video/x-msvideo"
442
width="320" height="240" x="50" y="50" repeatCount="indefinite"/>
443
<circle cx="420" cy="340" r="170" fill="#927" fill-opacity="0.3"/>
444
<rect x="1" y="1" width="418" height="338" fill="none"
445
stroke="#777" stroke-width="1"/>
448
</pre></div><div class="exampleimage"><img alt="Rendering of media02.svg" src="examples/media02.png" /></div></div>
451
<a href="examples/noonoo.svg">Show this example</a> of the <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> element (requires an SVG Tiny 1.2 viewer and support for a Windows AVI using Motion JPEG; this is a 3.7M video file).
455
This specification does not mandate support for any particular video format. Content can check for a particular video codec with the <a href="struct.html#RequiredFormatsAttribute"><span class="attr-name">'requiredFormats'</span></a> <a href="intro.html#TermConditionalProcessingAttribute"><span class="svg-term">conditional processing attribute</span></a>.
458
<p>The content creator should be aware that video is a feature that may not be available on all target devices. In order to create interoperable content the content creator should provide a fall-back alternative by using the <a href="struct.html#SwitchElement"><span class="element-name">'switch'</span></a> element. The following feature string is defined for checking for video support: <span class="attr-value">http://www.w3.org/Graphics/SVG/feature/1.2/#Video</span>. Video may not be completely supported on a resource limited device. SVG Tiny 1.2 introduces more granular video rendering control to provide reproducible results in all environments. This control is documented in the two following sections.</p>
460
<h3 id="transformBehavior">12.3.1 Restricting the transformation of the <span class="element-name">'video'</span> element</h3>
461
<p>Transforming video is an expensive operation that should be used with caution, especially on content targeted for mobile devices. Using transformed video may also lead to non-interoperable content since not all devices will support this feature. To give the content creator control over video transformation, SVG Tiny 1.2 introduces the <a href="multimedia.html#transformBehaviorAttribute"><span class="attr-name">'transformBehavior'</span></a> attribute and a corresponding feature string: <span class="attr-value">http://www.w3.org/Graphics/SVG/feature/1.2/#TransformedVideo</span>. A viewer supporting video transformation must treat the <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> element like any other element regarding transformations. A viewer not supporting video transformation must treat the video as a point (given by the <a href="multimedia.html#VideoElementXAttribute"><span class="attr-name">'x'</span></a> and <a href="multimedia.html#VideoElementYAttribute"><span class="attr-name">'y'</span></a> attributes). The <a href="multimedia.html#VideoElementWidthAttribute"><span class="attr-name">'width'</span></a> and <a href="multimedia.html#VideoElementHeightAttribute"><span class="attr-name">'height'</span></a> attributes shall be ignored if present and instead the width and height (in device pixels) shall be taken from the media itself. The video must be displayed with its center aligned with the origin of the local coordinate system.
463
<p>A content creator can use the <a href="multimedia.html#transformBehaviorAttribute"><span class="attr-name">'transformBehavior'</span></a> attribute to explicitly choose the transform behavior on a viewer supporting transformed video. This might be of interest to increase the performance of content targeting restricted devices.</p>
466
<div class="adef-list">
468
<p><em>Attribute definition:</em></p>
470
<dl class="definitions">
472
<dt><a id="transformBehaviorAttribute" name="transformBehaviorAttribute"></a> <span class="adef">transformBehavior</span> = "<span class="attr-value">geometric</span>" | "<span class="attr-value">pinned</span>" | "<span class="attr-value">pinned90</span>" | "<span class="attr-value">pinned180</span>" | "<span class="attr-value">pinned270</span>"</dt>
475
<p>Defines whether a video is transformed/resampled (in essence treated as a geometric rectangle) or pinned/unresampled (i.e., treated as a pin point for a non-geometric blit region).</p>
476
<p>The attribute can take one of the five following values:</p>
477
<dl class="definitions">
478
<dt><span class="attr-value">geometric</span></dt>
479
<dd><p>The media shall be treated as a geometric rectangle in the local coordinate
480
system, defined by <a href="multimedia.html#VideoElementXAttribute"><span class="attr-name">'x'</span></a>,
481
<a href="multimedia.html#VideoElementYAttribute"><span class="attr-name">'y'</span></a>,
482
<a href="multimedia.html#VideoElementWidthAttribute"><span class="attr-name">'width'</span></a> and
483
<a href="multimedia.html#VideoElementHeightAttribute"><span class="attr-name">'height'</span></a>
484
attributes. The media must be resampled to fill the rectangle
485
and is subject to transformation. This is the <a href="intro.html#TermLacunaValue"><span class="svg-term">lacuna value</span></a>.</p>
488
<dt><span class="attr-value">pinned</span></dt>
489
<dd>The video is displayed without rotation.</dd>
490
<dt><span class="attr-value">pinned90</span></dt>
491
<dd>The video is displayed with a fixed rotation equivalent to the effect of <span class="attr-value">transform="rotate(90)"</span>.</dd>
492
<dt><span class="attr-value">pinned180</span></dt>
493
<dd>The video is displayed with a fixed rotation equivalent to the effect of <span class="attr-value">transform="rotate(180)"</span>. </dd>
494
<dt><span class="attr-value">pinned270</span></dt>
495
<dd>The video is displayed with a fixed rotation equivalent to the effect of <span class="attr-value">transform="rotate(270)"</span>. </dd>
500
If one of the four values <span class="attr-value">'pinned'</span>,
501
<span class="attr-value">'pinned90'</span>,
502
<span class="attr-value">'pinned180'</span> and
503
<span class="attr-value">'pinned270'</span> is specified,
504
the media shall be treated as a point, defined by <a href="multimedia.html#VideoElementXAttribute"><span class="attr-name">'x'</span></a> and
505
<a href="multimedia.html#VideoElementYAttribute"><span class="attr-name">'y'</span></a> attributes. This
506
point must be transformed to the nearest actual device pixel. Video at
507
the native resolution given by the media shall then be painted on a region
508
whose center is the pin point and whose width and height are
509
defined by the media. The pixels must be aligned to the device pixel grid
510
and there shall be no resampling.
511
The values of the <a href="multimedia.html#VideoElementWidthAttribute"><span class="attr-name">'width'</span></a>
512
and <a href="multimedia.html#VideoElementHeightAttribute"><span class="attr-name">'height'</span></a>
513
attributes in this case shall have no effect on the rendering of the video.
515
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: no.</p></dd>
520
<h3 id="compositingBehavior">12.3.2 Restricting compositing of the <span class="element-name">'video'</span> element</h3>
521
<p>For the same reasons as restricting transformations the content creator might need to restrict the compositing of video with other elements. Not all devices support compositing of the video element with other content. In that case it is necessary to render the video on top of all other svg content. SVG Tiny 1.2 therefore introduces the <a href="multimedia.html#compositingBehaviorAttribute"><span class="attr-name">'overlay'</span></a> attribute and a corresponding feature string: <span class="attr-value">http://www.w3.org/Graphics/SVG/feature/1.2/#ComposedVideo</span>. A viewer supporting compositing of video must render the <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> element according to the SVG painter's model, and thus graphical elements might be rendered on top of the video. A viewer not supporting video compositing must always render the video on top of all other SVG elements.</p>
523
<p>A content creator can use the <a href="multimedia.html#compositingBehaviorAttribute"><span class="attr-name">'overlay'</span></a> attribute to explicitly choose the compositing behavior on a viewer supporting composited video. This may increase the performance of content that is targeted at restricted devices.</p>
526
<div class="adef-list">
528
<p><em>Attribute definition:</em></p>
530
<dl class="definitions">
531
<dt id="OverlayAttribute"><a id="compositingBehaviorAttribute" name="compositingBehaviorAttribute"></a> <span class="adef">overlay</span> = "<span class="attr-value">top</span>" | "<span class="attr-value">none</span>"</dt>
534
Defines whether a <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a>
535
is rendered according to the SVG painter's model or if it must be
536
positioned on top of all other SVG elements.
539
The attribute value can be either of the following:
541
<dl class="definitions">
542
<dt><span class="attr-value">top</span></dt>
543
<dd>The <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> element must not be composited on to the background as usual. Instead a temporary video canvas must be set aside and drawn last in the whole document's compositing process.</dd>
544
<dt><span class="attr-value">none</span></dt>
545
<dd>The <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> must be rendered according to the SVG painter's model. This is the <a href="intro.html#TermLacunaValue"><span class="svg-term">lacuna value</span></a>.</dd>
547
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: no.</p></dd>
553
<p>If multiple <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> elements have <span class="attr-value">overlay="top"</span>, the drawing order of those <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> elements follows the typical SVG rendering order.</p>
556
<h3 id="restrictedVideoExample">12.3.3 Examples</h3>
557
<p>The following example illustrates the use of the <span class="attr-value">http://www.w3.org/Graphics/SVG/feature/1.2/#TransformedVideo</span> feature string. A <a href="struct.html#SwitchElement"><span class="element-name">'switch'</span></a> element is wrapped around two groups. The first group will render a scaled and rotated video sequence on a viewer supporting video transformations while the second group will render the untransformed video on viewers that don't support video transformations.</p>
559
<div class="example"><div class="exampleheader"><strong>Example:</strong> <a href="examples/media04.svg">media04.svg</a></div><div class="examplesource"><pre><svg version="1.2" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg"
560
xmlns:xlink="http://www.w3.org/1999/xlink"
561
width="100%" height="100%" viewBox="0 0 400 300">
562
<desc>Example of switching on the http://www.w3.org/Graphics/SVG/feature/1.2/#TransformedVideo feature string</desc>
565
<!-- Transformed video group -->
566
<g requiredFeatures="http://www.w3.org/Graphics/SVG/feature/1.2/#TransformedVideo"
567
transform="translate(-21,-34) scale(1.24) rotate(-30)">
568
<rect x="6" y="166" width="184" height="140" fill="none" stroke="blue"
569
stroke-width="4" />
570
<video xlink:href="ski.avi" audio-level=".8" type="video/x-msvideo"
571
x="10" y="170" width="176" height="132"/>
574
<!-- Untransformed video group -->
576
<rect x="6" y="166" width="184" height="140" fill="none" stroke="blue"
577
stroke-width="4"/>
578
<video xlink:href="ski.avi" audio-level=".8" type="video/x-msvideo"
583
</pre></div><div class="exampleimage"><img alt="Rendering of media04.svg" src="examples/media04.png" /></div></div>
586
The above images show the rendering of <span class="example-ref">Example media04</span> in
587
two SVG user agents: the first one supporting transformed video (on the left) and the
588
second one not (on the right).
591
<p>The following example illustrates the use of the <span class="attr-value">http://www.w3.org/Graphics/SVG/feature/1.2/#ComposedVideo</span> feature string. A <a href="struct.html#SwitchElement"><span class="element-name">'switch'</span></a> element is wrapped around two groups. The first group must render a video with text composited on top on viewers supporting composed video while the second group must render a video with text placed above the video on viewers that do not support composed video.</p>
593
<div class="example"><div class="exampleheader"><strong>Example:</strong> <a href="examples/media05.svg">media05.svg</a></div><div class="examplesource"><pre><?xml version="1.1"?>
594
<svg version="1.2" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg"
595
xmlns:xlink="http://www.w3.org/1999/xlink"
596
width="100%" height="100%" viewBox="0 0 400 300">
597
<desc>Example of switching on the http://www.w3.org/Graphics/SVG/feature/1.2/#ComposedVideo feature string</desc>
598
<rect x="2" y="2" width="396" height="296" fill="none" stroke="black"
599
stroke-width="2" />
600
<rect x="106" y="66" width="184" height="140" fill="none" stroke="blue"
601
stroke-width="4" />
605
<!-- Composited video group -->
606
<g transform="translate(100 0)" requiredFeatures="http://www.w3.org/Graphics/SVG/feature/1.2/#ComposedVideo">
607
<video xlink:href="ski.avi" audio-level=".8" type="video/x-msvideo"
608
x="10" y="70" width="176" height="132"/>
609
<text x="20" y="100" fill-opacity="0.5" fill="blue" font-size="20">Composited title.</text>
612
<!-- Overlayed video group -->
613
<g transform="translate(100 0)" font-size="18">
614
<video xlink:href="ski.avi" audio-level=".8" type="video/x-msvideo"
615
x="10" y="70" overlay="top" width="176" height="132"/>
616
<text x="15" y="60" fill="blue" fill-opacity="0.5" >Non-composited title.</text>
621
<div class="exampleimage">
622
<img src="examples/media05-1.PNG" alt="screenshot of composited video" width="400" height="300" />
623
<img src="examples/media05-2.png" alt="screenshot of video that is overlayed" width="400" height="300" />
627
The above images show the rendering of <span class="example-ref">Example media05</span> in
628
two SVG user agents: the first one supporting composed video (on the left) and the
629
second one not (on the right).
632
<h2 id="AnimationElement">12.4 The <span class="element-name">'animation'</span> element</h2>
635
The <a href="multimedia.html#AnimationElement"><span class="element-name">'animation'</span></a> elements specifies an SVG document providing synchronized animated vector graphics. Like <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a>, the <a href="multimedia.html#AnimationElement"><span class="element-name">'animation'</span></a> element is a graphical object with size determined by its
636
<a href="multimedia.html#AnimationElementXAttribute"><span class="attr-name">'x'</span></a>,
637
<a href="multimedia.html#AnimationElementYAttribute"><span class="attr-name">'y'</span></a>,
638
<a href="multimedia.html#AnimationElementWidthAttribute"><span class="attr-name">'width'</span></a> and
639
<a href="multimedia.html#AnimationElementHeightAttribute"><span class="attr-name">'height'</span></a>
640
attributes. Furthermore, the <a href="multimedia.html#AnimationElement"><span class="element-name">'animation'</span></a> element supports timing and synchronization attributes which allow multiple animations to run with independent timelines
641
in the same SVG document.
642
Just like <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> and
643
<a href="struct.html#ImageElement"><span class="element-name">'image'</span></a>, the
644
<a href="multimedia.html#AnimationElement"><span class="element-name">'animation'</span></a> element must not point to document
645
fragments within SVG files.
648
An <a href="multimedia.html#AnimationElement"><span class="element-name">'animation'</span></a> element establishes a new viewport for the referenced
650
<a href="coords.html#EstablishingANewViewport">Establishing a new viewport</a>. The bounds for the new viewport are defined by attributes
651
<a href="multimedia.html#AnimationElementXAttribute"><span class="attr-name">'x'</span></a>,
652
<a href="multimedia.html#AnimationElementYAttribute"><span class="attr-name">'y'</span></a>,
653
<a href="multimedia.html#AnimationElementWidthAttribute"><span class="attr-name">'width'</span></a> and
654
<a href="multimedia.html#AnimationElementHeightAttribute"><span class="attr-name">'height'</span></a>.
655
The <a href="coords.html#PreserveAspectRatioAttribute"><span class="attr-name">'preserveAspectRatio'</span></a> attribute on the <a href="intro.html#TermRootmostSVGElement"><span class="svg-term">rootmost 'svg' element</span></a> in the referenced SVG document shall be
656
ignored (as are its <a href="struct.html#SVGElementWidthAttribute"><span class="attr-name">'width'</span></a> and <a href="struct.html#SVGElementHeightAttribute"><span class="attr-name">'height'</span></a> attributes). Instead, the
657
<a href="coords.html#PreserveAspectRatioAttribute"><span class="attr-name">'preserveAspectRatio'</span></a> attribute on the referencing <a href="multimedia.html#AnimationElement"><span class="element-name">'animation'</span></a> element shall define how the
658
SVG content is fitted into the viewport. The same rule applies for the
659
<a href="painting.html#viewport-fill-property"><span class="prop-name">'viewport-fill'</span></a>
660
and <a href="painting.html#viewport-fill-opacity-property"><span class="prop-name">'viewport-fill-opacity'</span></a> properties.
663
The value of the <a href="coords.html#ViewBoxAttribute">
664
<span class="attr-name">'viewBox'</span></a>
665
attribute to use when evaluating the
666
<a href="coords.html#PreserveAspectRatioAttribute"><span class="attr-name">'preserveAspectRatio'</span></a> attribute is defined by the referenced document's
667
<a href="coords.html#ViewBoxAttribute"><span class="attr-name">'viewBox'</span></a> value.
668
When no value is available the
669
<a href="coords.html#PreserveAspectRatioAttribute"><span class="attr-name">'preserveAspectRatio'</span></a>
670
attribute must be ignored, and only the translation due to the
671
<a href="multimedia.html#AnimationElementXAttribute"><span class="attr-name">'x'</span></a> and
672
<a href="multimedia.html#AnimationElementYAttribute"><span class="attr-name">'y'</span></a>
673
attributes of the viewport must be used to display the content.
676
The referenced SVG document represents a separate document which
677
generates its own parse tree and document object model. Thus, there is
678
no inheritance of properties into the referenced animation. For details,
679
see <a href="linking.html#externalReferences">Processing of external references to documents</a>.
682
The SVG specification does not specify when an animation that is not
683
being displayed should be loaded. A user agent is not required to load
684
animation data for an animation that is not displayed (e.g.
685
<span class="attr-value">display="none"</span>). However, it should be noted that this may cause a delay
686
when an animation becomes visible for the first time. In the case where
687
an author wants to suggest that the user agent load animation data
688
before it is displayed, they should use the <a href="struct.html#PrefetchElement"><span class="element-name">'prefetch'</span></a> element.
691
<div class="schema"><div class="schemaheader"><strong>Schema:</strong> animation<div class="schemasource"><pre> <define name='animation'>
692
<element name='animation'>
693
<ref name='animation.AT'/>
694
<ref name='animation.CM'/>
698
<define name='animation.AT' combine='interleave'>
699
<ref name='svg.Core.attr'/>
700
<ref name='svg.FocusHighlight.attr'/>
701
<ref name='svg.Media.attr'/>
702
<ref name='svg.Conditional.attr'/>
703
<ref name='svg.External.attr'/>
704
<ref name='svg.XLinkEmbed.attr'/>
705
<ref name='svg.Focus.attr'/>
706
<ref name='svg.AnimateTiming.attr'/>
707
<ref name='svg.AnimateSync.attr'/>
708
<ref name='svg.XYWH.attr'/>
709
<ref name='svg.PAR.attr'/>
710
<ref name='svg.Transform.attr'/>
711
<ref name='svg.InitialVisibility.attr'/>
714
<define name='animation.CM'>
717
<ref name='svg.Desc.group'/>
718
<ref name='svg.Animate.group'/>
719
<ref name='svg.Discard.group'/>
720
<ref name='svg.Handler.group'/>
724
</pre></div></div></div>
725
<div class="adef-list">
727
<p><em>Attribute definitions:</em></p>
728
<dl class="definitions">
729
<dt><a id="AnimationElementXAttribute" name="AnimationElementXAttribute"></a> <span class="adef">x</span> = "<span class="attr-value"><a href="types.html#DataTypeCoordinate"><coordinate></a></span>"</dt>
730
<dd><p>The <var>x</var>-axis coordinate of one corner of the rectangular
731
region into which the animation is placed.
732
The <a href="intro.html#TermLacunaValue"><span class="svg-term">lacuna value</span></a>
733
is <span class="attr-value">'0'</span>.</p>
734
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>:
737
<dt><a id="AnimationElementYAttribute" name="AnimationElementYAttribute"></a> <span class="adef">y</span> = "<span class="attr-value"><a href="types.html#DataTypeCoordinate"><coordinate></a></span>"</dt>
738
<dd><p>The <var>y</var>-axis coordinate of one corner of the rectangular
739
region into which the animation is placed.
740
The <a href="intro.html#TermLacunaValue"><span class="svg-term">lacuna value</span></a>
741
is <span class="attr-value">'0'</span>.</p>
742
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>:
745
<dt><a id="AnimationElementWidthAttribute" name="AnimationElementWidthAttribute"></a> <span class="adef">width</span> = "<span class="attr-value"><a href="types.html#DataTypeLength"><length></a></span>"</dt>
746
<dd><p>The width of the rectangular region into which the
748
A negative value is <a href="intro.html#TermUnsupportedValue"><span class="svg-term">unsupported</span></a>.
749
A value of zero must disable rendering of the element.
750
The <a href="intro.html#TermLacunaValue"><span class="svg-term">lacuna value</span></a>
751
is <span class="attr-value">'0'</span>.</p>
752
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>:
755
<dt><a id="AnimationElementHeightAttribute" name="AnimationElementHeightAttribute"></a> <span class="adef">height</span> = "<span class="attr-value"><a href="types.html#DataTypeLength"><length></a></span>"</dt>
756
<dd><p>The height of the rectangular region into which the
758
A negative value is <a href="intro.html#TermUnsupportedValue"><span class="svg-term">unsupported</span></a>.
759
A value of zero must disable rendering of the element.
760
The <a href="intro.html#TermLacunaValue"><span class="svg-term">lacuna value</span></a>
761
is <span class="attr-value">'0'</span>.</p>
762
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>:
765
<dt><a id="AnimationElementHrefAttribute" name="AnimationElementHrefAttribute"></a> <span class="adef">xlink:href</span> = "<span class="attr-value"><a href="types.html#DataTypeIRI"><IRI></a></span>"</dt>
766
<dd><p>An <a href="intro.html#TermIRIReference"><span class="svg-term">IRI
767
reference</span></a> to the animation data. An
768
<a href="intro.html#TermInvalidIRIReference"><span class="svg-term">invalid IRI reference</span></a>
769
is an <a href="intro.html#TermUnsupportedValue"><span class="svg-term">unsupported value</span></a>. An empty attribute value (<span class="attr-value">xlink:href=""</span>) disables rendering of the element.
770
The <a href="intro.html#TermLacunaValue"><span class="svg-term">lacuna value</span></a>
771
is the empty string.</p>
772
<p>When the value of this attribute is animated or otherwise modified,
773
if the media timeline can be controlled, then the media timeline is
774
restarted only if the
775
<a href="multimedia.html#SyncBehaviorAttribute"><span class="attr-name">'syncBehavior'</span></a>
776
attribute is set to <span class="attr-value">independent</span>. If
777
the media timeline cannot be controlled, then the media timeline is
778
unaffected by such modification.</p>
779
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>:
782
<dt><a id="AnimationElementPreserveAspectRatioAttribute" name="AnimationElementPreserveAspectRatioAttribute"></a> <span class="adef">preserveAspectRatio</span> = <span class="attr-value">["defer"] <align> [<meet>]</span></dt>
783
<dd><p>Indicates whether or not to force uniform scaling. (See <a href="coords.html#PreserveAspectRatioAttribute">The <span class="attr-name">'preserveAspectRatio'</span> attribute</a> for the
784
syntax of <align> and the interpretation of this attribute.)</p>
785
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>:
788
<dt><a id="AnimationInitialVisibilityAttribute" name="animationInitialVisibilityAttribute"></a><span class="adef">initialVisibility</span> = "<span class="attr-value">whenStarted</span>" | "<span class="attr-value">always</span>"</dt>
789
<dd><p>See <a href="multimedia.html#initialVisibilityMediaAttribute">attribute definition</a> for description.</p>
790
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: no.</p></dd>
792
<dt><a id="AnimationFocusableAttribute" name="animationFocusableAttribute"></a> <span class="adef">focusable</span> = "<span class="attr-value">true</span>" | "<span class="attr-value">false</span>" | "<span class="attr-value">auto</span>"</dt>
793
<dd><p>See <a href="interact.html#focusable-attr">attribute definition</a> for description.</p>
794
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: yes.</p></dd>
795
<dt><span class="adef">Navigation Attributes</span></dt>
796
<dd><p>See <a href="interact.html#specifyingnavigation">definition</a>.</p></dd>
798
<dt><span class="adef">Runtime synchronization attributes</span></dt>
799
<dd><p>See <a href="multimedia.html#Smil2Sync">definition</a>.</p></dd>
800
<dt><span class="adef">SVG timing attributes</span></dt>
801
<dd><p>See <a href="animate.html#TimingAttributes">definition</a>.</p></dd>
810
<p>The example below shows basic usage of the <a href="multimedia.html#AnimationElement"><span class="element-name">'animation'</span></a> element. For another example, see the <a href="linking.html#useVsAnimationExample">use and animation example</a> in the Linking chapter.</p>
812
<div class="example"><div class="exampleheader"><strong>Example:</strong> media03.svg</div><div class="examplesource"><pre>
813
<svg xmlns="http://www.w3.org/2000/svg"
814
xmlns:xlink="http://www.w3.org/1999/xlink"
815
version="1.2" baseProfile="tiny">
816
<desc>Example of two animation elements pointing to the same content.</desc>
818
<animation begin="1" dur="3" repeatCount="1.5" fill="freeze"
819
x="100" y="100" width="50" height="50"
820
xlink:href="bouncingBall.svg"/>
822
<animation begin="2" x="300" y="100" width="50" height="50"
823
xlink:href="bouncingBall.svg"/>
827
<h2 id="AudioLevelProperty">12.5 The <span class="prop-name">'audio-level'</span> property</h2>
830
The <a href="multimedia.html#AudioLevelProperty"><span class="prop-name">'audio-level'</span></a> property can be applied to the <a href="multimedia.html#AudioElement"><span class="element-name">'audio'</span></a>, <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a>
831
and <a href="multimedia.html#AnimationElement"><span class="element-name">'animation'</span></a> elements described above, the <a href="struct.html#UseElement"><span class="element-name">'use'</span></a> element,
832
plus <a href="intro.html#TermContainerElement"><span class="svg-term">container elements</span></a>
833
such as the <a href="struct.html#GElement"><span class="element-name">'g'</span></a> element.
836
<div class="propdef">
839
<span class="propdef-title prop-name">'audio-level'</span>
842
<table summary="audio-level property" class="propinfo" cellspacing="0" cellpadding="0">
843
<tr valign="baseline">
844
<td><em>Value:</em></td>
845
<td> <span><number></span> | <a class="noxref" href="http://www.w3.org/TR/CSS2/cascade.html#value-def-inherit"> <span class="value-inst-inherit noxref">inherit</span></a>
847
<tr valign="baseline">
848
<td><em>Initial:</em></td>
851
<tr valign="baseline">
852
<td><em>Applies to:</em></td>
853
<td> <a href="intro.html#TermMediaElement"><span class="svg-term">media elements</span></a>, <a href="struct.html#UseElement"><span class="element-name">'use'</span></a> and <a href="intro.html#TermContainerElement"><span class="svg-term">container elements</span></a>
855
<tr valign="baseline">
856
<td><em>Inherited:</em></td>
859
<tr valign="baseline">
860
<td><em>Percentages:</em></td>
863
<tr valign="baseline">
864
<td><em>Media:</em></td>
867
<tr valign="baseline">
868
<td><em>Animatable:</em></td>
871
<tr valign="baseline">
872
<td><em>Computed value: </em></td>
873
<td> Specified value, except inherit
879
The <a href="multimedia.html#AudioLevelProperty"><span class="prop-name">'audio-level'</span></a> property specifies a value that
880
is used to calculate the volume of a particular element. Values below 1.0
881
decrease it and a value of zero silences it.
885
An element's volume is the product of its clamped
886
<a href="multimedia.html#AudioLevelProperty"><span class="prop-name">'audio-level'</span></a> property and either the clamped
887
computed value of its parent, or the initial value (1.0) if it has no parent.
888
Audio level clamping occurs for any values outside the range 0.0 (silent) to
889
1.0 (system volume). (See <a href="implnote.html#RangeClamping">Clamping
890
values which are restricted to a particular range</a>.)
894
<em>This sentence is informative:</em> An element's volume cannot be louder than the
895
volume of its parent.
899
The output signal level is calculated using the logarithmic scale described below (where <var>vol</var> is the value of the element volume):
902
<pre>dB change in signal level = 20 * log10(vol)</pre>
904
<p>User agents may limit the actual signal level to some maximum, based on user preferences and hardware limitations.</p>
907
If the element has an element volume of 0, then the output signal must be inaudible. If the element has an element volume of 1, then the output signal must be at the system volume level. Neither the <a href="multimedia.html#AudioLevelProperty"><span class="prop-name">'audio-level'</span></a> property nor the element volume override the system volume setting.
912
<h2 id="Smil2Sync">12.6 Attributes for runtime synchronization</h2>
914
SVG Tiny 1.2 supports the five attributes listed below from <a href="../../2005/REC-SMIL2-20051213/index.html">SMIL 2.1</a> to control runtime synchronization of timed elements.
915
In SVG Tiny 1.2 the <a href="multimedia.html#SyncBehaviorAttribute"><span class="attr-name">'syncBehavior'</span></a>, <a href="multimedia.html#SyncToleranceAttribute"><span class="attr-name">'syncTolerance'</span></a> and <a href="multimedia.html#SyncMasterAttribute"><span class="attr-name">'syncMaster'</span></a> attributes can be specified on the <a href="multimedia.html#AudioElement"><span class="element-name">'audio'</span></a>, <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> and <a href="multimedia.html#AnimationElement"><span class="element-name">'animation'</span></a> elements.
916
The <a href="multimedia.html#SyncBehaviorDefaultAttribute"><span class="attr-name">'syncBehaviorDefault'</span></a> and <a href="multimedia.html#SyncToleranceDefaultAttribute"><span class="attr-name">'syncToleranceDefault'</span></a> attributes can be specified on the <a href="struct.html#SVGElement"><span class="element-name">'svg'</span></a> element.
919
<div class="adef-list">
920
<p><em>Attribute definitions:</em></p>
921
<dl class="definitions">
922
<dt><a id="SyncBehaviorAttribute" name="syncBehaviorAttribute"></a> <span class="adef">syncBehavior</span> = "<span class="attr-value">canSlip</span>" | "<span class="attr-value">locked</span>" | "<span class="attr-value">independent</span>" | "<span class="attr-value">default</span>"</dt>
925
See the <a href="http://www.w3.org/TR/2005/REC-SMIL2-20051213/smil-timing#adef-syncBehavior">SMIL 2.1 definition of 'syncBehavior'</a>
926
([<a href="refs.html#ref-SMIL21">SMIL21</a>], section 10.4.1).
928
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: no.</p></dd>
930
<dt><a id="SyncBehaviorDefaultAttribute" name="syncBehaviorDefaultAttribute"></a> <span class="adef">syncBehaviorDefault</span> = "<span class="attr-value">canSlip</span>" | "<span class="attr-value">locked</span>" | "<span class="attr-value">independent</span>" | "<span class="attr-value">inherit</span>"</dt>
933
See the <a href="http://www.w3.org/TR/2005/REC-SMIL2-20051213/smil-timing#adef-syncBehaviorDefault">SMIL 2.1 definition of 'syncBehaviorDefault'</a>
934
([<a href="refs.html#ref-SMIL21">SMIL21</a>], section 10.4.1).
936
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: no.</p></dd>
938
<dt><a id="SyncToleranceAttribute" name="syncToleranceAttribute"></a> <span class="adef">syncTolerance</span> = <span class="attr-value">"<a href="types.html#DataTypeClock-value"><Clock-value></a></span>" | "<span class="attr-value">default</span>"</dt>
941
See the <a href="http://www.w3.org/TR/2005/REC-SMIL2-20051213/smil-timing#adef-syncTolerance">SMIL 2.1 definition of 'syncTolerance'</a>
942
([<a href="refs.html#ref-SMIL21">SMIL21</a>], section 10.4.1).
944
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: no.</p></dd>
946
<dt><a id="SyncToleranceDefaultAttribute" name="syncToleranceDefaultAttribute"></a> <span class="adef">syncToleranceDefault</span> = <span class="attr-value">"<a href="types.html#DataTypeClock-value"><Clock-value></a></span>" | "<span class="attr-value">inherit</span>"</dt>
949
See the <a href="http://www.w3.org/TR/2005/REC-SMIL2-20051213/smil-timing#adef-syncToleranceDefault">SMIL 2.1 definition of 'syncToleranceDefault'</a>
950
([<a href="refs.html#ref-SMIL21">SMIL21</a>], section 10.4.1).
952
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: no.</p></dd>
954
<dt><a id="SyncMasterAttribute" name="syncMasterAttribute"></a> <span class="adef">syncMaster</span> = <span class="attr-value">"<a href="types.html#DataTypeBoolean"><boolean></a>"</span></dt>
957
See the <a href="http://www.w3.org/TR/2005/REC-SMIL2-20051213/smil-timing#adef-syncMaster">SMIL 2.1 definition of 'syncMaster'</a>
958
([<a href="refs.html#ref-SMIL21">SMIL21</a>], section 10.4.1).
960
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: no.</p></dd>
964
<h4 id="SyncExample">Example: video content synchronized with some text</h4>
965
<p>The two files below illustrate how it is possible to make sure some video content can be synchronized with some text using the synchronization attributes.</p>
966
<div class="example"><div class="exampleheader"><strong>Example:</strong> <a href="examples/sync-attr-main.svg">sync-attr-main.svg</a></div><div class="examplesource"><pre><?xml version="1.0"?>
967
<svg xmlns="http://www.w3.org/2000/svg"
968
xmlns:xlink="http://www.w3.org/1999/xlink"
969
version="1.2" baseProfile="tiny"
970
viewBox="0 0 400 100" height="100%" width="100%" syncBehaviorDefault="locked">
972
<title>Sync* Attributes</title>
973
<desc>An example which illustrates the use of sync* attributes</desc>
975
<video x="10" y="10" xml:id="myclip"
976
xlink:href="rtsp://www.example.org/mysong.m4v" syncMaster="true"/>
977
<animation x="10" y="50" xml:id="mylyrics" xlink:href="timed-lyrics.svg"/>
978
</svg> </pre></div></div>
980
<div class="example"><div class="exampleheader"><strong>Example:</strong> <a href="examples/timed-lyrics.svg">timed-lyrics.svg</a></div><div class="examplesource"><pre><?xml version="1.0"?>
981
<svg xmlns="http://www.w3.org/2000/svg"
982
xmlns:xlink="http://www.w3.org/1999/xlink"
983
version="1.2" baseProfile="tiny"
984
viewBox="0 0 400 100" height="100%" width="100%">
986
<title>Synchronizing lyrics with video</title>
987
<desc>This document contains the textual lyrics to synchronize with some video content in the referencing document</desc>
989
<g fill="blue" font-family="Arial" font-size="10" transform="translate(20, 20)">
990
<text xml:id="Text0" display="none">This is some text</text>
991
<set xlink:href="#Text0" attributeName="display" to="inline" begin="0" end="1"/>
992
<text xml:id="Text10" display="none">simulating some lyrics</text>
993
<set xlink:href="#Text10" attributeName="display" to="inline" begin="1.1" end="2"/>
994
<text xml:id="Text20" display="none">displayed synchronously</text>
995
<set xlink:href="#Text20" attributeName="display" to="inline" begin="2.1" end="3"/>
996
<text xml:id="Text30" display="none">with some video</text>
997
<set xlink:href="#Text30" attributeName="display" to="inline" begin="3.1" end="4"/>
998
<text xml:id="Text40" display="none">in a different document</text>
999
<set xlink:href="#Text40" attributeName="display" to="inline" begin="4.1" end="5"/>
1001
</svg> </pre></div></div>
1002
<p>Since the timed elements (<a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> and <a href="multimedia.html#AnimationElement"><span class="element-name">'animation'</span></a>) do not specify their runtime synchronization behavior using the <a href="multimedia.html#SyncBehaviorAttribute"><span class="attr-name">'syncBehavior'</span></a> attribute, the behavior is deduced from the <a href="multimedia.html#SyncBehaviorDefaultAttribute"><span class="attr-name">'syncBehaviorDefault'</span></a> attribute on the nearest ancestor, in this case on the <a href="struct.html#SVGElement"><span class="element-name">'svg'</span></a> element.</p>
1003
<p>This attribute has the value <span class="attr-value">'locked'</span>, which means that all the <a href="intro.html#TermTimedElement"><span class="svg-term">timed elements</span></a> in the subtree share the same timeline. In this case, the main scene timeline, the <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> and <a href="multimedia.html#AnimationElement"><span class="element-name">'animation'</span></a> timelines are then locked to each other.</p>
1004
<p>Then, the master is given to the video, which means that if the video is stalled in the streaming session, the timeline of the video will be paused and, as a consequence, the timeline of the lyrics and of the main scene will be paused as well.</p>
1006
<h2 id="initialVisibilityMediaAttribute">12.7 The <span class="attr-name">'initialVisibility'</span> attribute</h2>
1008
The <a href="multimedia.html#InitialVisibilityAttribute"><span class="attr-name">'initialVisibility'</span></a> attribute applies to visual media elements (<a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> and <a href="multimedia.html#AnimationElement"><span class="element-name">'animation'</span></a>) and is used to control the visibility of the media object before its first active duration period has started. A visible media element that is visible before activation shall have its first frame displayed. For an <a href="multimedia.html#AnimationElement"><span class="element-name">'animation'</span></a> element this means the referenced file rendered at time 0. For a <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> element it means the first frame of the video sequence.
1011
<div class="adef-list">
1012
<p><em>Attribute definition:</em></p>
1013
<dl class="definitions">
1014
<dt><a id="InitialVisibilityAttribute" name="initialVisibilityAttribute"></a> <span class="adef">initialVisibility</span> = "<span class="attr-value">whenStarted</span>" | "<span class="attr-value">always</span>"</dt>
1015
<dd><p>Controls the visibility of the media object before its first active duration period has started.</p>
1016
<p>The attribute value can be either of the following:</p>
1017
<dl class="definitions">
1018
<dt><span class="attr-value">whenStarted</span></dt>
1019
<dd><p>The <a href="intro.html#TermLacunaValue"><span class="svg-term">lacuna value</span></a>. Indicates that the media object is not displayed, as though the element had <span class="attr-value">display="none"</span>, until its first active duration starts.</p>
1021
<dt><span class="attr-value">always</span></dt>
1022
<dd><p>The media element is visible from the initialization of the parent time container (i.e. time 0 of the parent SVG document).
1023
During this time, and until the active duration starts, the media element is initialized but remains <a href="intro.html#TermInactiveElement"><span class="svg-term">inactive</span></a>.</p></dd>
1025
<p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: no.</p></dd>
1031
<div class="footer">
1032
SVG Tiny 1.2 – 20081222
1034
<li><a href="index.html">Top</a></li>
1035
<li><a href="expanded-toc.html">Contents</a></li>
1036
<li><a href="painting.html">Previous</a></li>
1037
<li><a href="interact.html">Next</a></li>
1038
<li><a href="elementTable.html">Elements</a></li>
1039
<li><a href="attributeTable.html">Attributes</a></li>