~ubuntu-branches/ubuntu/oneiric/w3-recs/oneiric

« back to all changes in this revision

Viewing changes to www.w3.org/TR/2008/REC-SVGTiny12-20081222/multimedia.html

  • Committer: Bazaar Package Importer
  • Author(s): Colin Darie, Stefano Zacchiroli, Colin Darie
  • Date: 2011-01-07 17:15:16 UTC
  • mfrom: (1.1.4 upstream) (1.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110107171516-klmadnjiktybzswf
Tags: 20110107-1
[ Stefano Zacchiroli ]
* debian/TODO.Debian: add pending TODO items

[ Colin Darie ]
* New maintainer. (Closes: #579786)
* List of recommendations (REC) changes (Closes: #604968):
  - Associating Style Sheets with XML documents 1.0 (Second Edition)
    (updated 28/10/2010)
  - Device Description Repository Simple API (new 05/12/2008)
  - EMMA: Extensible MultiModal Annotation markup language
    (new 10/02/2009)
  - Element Traversal Specification (new 22/12/2008)
  - Extensible Markup Language (XML) 1.0 (Fifth Edition)
    (updated 26/11/2008)
  - Mobile Web Best Practices 1.0 (new 29/07/2008)
  - Namespaces in XML 1.0 (Third Edition) (updated 08/12/2009)
  - OWL 2 Web Ontology Language Conformance (new 27/10/2009)
  - OWL 2 Web Ontology Language Direct Semantics (new 27/10/2009)
  - OWL 2 Web Ontology Language Document Overview (new 27/10/2009)
  - OWL 2 Web Ontology Language Mapping to RDF Graphs (new 27/10/2009)
  - OWL 2 Web Ontology Language New Features and Rationale
    (new 27/10/2009)
  - OWL 2 Web Ontology Language Primer (new 27/10/2009)
  - OWL 2 Web Ontology Language Profiles (new 27/10/2009)
  - OWL 2 Web Ontology Language Quick Reference Guide (new 27/10/2009)
  - OWL 2 Web Ontology Language RDF-Based Semantics (new 27/10/2009)
  - OWL 2 Web Ontology Language Structural Specification and
    Functional-Style Syntax (new 27/10/2009)
  - OWL 2 Web Ontology Language XML Serialization (new 27/10/2009)
  - Pronunciation Lexicon Specification (PLS) Version 1.0
    (new 14/10/2008)
  - Protocol for Web Description Resources (POWDER): Description Resources
    (new 01/09/2009)
  - Protocol for Web Description Resources (POWDER): Formal Semantics
    (new 01/09/2009)
  - Protocol for Web Description Resources (POWDER): Grouping of Resources
    (new 01/09/2009)
  - RDFa in XHTML: Syntax and Processing (new 14/10/2008)
  - RIF Basic Logic Dialect (new 22/06/2010)
  - RIF Core Dialect (new 22/06/2010)
  - RIF Datatypes and Built-Ins 1.0 (new 22/06/2010)
  - RIF Framework for Logic Dialects (new 22/06/2010)
  - RIF Production Rule Dialect (new 22/06/2010)
  - RIF RDF and OWL Compatibility (new 22/06/2010)
  - SKOS Simple Knowledge Organization System Reference (new 18/08/2009)
  - Scalable Vector Graphics (SVG) Tiny 1.2 Specification
    (new 22/12/2008)
  - Service Modeling Language Interchange Format Version 1.1
    (new 12/05/2009)
  - Service Modeling Language, Version 1.1 (new 12/05/2009)
  - Speech Syn8hesis Markup Language (SSML) Version 1.1 (new 07/09/2010)
  - Synchronized Multimedia Integration Language (SMIL 3.0)
    (updated 01/12/2008)
  - W3C mobileOK Basic Tests 1.0 (new 08/12/2008)
  - Web Content Accessibility Guidelines (WCAG) 2.0 (new 11/12/2008)
  - Web Security Context: User Interface Guidelines (new 12/08/2010)
  - WebCGM 2.1 (new 01/03/2010)
  - XForms 1.1 (updated 20/10/2009)
  - XHTML-Print - Second Edition (new 23/11/2010)
  - XHTML™ 1.1 - Module-based XHTML (updated 07/10/2010)
  - XHTML™ Basic 1.1 - Second Edition (updated 07/10/2010)
  - XHTML™ Modularization 1.1 - Second Edition (new 29/07/2010)
  - XML Base (Second Edition) (updated 28/01/2009)
  - XML Entity Definitions for Characters (new 01/04/2010)
  - XML Linking Language (XLink) Version 1.1 (new 06/05/2010)
  - XML Path Language (XPath) 2.0 (Second Edition) (new 14/12/2010)
  - XML Syntax for XQuery 1.0 (XQueryX) (Second Edition) (new 14/12/2010)
  - XProc: An XML Pipeline Language (new 11/05/2010)
  - XQuery 1.0 and XPath 2.0 Data Model (XDM) (Second Edition)
    (updated 14/12/2010)
  - XQuery 1.0 and XPath 2.0 Formal Semantics (Second Edition)
    (updated 14/12/2010)
  - XQuery 1.0 and XPath 2.0 Functions and Operators (Second Edition)
    (updated 14/12/2010)
  - XQuery 1.0: An XML Query Language (Second Edition) (new 14/12/2010)
  - XSLT 2.0 and XQuery 1.0 Serialization (Second Edition)
    (updated 14/12/2010)
  - rdf:PlainLiteral: A Datatype for RDF Plain Literals (new 27/10/2009)
* From now, this package include PR and CR: added a NEWS entry about it
* List of PR and CR changes (some of them were previously included as REC):
  - A MathML for CSS Profile (new PR 10/08/2010)
  - CSS Color Module Level 3 (new PR 28/10/2010)
  - CSS Marquee Module Level 3 (new CR 05/12/2008)
  - CSS Mobile Profile 2.0 (new CR 10/12/2008)
  - CSS Multi-column Layout Module (new CR 17/12/2009)
  - CSS Namespaces Module (new CR 23/05/2008)
  - CSS Style Attributes (new CR 12/10/2010)
  - CSS TV Profile 1.0 (new CR 14/05/2003)
  - CSS3 Basic User Interface Module (new CR 11/05/2004)
  - CSS3 Ruby Module (new CR 14/05/2003)
  - Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification
    (updated CR 23/04/2009)
  - Character Model for the World Wide Web 1.0: Resource Identifiers
    (new CR 22/11/2004)
  - Digital Signatures for Widgets (new CR 24/06/2010)
  - Efficient XML Interchange (EXI) Format 1.0 (new CR 08/12/2009)
  - Geolocation API Specification (new CR 07/09/2010)
  - Mathematical Markup Language (MathML) Version 3.0 (new PR 10/08/2010)
  - Media Queries (new CR 27/07/2010)
  - Mobile Web Application Best Practices (new PR 21/10/2010)
  - Selectors API Level 1 (new CR 22/12/2009)
  - Selectors Level 3 (new PR 15/12/2009)
  - The 'view-mode' Media Feature (new CR 24/06/2010)
  - Timed Text Markup Language (TTML) 1.0 (new PR 14/09/2010)
  - Voice Browser Call Control: CCXML Version 1.0 (new CR 01/04/2010)
  - W3C XML Schema Definition Language (XSD): Component Designators
    (new CR 19/01/2010)
  - Web Services Choreography Description Language Version 1.0
    (new CR 09/11/2005)
  - Widget Access Request Policy (new CR 20/04/2010)
  - XForms 1.0 Basic Profile (new CR 14/10/2003)
  - XML Binding Language (XBL) 2.0 (new CR 16/03/2007)
  - XML Fragment Interchange (new CR 12/02/2001)
  - XMLHttpRequest (new CR 03/08/2010)
  - XQuery Update Facility 1.0 (new CR 09/06/2009)
  - XQuery Update Facility 1.0 Requirements (new CR 14/03/2008)
  - XQuery Update Facility 1.0 Use Cases (new CR 14/03/2008)
  - XQuery and XPath Full Text 1.0 (new CR 28/01/2010)
* Bump Standard-Version to 3.9.1 (no changes required)
* debian/control.in
  - Converting repo from svn to git: update Vcs-* fields accordingly
  - Added Depends: ${misc:Depends} as recommended by debhelper
* debian/rules:
  - Redirect output of wget to a logfile
  - Ignore .jar extension
  - Exclude a javadoc/ directory: this would break the doc-base process
  - Added a fix-paths target because of broken links in the tr.rdf
  - Ignore error status returned by wget because of broken links,
    so the download target can be fully completed
  - wrap lines > 80 char in control-index.txt copied in debian/control to
    avoid lintian warnings
* Patches:
  - Switch to 3.0 (quilt) source format
  - Drop rec-dom2-html-url patch, no longer necessary
  - Add fix-link-REC-PICS-labels-961031.patch
  - Convert (and update) css-local-images.patch
* Clean up TODO.Debian
* debian/README.source: explicit the steps to build the package from git
* Added unapply-patches to debian/source/local-options

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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">
 
4
  <head>
 
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"/>
 
12
</head>
 
13
<body>
 
14
 
 
15
<div class="header">
 
16
  SVG Tiny 1.2 – 20081222
 
17
  <ul>
 
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>
 
24
  </ul>
 
25
</div>
 
26
<h1 id="multimedia">12 Multimedia</h1>
 
27
 
 
28
<h2 id="toc">Contents</h2>
 
29
<ul class="toc">
 
30
  <li>12.1 <a href="multimedia.html#Smil2Media">Media elements</a>
 
31
    <ul class="toc">
 
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>
 
38
    </ul></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>
 
41
    <ul class="toc">
 
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>
 
45
    </ul></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>
 
50
</ul>
 
51
 
 
52
 <h2 id="Smil2Media">12.1 Media elements</h2>
 
53
 
 
54
 <p>
 
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.  
 
61
 </p>
 
62
 
 
63
 <p>
 
64
  The following elements are media elements:
 
65
 </p>
 
66
 
 
67
 <ul>
 
68
  <li>
 
69
   <a href="multimedia.html#AudioElement"><span class="element-name">'audio'</span></a>
 
70
   </li>
 
71
  <li>
 
72
   <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a>
 
73
  </li>
 
74
  <li>
 
75
   <a href="multimedia.html#AnimationElement"><span class="element-name">'animation'</span></a>
 
76
  </li>
 
77
 </ul>
 
78
 
 
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.
 
81
</p>
 
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>
 
84
 
 
85
<div class="example"><div class="exampleheader"><strong>Example:</strong> video-timelineBegin-01.svg</div><div class="examplesource"><pre>&lt;?xml version="1.0"?&gt;
 
86
&lt;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"&gt;          &lt;!-- process time = t0 --&gt;
 
88
&lt;!-- ...[many elements]... --&gt;               &lt;!-- additional process time = t1 = 5s --&gt;
 
89
&lt;video xlink:href="myvideo.mp4" begin="0s"/&gt; &lt;!-- additional process time = t2 = 1s --&gt;
 
90
&lt;/svg&gt;
 
91
</pre></div></div>
 
92
 
 
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>
 
94
 
 
95
<div class="example"><div class="exampleheader"><strong>Example:</strong> video-timelineBegin-02.svg</div><div class="examplesource"><pre>&lt;?xml version="1.0"?&gt;
 
96
&lt;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"&gt;         &lt;!-- process time = t0 --&gt;
 
98
&lt;!-- ...[many elements]... --&gt;               &lt;!-- additional process time = t1 = 5s --&gt;
 
99
&lt;video xlink:href="myvideo.mp4" begin="0s"/&gt; &lt;!-- additional process time = t2 = 1s --&gt;
 
100
&lt;/svg&gt;</pre></div></div>
 
101
 
 
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>
 
103
 
 
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>
 
105
 
 
106
<div class="example"><div class="exampleheader"><strong>Example:</strong> video-timelineBegin-03.svg</div><div class="examplesource"><pre>&lt;?xml version="1.0"?&gt;
 
107
&lt;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"&gt;          &lt;!-- process time = t0 --&gt;
 
109
&lt;!-- ...[many elements]... --&gt;               &lt;!-- additional process time = t1 = 5s --&gt;
 
110
&lt;video xlink:href="myvideo.mp4" begin="0s" syncBehavior="independent"/&gt; &lt;!-- additional process time = t2 = 1s --&gt;
 
111
&lt;/svg&gt;
 
112
</pre></div></div>
 
113
<br />
 
114
<div class="example"><div class="exampleheader"><strong>Example:</strong> video-timelineBegin-04.svg</div><div class="examplesource"><pre>&lt;?xml version="1.0"?&gt;
 
115
&lt;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"&gt;         &lt;!-- process time = t0 --&gt;
 
117
&lt;!-- ...[many elements]... --&gt;               &lt;!-- additional process time = t1 = 5s --&gt;
 
118
&lt;video xlink:href="myvideo.mp4" begin="0s" syncBehavior="independent"/&gt; &lt;!-- additional process time = t2 = 1s --&gt;
 
119
&lt;/svg&gt;</pre></div></div>
 
120
 
 
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>
 
122
 
 
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>
 
125
 
 
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>
 
127
 
 
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>
 
130
 
 
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>
 
133
 
 
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>
 
136
 <ul>
 
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>
 
141
 </ul>
 
142
 
 
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>
 
147
 
 
148
 
 
149
<h2 id="AudioElement">12.2 The <span class="element-name">'audio'</span> element</h2>
 
150
 
 
151
<p>
 
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.
 
153
</p>
 
154
 
 
155
<p>
 
156
The <a href="multimedia.html#AudioElement"><span class="element-name">'audio'</span></a> element must reference content with an audio stream.
 
157
</p>
 
158
 
 
159
<div class="schema"><div class="schemaheader"><strong>Schema:</strong> audio<div class="schemasource"><pre>    &lt;define name='audio'&gt;
 
160
      &lt;element name='audio'&gt;
 
161
        &lt;ref name='audio.AT'/&gt;
 
162
        &lt;ref name='audio.CM'/&gt;
 
163
      &lt;/element&gt;
 
164
    &lt;/define&gt;
 
165
 
 
166
    &lt;define name='audio.AT' combine='interleave'&gt;
 
167
      &lt;ref name='svg.Core.attr'/&gt;
 
168
      &lt;ref name='svg.XLinkEmbed.attr'/&gt;
 
169
      &lt;ref name='svg.Conditional.attr'/&gt;
 
170
      &lt;ref name='svg.External.attr'/&gt;
 
171
      &lt;ref name='svg.AnimateTiming.attr'/&gt;
 
172
      &lt;ref name='svg.AnimateSync.attr'/&gt;
 
173
      &lt;ref name='svg.Media.attr'/&gt;
 
174
      &lt;ref name='svg.ContentTypeAnim.attr'/&gt;
 
175
    &lt;/define&gt;
 
176
 
 
177
    &lt;define name='audio.CM'&gt;
 
178
      &lt;zeroOrMore&gt;
 
179
        &lt;choice&gt;
 
180
          &lt;ref name='svg.Desc.group'/&gt;
 
181
          &lt;ref name='svg.Animate.group'/&gt;
 
182
          &lt;ref name='svg.Handler.group'/&gt;
 
183
          &lt;ref name='svg.Discard.group'/&gt;
 
184
        &lt;/choice&gt;
 
185
      &lt;/zeroOrMore&gt;
 
186
    &lt;/define&gt;
 
187
</pre></div></div></div>
 
188
 
 
189
 <div class="adef-list">
 
190
 
 
191
   <p><em>Attribute definitions:</em></p>
 
192
 
 
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">&lt;IRI&gt;</a></span>"</dt>
 
195
     <dd><p>An <a href="linking.html#IRIReference">IRI
 
196
         reference</a>. An
 
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>:
 
210
     yes.</p></dd>
 
211
 
 
212
 <dt><a id="AudioElementTypeAttribute" name="AudioElementTypeAttribute"></a> <span class="adef">type</span> = "<span class="attr-value"><a href="types.html#DataTypeContentType">&lt;content-type&gt;</a></span>"</dt>
 
213
 
 
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>
 
217
 
 
218
    <p class="anim-target"><a href="animate.html#Animatable">Animatable</a>:
 
219
yes.</p></dd>
 
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>
 
225
   </dl>
 
226
 </div>
 
227
 
 
228
<p>
 
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.
 
230
</p>
 
231
 
 
232
<div class="example"><div class="exampleheader"><strong>Example:</strong> media01.svg</div><div class="examplesource"><pre>
 
233
&lt;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"&gt;
 
236
 
 
237
  &lt;desc&gt;SVG audio example&lt;/desc&gt;
 
238
 
 
239
  &lt;audio xlink:href="ouch.ogg" audio-level="0.7" type="application/ogg"
 
240
        begin="mybutton.click" repeatCount="3"/&gt;
 
241
 
 
242
  &lt;g xml:id="mybutton"&gt;
 
243
    &lt;rect width="150" height="50" x="20" y="20" rx="10"
 
244
      fill="#ffd" stroke="#933" stroke-width="5"/&gt;
 
245
    &lt;text x="95" y="55" text-anchor="middle" font-size="30"
 
246
      fill="#933"&gt;Press Me&lt;/text&gt;
 
247
  &lt;/g&gt;
 
248
 
 
249
  &lt;rect x="0" y="0" width="190" height="90" fill="none" stroke="#777"/&gt;
 
250
 
 
251
&lt;/svg&gt;
 
252
</pre></div><div class="exampleimage"><img alt="Rendering of media01.svg" src="examples/media01.png" /></div></div>
 
253
 
 
254
<p>
 
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>.
 
256
</p>
 
257
 
 
258
 
 
259
<h2 id="VideoElement">12.3 The <span class="element-name">'video'</span> element</h2>
 
260
 
 
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>
 
262
 
 
263
<p>The <a href="multimedia.html#VideoElement"><span class="element-name">'video'</span></a> element must reference content with a video stream.
 
264
    </p>
 
265
 
 
266
<p>
 
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.
 
268
</p>
 
269
 
 
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>
 
271
 
 
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
 
273
 
 
274
 <a href="coords.html#ViewBoxAttribute"><span class="attr-name">'preserveAspectRatio'</span></a> attribute shall be ignored.</p>
 
275
 
 
276
 
 
277
 <div class="schema"><div class="schemaheader"><strong>Schema:</strong> video<div class="schemasource"><pre>    &lt;define name='video'&gt;
 
278
      &lt;element name='video'&gt;
 
279
        &lt;ref name='video.AT'/&gt;
 
280
        &lt;ref name='video.CM'/&gt;
 
281
      &lt;/element&gt;
 
282
    &lt;/define&gt;
 
283
 
 
284
    &lt;define name='video.AT' combine='interleave'&gt;
 
285
      &lt;ref name='svg.Core.attr'/&gt;
 
286
      &lt;ref name='svg.FocusHighlight.attr'/&gt;
 
287
      &lt;ref name='svg.Media.attr'/&gt;
 
288
      &lt;ref name='svg.XLinkEmbed.attr'/&gt;
 
289
      &lt;ref name='svg.Conditional.attr'/&gt;
 
290
      &lt;ref name='svg.External.attr'/&gt;
 
291
      &lt;ref name='svg.AnimateTiming.attr'/&gt;
 
292
      &lt;ref name='svg.AnimateSync.attr'/&gt;
 
293
      &lt;ref name='svg.Focus.attr'/&gt;
 
294
      &lt;ref name='svg.Transform.attr'/&gt;
 
295
      &lt;ref name='svg.XYWH.attr'/&gt;
 
296
      &lt;ref name='svg.PAR.attr'/&gt;
 
297
      &lt;ref name='svg.ContentTypeAnim.attr'/&gt;
 
298
      &lt;ref name='svg.InitialVisibility.attr'/&gt;
 
299
      &lt;optional&gt;
 
300
        &lt;attribute name='transformBehavior' svg:animatable='no' svg:inheritable='false'&gt;
 
301
          &lt;choice&gt;
 
302
            &lt;value&gt;geometric&lt;/value&gt;
 
303
            &lt;value&gt;pinned&lt;/value&gt;
 
304
            &lt;value&gt;pinned90&lt;/value&gt;
 
305
            &lt;value&gt;pinned180&lt;/value&gt;
 
306
            &lt;value&gt;pinned270&lt;/value&gt;
 
307
          &lt;/choice&gt;
 
308
        &lt;/attribute&gt;
 
309
      &lt;/optional&gt;
 
310
      &lt;optional&gt;
 
311
        &lt;attribute name='overlay' svg:animatable='no' svg:inheritable='false'&gt;
 
312
          &lt;choice&gt;
 
313
            &lt;value&gt;none&lt;/value&gt;
 
314
            &lt;value&gt;top&lt;/value&gt;
 
315
          &lt;/choice&gt;
 
316
        &lt;/attribute&gt;
 
317
      &lt;/optional&gt;
 
318
    &lt;/define&gt;
 
319
 
 
320
    &lt;define name='video.CM'&gt;
 
321
      &lt;zeroOrMore&gt;
 
322
        &lt;choice&gt;
 
323
          &lt;ref name='svg.Desc.group'/&gt;
 
324
          &lt;ref name='svg.Animate.group'/&gt;
 
325
          &lt;ref name='svg.Handler.group'/&gt;
 
326
          &lt;ref name='svg.Discard.group'/&gt;
 
327
        &lt;/choice&gt;
 
328
      &lt;/zeroOrMore&gt;
 
329
    &lt;/define&gt;
 
330
</pre></div></div></div>
 
331
 
 
332
 
 
333
 <div class="adef-list">
 
334
 
 
335
   <p><em>Attribute definitions:</em></p>
 
336
 
 
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">&lt;coordinate&gt;</a></span>"</dt>
 
339
     <dd>
 
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>
 
344
        
 
345
      <p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: yes.</p>
 
346
      </dd>
 
347
 
 
348
     <dt><a id="VideoElementYAttribute" name="VideoElementYAttribute"></a> <span class="adef">y</span> = "<span class="attr-value"><a href="types.html#DataTypeCoordinate">&lt;coordinate&gt;</a></span>"</dt>
 
349
     <dd>
 
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>
 
355
      </dd>
 
356
 
 
357
     <dt><a id="VideoElementWidthAttribute" name="VideoElementWidthAttribute"></a> <span class="adef">width</span> = "<span class="attr-value"><a href="types.html#DataTypeLength">&lt;length&gt;</a></span>"</dt>
 
358
     <dd><p>The width of the rectangular region into which the
 
359
         video is placed.
 
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>
 
364
 
 
365
      <p class="anim-target"><a href="animate.html#Animatable">Animatable</a>:
 
366
     yes.</p></dd>
 
367
 
 
368
     <dt><a id="VideoElementHeightAttribute" name="VideoElementHeightAttribute"></a> <span class="adef">height</span> = "<span class="attr-value"><a href="types.html#DataTypeLength">&lt;length&gt;</a></span>"</dt>
 
369
     <dd><p>The height of the rectangular region into which the
 
370
         video is placed.
 
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>:
 
376
     yes.</p></dd>
 
377
 
 
378
     <dt><a id="VideoElementHrefAttribute" name="VideoElementHrefAttribute"></a> <span class="adef">xlink:href</span> = "<span class="attr-value"><a href="types.html#DataTypeIRI">&lt;IRI&gt;</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>:
 
392
     yes.</p></dd>
 
393
 
 
394
    <dt><a id="VideoElementPreserveAspectRatioAttribute" name="VideoElementPreserveAspectRatioAttribute"></a> <span class="adef">preserveAspectRatio</span> = <span class="attr-value">[defer] &lt;align&gt; [&lt;meet&gt;]</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 &lt;align&gt; 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">&lt;content-type&gt;</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>
 
403
 
 
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>
 
407
 
 
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>
 
414
 
 
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>
 
420
 
 
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>
 
425
   </dl>
 
426
 
 
427
 </div>
 
428
 
 
429
 
 
430
<p>
 
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.
 
432
 
 
433
</p>
 
434
 
 
435
<div class="example"><div class="exampleheader"><strong>Example:</strong> media02.svg</div><div class="examplesource"><pre>&lt;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"&gt;
 
438
  &lt;desc&gt;SVG 1.2 video example&lt;/desc&gt;
 
439
    &lt;g&gt;
 
440
    &lt;circle cx="0" cy="0" r="170" fill="#da4" fill-opacity="0.3"/&gt;
 
441
    &lt;video xlink:href="noonoo.avi" audio-level=".8" type="video/x-msvideo"
 
442
         width="320" height="240" x="50" y="50" repeatCount="indefinite"/&gt;
 
443
    &lt;circle cx="420" cy="340" r="170" fill="#927" fill-opacity="0.3"/&gt;
 
444
    &lt;rect x="1" y="1" width="418" height="338" fill="none"
 
445
       stroke="#777" stroke-width="1"/&gt;
 
446
    &lt;/g&gt;
 
447
&lt;/svg&gt;
 
448
</pre></div><div class="exampleimage"><img alt="Rendering of media02.svg" src="examples/media02.png" /></div></div>
 
449
 
 
450
<p>
 
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).
 
452
</p>
 
453
 
 
454
<p>
 
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>.
 
456
</p>
 
457
 
 
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>
 
459
 
 
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.
 
462
</p>
 
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>
 
464
 
 
465
 
 
466
 <div class="adef-list">
 
467
 
 
468
   <p><em>Attribute definition:</em></p>
 
469
 
 
470
   <dl class="definitions">
 
471
 
 
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>
 
473
 
 
474
     <dd>
 
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>
 
486
                 </dd>
 
487
 
 
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>
 
496
 
 
497
          </dl>
 
498
 
 
499
          <p>
 
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.
 
514
          </p>
 
515
      <p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: no.</p></dd>
 
516
</dl>
 
517
 </div>
 
518
 
 
519
 
 
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>
 
522
 
 
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>
 
524
 
 
525
 
 
526
<div class="adef-list">
 
527
 
 
528
   <p><em>Attribute definition:</em></p>
 
529
 
 
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>
 
532
     <dd>
 
533
       <p>
 
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.
 
537
       </p>
 
538
       <p>
 
539
         The attribute value can be either of the following:
 
540
       </p>
 
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>
 
546
       </dl>
 
547
      <p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: no.</p></dd>
 
548
</dl>
 
549
</div>
 
550
 
 
551
 
 
552
 
 
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>
 
554
 
 
555
 
 
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>
 
558
 
 
559
<div class="example"><div class="exampleheader"><strong>Example:</strong> <a href="examples/media04.svg">media04.svg</a></div><div class="examplesource"><pre>&lt;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"&gt;
 
562
     &lt;desc&gt;Example of switching on the http://www.w3.org/Graphics/SVG/feature/1.2/#TransformedVideo feature string&lt;/desc&gt;
 
563
     &lt;switch&gt;
 
564
 
 
565
       &lt;!-- Transformed video group --&gt;
 
566
       &lt;g requiredFeatures="http://www.w3.org/Graphics/SVG/feature/1.2/#TransformedVideo"
 
567
             transform="translate(-21,-34) scale(1.24) rotate(-30)"&gt;
 
568
         &lt;rect x="6" y="166" width="184" height="140" fill="none" stroke="blue"
 
569
                  stroke-width="4" /&gt;
 
570
         &lt;video xlink:href="ski.avi" audio-level=".8" type="video/x-msvideo"
 
571
                   x="10" y="170" width="176" height="132"/&gt;
 
572
       &lt;/g&gt;
 
573
 
 
574
       &lt;!-- Untransformed video group --&gt;
 
575
       &lt;g&gt;
 
576
         &lt;rect  x="6" y="166" width="184" height="140" fill="none" stroke="blue"
 
577
                  stroke-width="4"/&gt;
 
578
         &lt;video xlink:href="ski.avi" audio-level=".8" type="video/x-msvideo"
 
579
                   x="98" y="236"/&gt;
 
580
       &lt;/g&gt;
 
581
     &lt;/switch&gt;
 
582
&lt;/svg&gt; 
 
583
</pre></div><div class="exampleimage"><img alt="Rendering of media04.svg" src="examples/media04.png" /></div></div>
 
584
 
 
585
<p>
 
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).
 
589
</p>
 
590
 
 
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>
 
592
 
 
593
<div class="example"><div class="exampleheader"><strong>Example:</strong> <a href="examples/media05.svg">media05.svg</a></div><div class="examplesource"><pre>&lt;?xml version="1.1"?&gt;
 
594
&lt;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"&gt;
 
597
     &lt;desc&gt;Example of switching on the http://www.w3.org/Graphics/SVG/feature/1.2/#ComposedVideo feature string&lt;/desc&gt;
 
598
     &lt;rect x="2" y="2" width="396" height="296" fill="none" stroke="black"
 
599
                  stroke-width="2" /&gt;
 
600
     &lt;rect x="106" y="66" width="184" height="140" fill="none" stroke="blue"
 
601
                  stroke-width="4" /&gt;
 
602
 
 
603
     &lt;switch&gt;
 
604
 
 
605
       &lt;!-- Composited video group --&gt;
 
606
       &lt;g transform="translate(100 0)" requiredFeatures="http://www.w3.org/Graphics/SVG/feature/1.2/#ComposedVideo"&gt;
 
607
         &lt;video xlink:href="ski.avi" audio-level=".8" type="video/x-msvideo"
 
608
                   x="10" y="70" width="176" height="132"/&gt;
 
609
         &lt;text x="20" y="100" fill-opacity="0.5" fill="blue" font-size="20"&gt;Composited title.&lt;/text&gt;
 
610
       &lt;/g&gt;
 
611
 
 
612
       &lt;!-- Overlayed video group --&gt;
 
613
       &lt;g transform="translate(100 0)" font-size="18"&gt;
 
614
         &lt;video xlink:href="ski.avi" audio-level=".8" type="video/x-msvideo"
 
615
                   x="10" y="70" overlay="top" width="176" height="132"/&gt;
 
616
         &lt;text x="15" y="60" fill="blue" fill-opacity="0.5" &gt;Non-composited title.&lt;/text&gt;
 
617
       &lt;/g&gt;
 
618
     &lt;/switch&gt;
 
619
&lt;/svg&gt;     
 
620
</pre></div></div>
 
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" />
 
624
</div>
 
625
 
 
626
<p>
 
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).
 
630
</p>
 
631
 
 
632
<h2 id="AnimationElement">12.4 The <span class="element-name">'animation'</span> element</h2>
 
633
 
 
634
<p>
 
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.
 
646
</p>
 
647
<p>
 
648
An <a href="multimedia.html#AnimationElement"><span class="element-name">'animation'</span></a> element establishes a new viewport for the referenced
 
649
file as described in
 
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.
 
661
</p>
 
662
<p>
 
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.
 
674
</p>
 
675
<p>
 
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>.
 
680
</p>
 
681
<p>
 
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.
 
689
</p>
 
690
 
 
691
<div class="schema"><div class="schemaheader"><strong>Schema:</strong> animation<div class="schemasource"><pre>    &lt;define name='animation'&gt;
 
692
      &lt;element name='animation'&gt;
 
693
        &lt;ref name='animation.AT'/&gt;
 
694
        &lt;ref name='animation.CM'/&gt;
 
695
      &lt;/element&gt;
 
696
    &lt;/define&gt;
 
697
 
 
698
    &lt;define name='animation.AT' combine='interleave'&gt;
 
699
      &lt;ref name='svg.Core.attr'/&gt;
 
700
      &lt;ref name='svg.FocusHighlight.attr'/&gt;
 
701
      &lt;ref name='svg.Media.attr'/&gt;
 
702
      &lt;ref name='svg.Conditional.attr'/&gt;
 
703
      &lt;ref name='svg.External.attr'/&gt;
 
704
      &lt;ref name='svg.XLinkEmbed.attr'/&gt;
 
705
      &lt;ref name='svg.Focus.attr'/&gt;
 
706
      &lt;ref name='svg.AnimateTiming.attr'/&gt;
 
707
      &lt;ref name='svg.AnimateSync.attr'/&gt;
 
708
      &lt;ref name='svg.XYWH.attr'/&gt;
 
709
      &lt;ref name='svg.PAR.attr'/&gt;
 
710
      &lt;ref name='svg.Transform.attr'/&gt;
 
711
      &lt;ref name='svg.InitialVisibility.attr'/&gt;
 
712
    &lt;/define&gt;
 
713
 
 
714
    &lt;define name='animation.CM'&gt;
 
715
      &lt;zeroOrMore&gt;
 
716
        &lt;choice&gt;
 
717
          &lt;ref name='svg.Desc.group'/&gt;
 
718
          &lt;ref name='svg.Animate.group'/&gt;
 
719
          &lt;ref name='svg.Discard.group'/&gt;
 
720
          &lt;ref name='svg.Handler.group'/&gt;
 
721
        &lt;/choice&gt;
 
722
      &lt;/zeroOrMore&gt;
 
723
    &lt;/define&gt;
 
724
</pre></div></div></div>
 
725
 <div class="adef-list">
 
726
 
 
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">&lt;coordinate&gt;</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>:
 
735
     yes.</p></dd>
 
736
 
 
737
     <dt><a id="AnimationElementYAttribute" name="AnimationElementYAttribute"></a> <span class="adef">y</span> = "<span class="attr-value"><a href="types.html#DataTypeCoordinate">&lt;coordinate&gt;</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>:
 
743
     yes.</p></dd>
 
744
 
 
745
     <dt><a id="AnimationElementWidthAttribute" name="AnimationElementWidthAttribute"></a> <span class="adef">width</span> = "<span class="attr-value"><a href="types.html#DataTypeLength">&lt;length&gt;</a></span>"</dt>
 
746
     <dd><p>The width of the rectangular region into which the
 
747
         animation is placed.
 
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>:
 
753
     yes.</p></dd>
 
754
 
 
755
     <dt><a id="AnimationElementHeightAttribute" name="AnimationElementHeightAttribute"></a> <span class="adef">height</span> = "<span class="attr-value"><a href="types.html#DataTypeLength">&lt;length&gt;</a></span>"</dt>
 
756
     <dd><p>The height of the rectangular region into which the
 
757
         animation is placed.
 
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>:
 
763
     yes.</p></dd>
 
764
 
 
765
     <dt><a id="AnimationElementHrefAttribute" name="AnimationElementHrefAttribute"></a> <span class="adef">xlink:href</span> = "<span class="attr-value"><a href="types.html#DataTypeIRI">&lt;IRI&gt;</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>:
 
780
     yes.</p></dd>
 
781
 
 
782
    <dt><a id="AnimationElementPreserveAspectRatioAttribute" name="AnimationElementPreserveAspectRatioAttribute"></a> <span class="adef">preserveAspectRatio</span> = <span class="attr-value">["defer"] &lt;align&gt; [&lt;meet&gt;]</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 &lt;align&gt; and the interpretation of this attribute.)</p>
 
785
    <p class="anim-target"><a href="animate.html#Animatable">Animatable</a>:
 
786
    yes.</p></dd>
 
787
 
 
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>
 
791
 
 
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>
 
797
 
 
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>
 
802
 
 
803
   </dl>
 
804
 
 
805
 
 
806
 
 
807
 </div>
 
808
 
 
809
 
 
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>
 
811
 
 
812
<div class="example"><div class="exampleheader"><strong>Example:</strong> media03.svg</div><div class="examplesource"><pre>
 
813
&lt;svg xmlns="http://www.w3.org/2000/svg"
 
814
     xmlns:xlink="http://www.w3.org/1999/xlink"
 
815
     version="1.2" baseProfile="tiny"&gt;
 
816
  &lt;desc&gt;Example of two animation elements pointing to the same content.&lt;/desc&gt;
 
817
 
 
818
  &lt;animation begin="1" dur="3" repeatCount="1.5" fill="freeze"
 
819
             x="100" y="100" width="50" height="50" 
 
820
             xlink:href="bouncingBall.svg"/&gt;
 
821
             
 
822
  &lt;animation begin="2" x="300" y="100" width="50" height="50" 
 
823
             xlink:href="bouncingBall.svg"/&gt;
 
824
&lt;/svg&gt;
 
825
</pre></div></div>
 
826
 
 
827
<h2 id="AudioLevelProperty">12.5 The <span class="prop-name">'audio-level'</span> property</h2>
 
828
 
 
829
<p>
 
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.
 
834
</p>
 
835
 
 
836
<div class="propdef">
 
837
<dl>
 
838
<dt>
 
839
<span class="propdef-title prop-name">'audio-level'</span>
 
840
</dt>
 
841
<dd>
 
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>&lt;number&gt;</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>
 
846
</td></tr>
 
847
<tr valign="baseline">
 
848
<td><em>Initial:</em></td>
 
849
<td>   1.0
 
850
</td></tr>
 
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>
 
854
</td></tr>
 
855
<tr valign="baseline">
 
856
<td><em>Inherited:</em></td>
 
857
<td>   no
 
858
</td></tr>
 
859
<tr valign="baseline">
 
860
<td><em>Percentages:</em></td>
 
861
<td>   N/A
 
862
</td></tr>
 
863
<tr valign="baseline">
 
864
<td><em>Media:</em></td>
 
865
<td>   visual, audio
 
866
</td></tr>
 
867
<tr valign="baseline">
 
868
<td><em>Animatable:</em></td>
 
869
<td>   yes
 
870
</td></tr>
 
871
<tr valign="baseline">
 
872
<td><em>Computed value: </em></td>
 
873
<td>   Specified value, except inherit
 
874
</td></tr>
 
875
</table>
 
876
</dd></dl></div>
 
877
 
 
878
<p>
 
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.
 
882
</p>
 
883
 
 
884
<p>
 
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>.)
 
891
</p>
 
892
 
 
893
<p>
 
894
  <em>This sentence is informative:</em> An element's volume cannot be louder than the
 
895
  volume of its parent.
 
896
</p>
 
897
 
 
898
<p>
 
899
The output signal level is calculated using the logarithmic scale described below (where <var>vol</var> is the value of the element volume):
 
900
</p>
 
901
 
 
902
<pre>dB change in signal level = 20 * log10(vol)</pre>
 
903
 
 
904
<p>User agents may limit the actual signal level to some maximum, based on user preferences and hardware limitations.</p>
 
905
 
 
906
<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.
 
908
</p>
 
909
 
 
910
 
 
911
 
 
912
<h2 id="Smil2Sync">12.6 Attributes for runtime synchronization</h2>
 
913
<p>
 
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.
 
917
</p>
 
918
 
 
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>
 
923
   <dd>
 
924
     <p>
 
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).
 
927
     </p>
 
928
     <p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: no.</p></dd>
 
929
 
 
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>
 
931
   <dd>
 
932
     <p>
 
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).
 
935
     </p>
 
936
     <p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: no.</p></dd>
 
937
 
 
938
   <dt><a id="SyncToleranceAttribute" name="syncToleranceAttribute"></a> <span class="adef">syncTolerance</span> = <span class="attr-value">"<a href="types.html#DataTypeClock-value">&lt;Clock-value&gt;</a></span>" | "<span class="attr-value">default</span>"</dt>
 
939
   <dd>
 
940
     <p>
 
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).
 
943
     </p>
 
944
     <p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: no.</p></dd>
 
945
 
 
946
   <dt><a id="SyncToleranceDefaultAttribute" name="syncToleranceDefaultAttribute"></a> <span class="adef">syncToleranceDefault</span> = <span class="attr-value">"<a href="types.html#DataTypeClock-value">&lt;Clock-value&gt;</a></span>" | "<span class="attr-value">inherit</span>"</dt>
 
947
   <dd>
 
948
     <p>
 
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).
 
951
     </p>
 
952
     <p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: no.</p></dd>
 
953
 
 
954
   <dt><a id="SyncMasterAttribute" name="syncMasterAttribute"></a> <span class="adef">syncMaster</span> = <span class="attr-value">"<a href="types.html#DataTypeBoolean">&lt;boolean&gt;</a>"</span></dt>
 
955
   <dd>
 
956
     <p>
 
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).
 
959
     </p>
 
960
     <p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: no.</p></dd>
 
961
   </dl>
 
962
   </div>
 
963
 
 
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>&lt;?xml version="1.0"?&gt;
 
967
&lt;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"&gt;
 
971
  
 
972
  &lt;title&gt;Sync* Attributes&lt;/title&gt;
 
973
  &lt;desc&gt;An example which illustrates the use of sync* attributes&lt;/desc&gt;
 
974
  
 
975
  &lt;video x="10" y="10" xml:id="myclip" 
 
976
         xlink:href="rtsp://www.example.org/mysong.m4v" syncMaster="true"/&gt;
 
977
  &lt;animation x="10" y="50" xml:id="mylyrics" xlink:href="timed-lyrics.svg"/&gt;
 
978
&lt;/svg&gt; </pre></div></div>
 
979
      <br />
 
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>&lt;?xml version="1.0"?&gt;
 
981
&lt;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%"&gt;
 
985
     
 
986
  &lt;title&gt;Synchronizing lyrics with video&lt;/title&gt;
 
987
  &lt;desc&gt;This document contains the textual lyrics to synchronize with some video content in the referencing document&lt;/desc&gt;
 
988
 
 
989
  &lt;g fill="blue" font-family="Arial" font-size="10" transform="translate(20, 20)"&gt;
 
990
    &lt;text xml:id="Text0" display="none"&gt;This is some text&lt;/text&gt;
 
991
    &lt;set xlink:href="#Text0" attributeName="display" to="inline" begin="0" end="1"/&gt;
 
992
    &lt;text xml:id="Text10" display="none"&gt;simulating some lyrics&lt;/text&gt;
 
993
    &lt;set xlink:href="#Text10" attributeName="display" to="inline" begin="1.1" end="2"/&gt;
 
994
    &lt;text xml:id="Text20" display="none"&gt;displayed synchronously&lt;/text&gt;
 
995
    &lt;set xlink:href="#Text20" attributeName="display" to="inline" begin="2.1" end="3"/&gt;
 
996
    &lt;text xml:id="Text30" display="none"&gt;with some video&lt;/text&gt;
 
997
    &lt;set xlink:href="#Text30" attributeName="display" to="inline" begin="3.1" end="4"/&gt;
 
998
    &lt;text xml:id="Text40" display="none"&gt;in a different document&lt;/text&gt;
 
999
    &lt;set xlink:href="#Text40" attributeName="display" to="inline" begin="4.1" end="5"/&gt;
 
1000
  &lt;/g&gt;
 
1001
&lt;/svg&gt; </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>
 
1005
 
 
1006
<h2 id="initialVisibilityMediaAttribute">12.7 The <span class="attr-name">'initialVisibility'</span> attribute</h2>
 
1007
<p>
 
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.
 
1009
</p>
 
1010
 
 
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>
 
1020
   </dd>
 
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>
 
1024
   </dl>
 
1025
   <p class="anim-target"><a href="animate.html#Animatable">Animatable</a>: no.</p></dd>
 
1026
   </dl>
 
1027
   </div>
 
1028
 
 
1029
 
 
1030
 
 
1031
<div class="footer">
 
1032
  SVG Tiny 1.2 – 20081222
 
1033
  <ul>
 
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>
 
1040
  </ul>
 
1041
</div>
 
1042
 
 
1043
</body>
 
1044
</html>