SVG は SMIL 2.1 メディア要素 ([SMIL21], 7 章) に類似する メディア要素 をサポートする。メディア要素はその時間コンテナ内で自身の時間軸を定める。すべての SVG メディア要素は SVG タイミング属性 と 実行時同期属性 ( runtime synchronization )をサポートする。すべての SVG メディア要素の既定の event-base 要素 は要素自身になる。 SVG supports media elements similar to the SMIL 2.1 Media Elements ([SMIL21], chapter 7). Media elements define their own timelines within their time container. All SVG media elements support the SVG timing attributes and runtime synchronization attributes. The default event-base element for all SVG media elements is the element itself.
次の要素がメディア要素になる: The following elements are media elements:
メディア要素 はアクティブになったとき、すなわち文書時間軸内で指定される、 begin 属性から定まる時刻に再生を開始する( SVG タイミング属性 を見よ)。 しかしながら、文書時間軸の実際の開始は 最も根元の 'svg' 要素 の timelineBegin 属性の値に依存して遅延され得る。特に timelineBegin が 'onLoad' に設定されている場合がこれに該当する。この場合、実際のメディア再生開始も遅延されるが、文書時間軸におけるメディア開始時刻は指定された状態を保つ。 Media elements start playing when they become active, i.e. at a time specified in the document timeline which depends on their 'begin' attribute (see SVG timing attributes). However, depending on the value of the 'timelineBegin' attribute on the rootmost 'svg' element, the actual beginning of the document timeline may be delayed until the whole document is loaded. This is the case when 'timelineBegin' is set to 'onLoad'. 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.
注記: image 要素は timed でないのでメディア要素とは見なされない。それらは文書時間軸の時刻 0 で再生を始める。 Note: 'image' elements are not considered as media elements because they are not timed. They start playing at time 0 in the document timeline.
次の例にこのふるまいを示す: The following examples illustrate this behavior:
<?xml version="1.0"?> <svg xml:id="A" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" baseProfile="tiny" timelineBegin="onLoad"> <!-- 処理時間 = t0 --> <!-- ...多数の要素... --> <!-- 追加の処理時間 = t1 = 5s --> <video xlink:href="myvideo.mp4" begin="0s"/> <!-- 追加の処理時間 = t2 = 1s --> </svg>
この例では、文書時間軸は文書が完全に処理された後に開始される。 すなわち、時刻 t0+t1+t2 ≥ 6s 。 動画は文書が読み込まれたときに始まるが、その時点での文書時刻は 0 になるので、動画は最初のフレームから始まる。 In this example, the document timeline will start after the document is fully processed, i.e. at time t0+t1+t2 ≥ 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.
<?xml version="1.0"?> <svg xml:id="B" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" baseProfile="tiny" timelineBegin="onStart"> <!-- 処理時間 = t0 --> <!-- ...多数の要素... --> <!-- 追加の処理時間 = t1 = 5s --> <video xlink:href="myvideo.mp4" begin="0s"/> <!-- 追加の処理時間 = t2 = 1s --> </svg>
この例では、文書時間軸は svg 要素【の開始タグ】のパースと処理が完了した時点から開始される。すなわち時刻 t0 。 動画も文書時刻 0 で始まることになるが、文書時刻が t0+t1+t2 になって初めて処理されることになるので、動画の表示は動画時間軸で時刻 t0+t1+t2 のフレームから始まることになる。 In this example, the document timeline will start when the 'svg' element is fully parsed and processed, i.e. at time t0. The video will also start at document time 0, but since the video will only be processed when document time is t0+t1+t2, the video will start displaying the frame at time t0+t1+t2 in the video timeline.
更に、メディア時間軸における再生時刻、例えば再生される正確な動画フレームや音声サンプルは、 syncBehavior 属性により変わり得る。以下の例にこのふるまいを示す。これらの例は syncBehavior 属性の値が既定値から 'independent' に変更されている点を除いて前のものと同じである。 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 'syncBehavior' attribute. The following examples illustrate this behavior. These examples are the same as the previous ones, but the values of the 'syncBehavior' attributes are changed from the default value to 'independent'.
<?xml version="1.0"?> <svg xml:id="A" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" baseProfile="tiny" timelineBegin="onLoad"> <!-- 処理時間 = t0 --> <!-- ...多数の要素... --> <!-- 追加の処理時間 = t1 = 5s --> <video xlink:href="myvideo.mp4" begin="0s" syncBehavior="independent"/> <!-- 追加の処理時間 = t2 = 1s --> </svg>
<?xml version="1.0"?> <svg xml:id="B" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" baseProfile="tiny" timelineBegin="onStart"> <!-- 処理時間 = t0 --> <!-- ...多数の要素... --> <!-- 追加の処理時間 = t1 = 5s --> <video xlink:href="myvideo.mp4" begin="0s" syncBehavior="independent"/> <!-- 追加の処理時間 = t2 = 1s --> </svg>
Example video-timelineBegin-03.svg では、文書の load イベントが生じるまで動画は始まらない一方、 Example video-timelineBegin-04.svg では、動画要素( video element )がパースされて描画準備が整い次第動画は始まる。いずれの場合も文書と動画の時間軸は互いに独立なので、動画が始まるのは最初のフレームから、すなわちメディア時間軸で時刻 0 からになる。 In example video-timelineBegin-03.svg, the video does not start until the document's load event, whereas in example video-timelineBegin-04.svg, 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.
externalResourcesRequired 属性の値もメディアが(画像さえも)再生を始める実際の時刻を遅延し得るが、文書時間軸の時刻には影響しない。実際、メディア要素と image 要素は xlink:href 属性から参照される外部リソースを要求し得るが、リソースまたは( g 要素など)シーン木の親の externalResourcesRequired 属性が 'true' に設定されている場合、この外部リソースはメディアが開始可能になる前に利用可能になる必要がある。 externalResourcesRequired 属性が 'false' に設定されている場合、メディア要素または image 要素はアクティブになり次第再生を始めることになる。 The value of the 'externalResourcesRequired' 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 'xlink:href' attribute. If the 'externalResourcesRequired' attribute is set to 'true', on the resource or on a parent in the scene tree, e.g. a 'g' element, then this external resource has to become available before the media can start. If the 'externalResourcesRequired' attribute is set to 'false', the media element or the image element will start playing as soon as it becomes active.
「利用可能」の意味は、実装のみならず、メディア型やリソースへのアクセスに利用されるプロトコルにも依存する。 例えば HTTP のようなプロトコルが利用される場合、「利用可能」とはリソース全体のダウンロードを意味し得る一方でリソースの低解像度版、例えばプログレッシブ PNG ( PNG Pass extraction ([PNG], 4.5.2 節) を見よ)が利用可能なことも意味し得る。この場合、低解像度版をリソース全体がダウンロードされる前に表示するかどうかは、実装の選択になる。別の例は、 RTSP/RTP などのストリームミングプロトコルが利用される場面で、この場合「利用可能」とは通常、再生開始前に十分な量のストリームがバッファされることを意味する。メディアが利用可能になるまでの時間を減らすためには、文書作成者には外部リソースの事前取得の必要性を指示する prefetch 要素の利用が奨励される。 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 PNG Pass extraction ([PNG], 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 'prefetch' element to signal that external resources have to be prefetched.
特定のプラットフォームにおいては、ミキシング可能な音声のボイス数やチャンネル数、同時に再生可能な動画ストリーム数に制限が有り得る。これらは様々なので SVG 言語自体は音声または動画に対するその種の制約を課していない。 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.
audio や video 要素により複数の音声ストリームが同時にアクティブにされた場合、出力においては、それぞれの音声ストリームの audio-level プロパティの算出値に比例する割合でミキシングされるべきである。音声ストリームがアクティブになり得るのは、アクティブな音声要素( audio element )から参照されるか、またはアクティブな video 要素から参照される動画内容の一部になるときである。 If two or more audio streams from 'audio' or 'video' elements are active at the same time, their rendering should be mixed in proportions equal to the computed value of the 'audio-level' 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 'video' element.
文書作成者は video 要素の視覚面と聴覚面の独立な制御を望むかもしれない。下に述べるようにプロパティの組み合わせでどの変更も可能になる: Authors may wish to independently control both the visual and auditory aspects of the 'video' element. Through a combination of the various properties available, all permutations are possible, as described below:
audio, video, animation などの メディア要素 の再生の制御は、固定的な時間軸属性値の設定や宣言的アニメーションによるものに加えて、 SVG ではスクリプトによる制御も可能である。詳細は uDOM の マルチメディア制御 の節を見よ。 In addition to setting fixed timeline attribute values or using declarative animation to control the playback of media elements such as 'audio', 'video', and 'animation', SVG allows scripted control. See the uDOM section on Multimedia control for details.
audio 要素は、音声の同期再生で出力される音声ファイルを指定する。通常の SMIL タイミング機能が適切な時刻に音声の開始や停止を行う制御に利用される。音声内容へのリンクには xlink:href が用いられなければならない。 いかなる視覚表現も生成されないものとする。しかしながら内容作成者は望むなら、開始, 停止, 一時停止, 巻き戻し, 音量調節用の制御パネルのグラフィック表示を作成できる。 The 'audio' 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 'xlink:href' 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.
audio 要素は音声ストリーム内容を参照しなければならない。 The 'audio' element must reference content with an audio stream.
<define name='audio'> <element name='audio'> <ref name='audio.AT'/> <ref name='audio.CM'/> </element> </define> <define name='audio.AT' combine='interleave'> <ref name='svg.Core.attr'/> <ref name='svg.XLinkEmbed.attr'/> <ref name='svg.Conditional.attr'/> <ref name='svg.External.attr'/> <ref name='svg.AnimateTiming.attr'/> <ref name='svg.AnimateSync.attr'/> <ref name='svg.Media.attr'/> <ref name='svg.ContentTypeAnim.attr'/> </define> <define name='audio.CM'> <zeroOrMore> <choice> <ref name='svg.Desc.group'/> <ref name='svg.Animate.group'/> <ref name='svg.Handler.group'/> <ref name='svg.Discard.group'/> </choice> </zeroOrMore> </define>
属性定義:
音声内容への IRI 参照 。 無効な IRI 参照 は サポート外の値 。属性値を空にすると( xlink:href="" )要素は再生されなくなる。 省略値 は空文字列。 An IRI reference. An invalid IRI reference is an unsupported value. An empty string value (xlink:href="") disables playback of the element. The lacuna value is the empty string.
この属性の値がアニメーションされるか、さもなければ変更される際は、メディア時間軸が制御可能な場合、 syncBehavior 属性が independent に設定されている場合にのみ、メディア時間軸が再始動される。メディア時間軸が制御できない場合、メディア時間軸はそのような変更に影響されない。 When the value of this attribute is animated or otherwise modified, if the media timeline can be controlled, then the media timeline is restarted only if the 'syncBehavior' attribute is set to independent. If the media timeline cannot be controlled, then the media timeline is unaffected by such modification.
アニメーション:可
音声形式。実装はサポートしない音声の取得を行わなくてもよい。文書作成者には、ダウンロード時間を最適化するために特定の形式を必須にする際は type よりも requiredFormats の利用が奨励される。 The audio format. Implementations may choose not to fetch audios of formats that they do not support. For optimizing download time by requiring a particular content format authors are encouraged to use 'requiredFormats', instead of 'type'.
アニメーション:可
audio 要素の用例を次に示す。ボタンが押されると音声ファイルの再生が3回繰り返される。 The following example illustrates the use of the 'audio' element. When the button is pushed, the audio file is played three times.
<svg width="100%" height="100%" version="1.2" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <desc>SVG audio example</desc> <audio xlink:href="ouch.ogg" audio-level="0.7" type="application/ogg" begin="mybutton.click" repeatCount="3"/> <g xml:id="mybutton"> <rect width="150" height="50" x="20" y="20" rx="10" fill="#ffd" stroke="#933" stroke-width="5"/> <text x="95" y="55" text-anchor="middle" font-size="30" fill="#933">Press Me</text> </g> <rect x="0" y="0" width="190" height="90" fill="none" stroke="#777"/> </svg>
この仕様では特定の音声形式のサポートを義務付けてはいない。特定の音声コーデックの有無の確認には requiredFormats 条件処理属性 が利用できる。 This specification does not mandate support for any particular audio format. Content can check for a particular audio codec with the 'requiredFormats' conditional processing attribute.
video 要素は、動画の同期再生で出力されることになる動画ファイルを指定する。通常の SMIL タイミング機能が適切な時刻に動画の開始と停止を行う制御に利用される。 xlink:href が動画内容へのリンクに用いられなければならない。動画内容は音声ストリームも含み得るものと見なされ(動画内容はそのように作成されるのが常なので)、従って音声も video 要素のメディア属性により制御されるものとする。 The 'video' 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 'xlink:href' 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 'video' element's media attributes.
video 要素は動画ストリーム内容を参照しなければならない。 The 'video' element must reference content with a video stream.
video 要素は描画結果を生成するので、 width, height, x, y 属性を持つ。 The 'video' element produces a rendered result, and thus has 'width', 'height', 'x' and 'y' attributes.
video 要素の変換のふるまいには幾何的とピン留めの2種類あり、 transformBehavior 属性の値から定まる。変換のふるまいが幾何的の場合、 video 要素は 新しいビューポートの確立 に従って、参照先の文書用に新たなビューポートを確立しなければならない。この場合、 video 要素は viewport-fill と viewport-fill-opacity プロパティをサポートする。新しいビューポートの領域は属性 x, y, width, height により定まるものとする。参照された動画の配置と拡縮は video 要素の preserveAspectRatio 属性により制御されるものとする。 変換のふるまいがピン留めの場合、新しいビューポートは確立されてはならない。この場合、属性 viewport-fill, viewport-fill-opacity, width, height, preserveAspectRatio は何ら効果を生じさせない。 The 'video' element can have two different transform behaviors, either geometric or pinned, depending on the value of the transformBehavior attribute. If the transform behavior is geometric, the 'video' element must establish a new viewport for the referenced document as described in Establishing a new viewport. In this case, the 'video' element supports the 'viewport-fill' and 'viewport-fill-opacity' properties. The bounds for the new viewport shall be defined by attributes 'x', 'y', 'width' and 'height'. The placement and scaling of the referenced video shall be controlled by the 'preserveAspectRatio' attribute on the 'video' element. In the case of pinned transform behavior, a new viewport must not be established. As such, 'viewport-fill', 'viewport-fill-opacity', 'width', 'height', or 'preserveAspectRatio' have no effect.
preserveAspectRatio 属性を評価する際に利用する viewBox 属性の値は参照先の内容により定まるものとする。 viewBox が明白に特定される内容に対してはその値を用いるものとする。大方の動画内容では動画の領域境界が用いられるべきである(すなわち video 要素は暗黙の viewBox 、 "0 0 <動画の幅> <動画の高さ> " を持つ)。いかなる値も利用可能でない場合、 preserveAspectRatio 属性は無視されるものとする。 The value of the 'viewBox' attribute to use when evaluating the 'preserveAspectRatio' attribute shall be defined by the referenced content. For content that clearly identifies a 'viewBox' that value shall be used. For most video content the bounds of the video should be used (i.e. the 'video' element has an implicit 'viewBox' of "0 0 video-width video-height"). Where no value is readily available the 'preserveAspectRatio' attribute shall be ignored.
<define name='video'> <element name='video'> <ref name='video.AT'/> <ref name='video.CM'/> </element> </define> <define name='video.AT' combine='interleave'> <ref name='svg.Core.attr'/> <ref name='svg.FocusHighlight.attr'/> <ref name='svg.Media.attr'/> <ref name='svg.XLinkEmbed.attr'/> <ref name='svg.Conditional.attr'/> <ref name='svg.External.attr'/> <ref name='svg.AnimateTiming.attr'/> <ref name='svg.AnimateSync.attr'/> <ref name='svg.Focus.attr'/> <ref name='svg.Transform.attr'/> <ref name='svg.XYWH.attr'/> <ref name='svg.PAR.attr'/> <ref name='svg.ContentTypeAnim.attr'/> <ref name='svg.InitialVisibility.attr'/> <optional> <attribute name='transformBehavior' svg:animatable='no' svg:inheritable='false'> <choice> <value>geometric</value> <value>pinned</value> <value>pinned90</value> <value>pinned180</value> <value>pinned270</value> </choice> </attribute> </optional> <optional> <attribute name='overlay' svg:animatable='no' svg:inheritable='false'> <choice> <value>none</value> <value>top</value> </choice> </attribute> </optional> </define> <define name='video.CM'> <zeroOrMore> <choice> <ref name='svg.Desc.group'/> <ref name='svg.Animate.group'/> <ref name='svg.Handler.group'/> <ref name='svg.Discard.group'/> </choice> </zeroOrMore> </define>
属性定義:
動画が配置される矩形領域のX座標。 省略値 は '0' 。 The x-axis coordinate of the rectangular region into which the video is placed. The lacuna value is '0'.
動画の変換のふるまいが幾何的の場合、この座標が矩形領域の第一頂点になる。ピン留めの場合、この座標は矩形領域のピン留め点になる。この属性の解釈については transformBehavior 属性を見よ。 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. See the 'transformBehavior' attribute for the interpretation of this attribute.
アニメーション:可
動画が配置される矩形領域のY座標。 省略値 は '0' 。 The y-axis coordinate of the rectangular region into which the video is placed. The lacuna value is '0'.
動画の変換のふるまいが幾何的の場合、この座標が矩形領域の第一頂点になる。ピン留めの場合、この座標は矩形領域のピン留め点になる。この属性の解釈については transformBehavior 属性を見よ。 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. See the 'transformBehavior' for the interpretation of this attribute.
アニメーション:可
動画が配置される矩形領域の幅。負値は サポート外 。 省略値 は '0' 。 The width of the rectangular region into which the video is placed. A negative value shall be treated as unsupported. The lacuna value is '0'.
動画の変換のふるまいが幾何的の場合、値を0にすると要素の出力は行われなくなる。ピン留めの場合、この属性には何の効果もない。 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.
アニメーション:可
動画が配置される矩形領域の高さ。負値は サポート外 。 省略値 は '0' 。 The height of the rectangular region into which the video is placed. A negative value shall be treated as unsupported. The lacuna value is '0'.
動画の変換のふるまいが幾何的の場合、値を0にすると要素の出力は行われなくなる。ピン留めの場合、この属性には何の効果もない。 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.
アニメーション:可
動画内容への IRI 参照 。 無効な IRI 参照 は サポート外の値 。属性値を空にすると( xlink:href="" )要素は再生されなくなる。 省略値 は空文字列。 An IRI reference to the video content. An invalid IRI reference is an unsupported value. An empty string value (xlink:href="") disables rendering of the element. The lacuna value is the empty string.
この属性の値がアニメーションされるか、さもなければ変更される際は、メディア時間軸が制御可能な場合、 syncBehavior 属性が independent に設定されている場合にのみ、メディア時間軸が再始動される。メディア時間軸が制御できない場合、メディア時間軸はそのような変更に影響されない。 When the value of this attribute is animated or otherwise modified, if the media timeline can be controlled, then the media timeline is restarted only if the 'syncBehavior' attribute is set to independent. If the media timeline cannot be controlled, then the media timeline is unaffected by such modification.
アニメーション:可
一様な拡縮変換を強制するかどうかを指示する。( <align> の構文とこの属性の解釈については preserveAspectRatio 属性を見よ。) Indicates whether or not to force uniform scaling. (See the 'preserveAspectRatio' for the syntax of <align> and the interpretation of this attribute.)
アニメーション:可
動画形式。実装はサポートしない動画の取得を行わなくてもよい。文書作成者には、ダウンロード時間を最適化するために特定の形式を必須にする際は type よりも requiredFormats の利用が奨励される。 The video format. Implementations may choose not to fetch videos of formats that they do not support. For optimizing download time by requiring a particular content format authors are encouraged to use 'requiredFormats', instead of 'type'.
アニメーション:可
属性定義 の記述を見よ。 See attribute definition for description.
アニメーション:不可
属性定義 の記述を見よ。 See attribute definition for description.
アニメーション:不可
属性定義 の記述を見よ。 See attribute definition for description.
アニメーション:不可
属性定義 の記述を見よ。 See attribute definition for description.
アニメーション:可
定義 を見よ。 See definition.
定義 を見よ。 See definition.
定義 を見よ。 See definition.
video 要素の用例を次に示す。動画内容は部分的に他のグラフィックス要素に覆われている。この例は video 要素がオフスクリーンバッファに描画され、画像や矩形などの他のグラフィック部品と同様にふるまうよう、通常のやり方で変換と合成が施されることを示す。このような形で video 要素に拡縮, 回転, 斜傾が加えられ、種々のサイズで表示され、アニメーションされる。 The following example illustrates the use of the 'video' element. The video content is partially obscured by other graphics elements. This example shows the 'video' 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 'video' element may be scaled, rotated, skewed, displayed at various sizes, and animated.
<svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny" xmlns:xlink="http://www.w3.org/1999/xlink" width="420" height="340" viewBox="0 0 420 340"> <desc>SVG 1.2 video example</desc> <g> <circle cx="0" cy="0" r="170" fill="#da4" fill-opacity="0.3"/> <video xlink:href="noonoo.avi" audio-level=".8" type="video/x-msvideo" width="320" height="240" x="50" y="50" repeatCount="indefinite"/> <circle cx="420" cy="340" r="170" fill="#927" fill-opacity="0.3"/> <rect x="1" y="1" width="418" height="338" fill="none" stroke="#777" stroke-width="1"/> </g> </svg>
この video 要素の 例を表示 ( SVG Tiny 1.2 ビューアと Motion JPEG を利用した Windows AVI のサポートが必要になる。これは 3.7M 動画ファイルになる)。【容量節約のため、この翻訳にはこの例が参照する動画 "noonoo.avi" を含めていないのでこの例は機能しません:リンク先を原文サイトのものに変更した例を表示。】 Show this example of the 'video' element (requires an SVG Tiny 1.2 viewer and support for a Windows AVI using Motion JPEG; this is a 3.7M video file).
この仕様では特定の動画形式のサポートを義務付けてはいない。特定の動画コーデックの有無の確認には requiredFormats 条件処理属性 が利用できる。 This specification does not mandate support for any particular video format. Content can check for a particular video codec with the 'requiredFormats' conditional processing attribute.
内容製作者は動画がすべての対象機器で利用できるとは限らない特色機能であることを意識しておくべきである。相互運用可能な内容のためには、内容製作者は switch 要素を用いて予備の代替内容を与えるべきである。 次の特色機能文字列が動画サポートの有無の確認のために定められている: http://www.w3.org/Graphics/SVG/feature/1.2/#Video 。 リソースが限られた機器では、動画のサポートが完全ではないかもしれない。 SVG Tiny 1.2 は、すべての環境で再現性の高い結果を提供できるような、より粒の細かい動画の描画制御を導入する。次の2節では、この制御について述べる。 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 'switch' element. The following feature string is defined for checking for video support: http://www.w3.org/Graphics/SVG/feature/1.2/#Video. 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.
動画の変換は高価な演算であり、特に携帯機器を対象にする内容の場合は注意して利用すべきものになる。動画変換は、すべての機器がこの特色機能をサポートするとは限らないので、内容の相互運用性が低くなりかねない。内容製作者に動画変換への制約の制御を与えるため、 SVG Tiny 1.2 では transformBehavior 属性、および、対応する特色機能文字列: http://www.w3.org/Graphics/SVG/feature/1.2/#TransformedVideo を導入する。動画変換をサポートするビューアは、 video 要素の変換に関しては他の要素と同等に扱わなければならない。動画変換をサポートしないビューアは、動画を( x, y 属性で与えられる)点として扱わなければならず、 width, height 属性が存在しても無視し、代わりに(機器の画素での)幅と高さをメディア自身から取り出すものとし、動画の表示ではその中心を局所座標系の原点に一致させなければならない。 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 'transformBehavior' attribute and a corresponding feature string: http://www.w3.org/Graphics/SVG/feature/1.2/#TransformedVideo. A viewer supporting video transformation must treat the 'video' element like any other element regarding transformations. A viewer not supporting video transformation must treat the video as a point (given by the 'x' and 'y' attributes). The 'width' and 'height' 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.
内容製作者は、動画変換をサポートするビューアにおける変換のふるまいを明示的に選択させる transformBehavior 属性を利用できる。これは制約のある機器を対象にした内容の性能向上に関わるものになる。 A content creator can use the 'transformBehavior' 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.
属性定義:
動画の変換/再標本化をするか(本質的に幾何的な矩形として扱われる)、再標本化しない/固定にするか(非幾何的なビットブリット領域のピン留め点として扱われる)を定める。 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).
属性は次の5つの値のいずれかを取り得る: The attribute can take one of the five following values:
メディアは局所座標系で x, y, width, height 属性により定められる幾何的な矩形として扱われるものとする。メディアは矩形を埋めるべく再標本化と変換の対象にならなければならない。これが 省略値 。 The media shall be treated as a geometric rectangle in the local coordinate system, defined by 'x', 'y', 'width' and 'height' attributes. The media must be resampled to fill the rectangle and is subject to transformation. This is the lacuna value.
4つの値 'pinned', 'pinned90', 'pinned180', 'pinned270' のいずれかが指定された場合、メディアは x, y 属性で定められる点として扱われるものとする。この点は機器の最も近い実際の画素に変換されなければならない。メディア本来の解像度で与えられた動画は、ピン留め点を中心にメディアにより定まる幅と高さの領域に塗られるものとする。画素は機器の画素格子に整列されなければならず、再標本化は行わないものとする。この場合、 width, height 属性の値は動画の描画に影響しないものとする。 If one of the four values 'pinned', 'pinned90', 'pinned180' and 'pinned270' is specified, the media shall be treated as a point, defined by 'x' and 'y' attributes. This point must be transformed to the nearest actual device pixel. Video at the native resolution given by the media shall then be painted on a region whose center is the pin point and whose width and height are defined by the media. The pixels must be aligned to the device pixel grid and there shall be no resampling. The values of the 'width' and 'height' attributes in this case shall have no effect on the rendering of the video.
アニメーション:不可
変換の制約と同様の理由で、内容製作者が動画と他の要素との合成に制約を課す必要も生じ得る。すべての機器が動画要素と他の内容との合成をサポートするとは限らない。その場合、動画を他のすべての SVG 内容の手前に描画する必要がある。そこで SVG Tiny 1.2 では、 overlay 属性、および、対応する特色機能文字列: http://www.w3.org/Graphics/SVG/feature/1.2/#ComposedVideo を導入する。動画の合成をサポートするビューアは、 video 要素を SVG の画家のモデルに従い、つまりグラフィックの要素が動画を覆うようにも描画され得るように描画しなければならない。動画の合成をサポートしないビューアは合成において常に他のすべての SVG 要素より手前に動画を描画しなければならない。 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 'overlay' attribute and a corresponding feature string: http://www.w3.org/Graphics/SVG/feature/1.2/#ComposedVideo. A viewer supporting compositing of video must render the 'video' 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.
内容製作者は、動画変換をサポートするビューアにおける合成のふるまいを明示的に選択させる overlay 属性を利用できる。これは制約のある機器を対象にした内容の性能向上に関わるものになる。 A content creator can use the 'overlay' 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.
属性定義:
video を SVG の画家のモデルに従って描画するか、他のすべての SVG 要素の上に描画するかを定める。 Defines whether a 'video' is rendered according to the SVG painter's model or if it must be positioned on top of all other SVG elements.
属性値は次のいずれか: The attribute value can be either of the following:
アニメーション:不可
複数の video 要素が overlay="top" の場合、これらの video 要素の描画順序は通常の SVG の描画順序に従う。 If multiple 'video' elements have overlay="top", the drawing order of those 'video' elements follows the typical SVG rendering order.
特色機能文字列 http://www.w3.org/Graphics/SVG/feature/1.2/#TransformedVideo の用例を下に示す。 switch 要素が2つのグループを囲んでいる。動画変換をサポートするビューアでは、最初のグループによる拡縮と回転が施された動画が描画されることになる一方、動画変換をサポートしないビューアでは、2番目のグループによる無変換の動画が描画されることになる。 The following example illustrates the use of the http://www.w3.org/Graphics/SVG/feature/1.2/#TransformedVideo feature string. A 'switch' 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.
<svg version="1.2" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 400 300"> <!-- 特色機能文字列 http://www.w3.org/Graphics/SVG/feature/1.2/#TransformedVideo によるスイッチの用例 --> <desc>Example of switching on the http://www.w3.org/Graphics/SVG/feature/1.2/#TransformedVideo feature string</desc> <switch> <!-- 変換される動画のグループ --> <!-- Transformed video group --> <g requiredFeatures="http://www.w3.org/Graphics/SVG/feature/1.2/#TransformedVideo" transform="translate(-21,-34) scale(1.24) rotate(-30)"> <rect x="6" y="166" width="184" height="140" fill="none" stroke="blue" stroke-width="4" /> <video xlink:href="ski.avi" audio-level=".8" type="video/x-msvideo" x="10" y="170" width="176" height="132"/> </g> <!-- 無変換の動画のグループ --> <!-- Untransformed video group --> <g> <rect x="6" y="166" width="184" height="140" fill="none" stroke="blue" stroke-width="4"/> <video xlink:href="ski.avi" audio-level=".8" type="video/x-msvideo" x="98" y="236"/> </g> </switch> </svg>
2つの SVG-UA による Example media04 の描画を上の画像に示す:最初のもの(左側)が動画変換をサポートする方、2番目のもの(右側)がそうでない方。 The above images show the rendering of Example media04 in two SVG user agents: the first one supporting transformed video (on the left) and the second one not (on the right).
特色機能文字列 http://www.w3.org/Graphics/SVG/feature/1.2/#ComposedVideo の用例を下に示す。 switch 要素が2つのグループを囲んでいる。動画合成をサポートするビューアでは、最初のグループにより動画の手前にテキストが合成されるように描画されなければならない一方、動画合成をサポートしないビューアでは、2番目のグループにより動画の枠の上側にテキストが描画されなければならない。 The following example illustrates the use of the http://www.w3.org/Graphics/SVG/feature/1.2/#ComposedVideo feature string. A 'switch' 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.
<?xml version="1.1"?> <svg version="1.2" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 400 300"> <!-- 特色機能文字列 http://www.w3.org/Graphics/SVG/feature/1.2/#ComposedVideo によるスイッチの用例 --> <desc>Example of switching on the http://www.w3.org/Graphics/SVG/feature/1.2/#ComposedVideo feature string</desc> <rect x="2" y="2" width="396" height="296" fill="none" stroke="black" stroke-width="2" /> <rect x="106" y="66" width="184" height="140" fill="none" stroke="blue" stroke-width="4" /> <switch> <!-- 合成される動画のグループ --> <!-- Composited video group --> <g transform="translate(100 0)" requiredFeatures="http://www.w3.org/Graphics/SVG/feature/1.2/#ComposedVideo"> <video xlink:href="ski.avi" audio-level=".8" type="video/x-msvideo" x="10" y="70" width="176" height="132"/> <text x="20" y="100" fill-opacity="0.5" fill="blue" font-size="20">Composited title.</text> </g> <!-- オーバーレイされる動画のグループ --> <!-- Overlayed video group --> <g transform="translate(100 0)" font-size="18"> <video xlink:href="ski.avi" audio-level=".8" type="video/x-msvideo" x="10" y="70" overlay="top" width="176" height="132"/> <text x="15" y="60" fill="blue" fill-opacity="0.5" >Non-composited title.</text> </g> </switch> </svg>
2つの SVG-UA による Example media05 の描画を上の画像に示す:最初のもの(左側)が動画合成をサポートする方、2番目のもの(右側)がそうでない方。 The above images show the rendering of Example media05 in two SVG user agents: the first one supporting composed video (on the left) and the second one not (on the right).
animation 要素は、ベクターグラフィックスの同期アニメーションを与える SVG 文書を指定する。 video 同様、 animation 要素は大きさが x, y, width, height 属性により定められるグラフィカルなオブジェクトである。更に animation 要素は、同じ SVG 文書内で複数のアニメーションを独立の時間軸で動せるようにするタイミング属性と同期属性をサポートする。 video や image と同じ様に animation 要素は SVG ファイル内の文書片を参照してはならない。 The 'animation' elements specifies an SVG document providing synchronized animated vector graphics. Like 'video', the 'animation' element is a graphical object with size determined by its 'x', 'y', 'width' and 'height' attributes. Furthermore, the 'animation' element supports timing and synchronization attributes which allow multiple animations to run with independent timelines in the same SVG document. Just like 'video' and 'image', the 'animation' element must not point to document fragments within SVG files.
animation 要素は 新しいビューポートの確立 に従って、参照先のファイル用に新たなビューポートを確立する。新しいビューポートの領域境界は属性 x, y, width, height により定められる。参照先の SVG 文書の 最も根元の 'svg' 要素 の preserveAspectRatio 属性は無視されるものとする( width と height 属性も同様)。代わりに、参照元の animation 要素の preserveAspectRatio 属性が SVG 内容のビューポートへのはめ込み方を定めるものとする。 viewport-fill と viewport-fill-opacity プロパティについても同じ規則が適用される。 An 'animation' element establishes a new viewport for the referenced file as described in Establishing a new viewport. The bounds for the new viewport are defined by attributes 'x', 'y', 'width' and 'height'. The 'preserveAspectRatio' attribute on the rootmost 'svg' element in the referenced SVG document shall be ignored (as are its 'width' and 'height' attributes). Instead, the 'preserveAspectRatio' attribute on the referencing 'animation' element shall define how the SVG content is fitted into the viewport. The same rule applies for the 'viewport-fill' and 'viewport-fill-opacity' properties.
preserveAspectRatio 属性が評価される際に利用される viewBox 属性の値は参照先の文書の viewBox の値により定められる。値が与えられていない場合、 preserveAspectRatio 属性は無視されなければならず、内容の表示には x, y 属性によるビューポートの並進変換のみが利用されなければならない。 The value of the 'viewBox' attribute to use when evaluating the 'preserveAspectRatio' attribute is defined by the referenced document's 'viewBox' value. When no value is available the 'preserveAspectRatio' attribute must be ignored, and only the translation due to the 'x' and 'y' attributes of the viewport must be used to display the content.
参照先の SVG 文書は独自のパース木と文書オブジェクトモデルを生成する別個の文書を表す。従って、参照先のアニメーションへはプロパティは継承されない。詳細は 文書への外部参照の処理 を見よ。 The referenced SVG document represents a separate document which generates its own parse tree and document object model. Thus, there is no inheritance of properties into the referenced animation. For details, see Processing of external references to documents.
SVG 仕様は表示されていないアニメーションの読み込みをいつ始めるかについてを定めていない。 UA には未表示( display="none" )のアニメーションに対するアニメーションデータの読み込みは要求されない。 しかしながら、これによりアニメーションが初めて表示される際に遅延が生じ得る。この場合、文書作成者は UA にアニメーションデータの表示前の読み込みを望むなら prefetch 要素を利用すべきである。 The SVG specification does not specify when an animation that is not being displayed should be loaded. A user agent is not required to load animation data for an animation that is not displayed (e.g. display="none"). However, it should be noted that this may cause a delay when an animation becomes visible for the first time. In the case where an author wants to suggest that the user agent load animation data before it is displayed, they should use the 'prefetch' element.
<define name='animation'> <element name='animation'> <ref name='animation.AT'/> <ref name='animation.CM'/> </element> </define> <define name='animation.AT' combine='interleave'> <ref name='svg.Core.attr'/> <ref name='svg.FocusHighlight.attr'/> <ref name='svg.Media.attr'/> <ref name='svg.Conditional.attr'/> <ref name='svg.External.attr'/> <ref name='svg.XLinkEmbed.attr'/> <ref name='svg.Focus.attr'/> <ref name='svg.AnimateTiming.attr'/> <ref name='svg.AnimateSync.attr'/> <ref name='svg.XYWH.attr'/> <ref name='svg.PAR.attr'/> <ref name='svg.Transform.attr'/> <ref name='svg.InitialVisibility.attr'/> </define> <define name='animation.CM'> <zeroOrMore> <choice> <ref name='svg.Desc.group'/> <ref name='svg.Animate.group'/> <ref name='svg.Discard.group'/> <ref name='svg.Handler.group'/> </choice> </zeroOrMore> </define>
属性定義:
アニメーションが配置される矩形領域の第一頂点のX座標。 省略値 は '0' 。 The x-axis coordinate of one corner of the rectangular region into which the animation is placed. The lacuna value is '0'.
アニメーション:可
アニメーションが配置される矩形領域の第一頂点のY座標。 省略値 は '0' 。 The y-axis coordinate of one corner of the rectangular region into which the animation is placed. The lacuna value is '0'.
アニメーション:可
アニメーションが配置される矩形領域の幅。負値は サポート外 。値が0の場合、要素を描画してはならない。 省略値 は '0' 。 The width of the rectangular region into which the animation is placed. A negative value is unsupported. A value of zero must disable rendering of the element. The lacuna value is '0'.
アニメーション:可
アニメーションが配置される矩形領域の高さ。負値は サポート外 。値が0の場合、要素を描画してはならない。 省略値 は '0' 。 The height of the rectangular region into which the animation is placed. A negative value is unsupported. A value of zero must disable rendering of the element. The lacuna value is '0'.
アニメーション:可
アニメーションデータへの IRI 参照 。 無効な IRI 参照 は サポート外の値 。属性値を空にすると( xlink:href="" )要素は描画されなくなる。 省略値 は空文字列。 An IRI reference to the animation data. An invalid IRI reference is an unsupported value. An empty attribute value (xlink:href="") disables rendering of the element. The lacuna value is the empty string.
この属性の値がアニメーションされるか、さもなければ変更される際は、メディア時間軸が制御可能な場合、 syncBehavior 属性が independent に設定されている場合にのみ、メディア時間軸が再始動される。メディア時間軸が制御できない場合、メディア時間軸はそのような変更に影響されない。 When the value of this attribute is animated or otherwise modified, if the media timeline can be controlled, then the media timeline is restarted only if the 'syncBehavior' attribute is set to independent. If the media timeline cannot be controlled, then the media timeline is unaffected by such modification.
アニメーション:可
一様な拡縮変換を強制するかどうかを指示する。( <align> の構文とこの属性の解釈については preserveAspectRatio 属性を見よ。) Indicates whether or not to force uniform scaling. (See The 'preserveAspectRatio' attribute for the syntax of <align> and the interpretation of this attribute.)
アニメーション:可
属性定義 の記述を見よ。 See attribute definition for description.
アニメーション:不可
属性定義 の記述を見よ。 See attribute definition for description.
アニメーション:可
定義 を見よ。 See definition.
定義 を見よ。 See definition.
定義 を見よ。 See definition.
下に animation 要素の基本的な用例を示す。他の例についてはリンクの章の use とアニメーションの例 を見よ。 The example below shows basic usage of the 'animation' element. For another example, see the use and animation example in the Linking chapter.
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.2" baseProfile="tiny">
<!-- 同じ内容を指す2つの animation 要素の例。 -->
<desc>Example of two animation elements pointing to the same content.</desc>
<animation begin="1" dur="3" repeatCount="1.5" fill="freeze"
x="100" y="100" width="50" height="50"
xlink:href="bouncingBall.svg"/>
<animation begin="2" x="300" y="100" width="50" height="50"
xlink:href="bouncingBall.svg"/>
</svg>
audio-level プロパティは上で述べた audio, video, animation 要素、および use 要素、加えて g 要素などの コンテナ要素 に適用できる。 The 'audio-level' property can be applied to the 'audio', 'video' and 'animation' elements described above, the 'use' element, plus container elements such as the 'g' element.
audio-level プロパティは特定の要素の音量の算出に利用される値を指定する。値が 1.0 より小さくなるに従い音量が下がり、 0 になると静音状態になる。 The 'audio-level' property specifies a value that is used to calculate the volume of a particular element. Values below 1.0 decrease it and a value of zero silences it.
要素の音量は audio-level プロパティの切り上げ/下げされた値と、その親の切り上げ/下げされた算出値または親が存在しなければ初期値( 1.0 )との積である。 0.0 (静音)から 1.0 (システム音量)の範囲外の音量値に対しては切り上げ/下げが生じる。( 特定の範囲への値の切り上げ/下げ を見よ。) An element's volume is the product of its clamped 'audio-level' property and either the clamped computed value of its parent, or the initial value (1.0) if it has no parent. Audio level clamping occurs for any values outside the range 0.0 (silent) to 1.0 (system volume). (See Clamping values which are restricted to a particular range.)
この文は情報を提供するものである: 要素の音量がその親の音量を超えることは無い。 This sentence is informative: An element's volume cannot be louder than the volume of its parent.
出力信号レベルは次に示す対数スケールで計算される( vol は要素の音量値とする): The output signal level is calculated using the logarithmic scale described below (where vol is the value of the element volume):
dB change in signal level = 20 * log10(vol)
UA は実際の信号レベルを利用者の設定とハードウェアの限界に基づいて、何らかの最大音量に制限してもよい。 User agents may limit the actual signal level to some maximum, based on user preferences and hardware limitations.
要素が要素音量 0 を持つ場合、出力信号は無音にしなければならない。要素が要素音量 1 を持つ場合、出力信号はシステム音量レベルにしなければならない。 audio-level プロパティも要素音量もシステム音量設定を上書きしない。 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 'audio-level' property nor the element volume override the system volume setting.
SVG Tiny 1.2 は timed 要素の実行時同期を制御するために SMIL 2.1 からの下に挙げる5つの属性をサポートする。 SVG Tiny 1.2 では syncBehavior, syncTolerance, syncMaster 属性を audio, video, animation 要素に指定できる。 syncBehaviorDefault, syncToleranceDefault 属性を svg 要素要素に指定できる。 SVG Tiny 1.2 supports the five attributes listed below from SMIL 2.1 to control runtime synchronization of timed elements. In SVG Tiny 1.2 the 'syncBehavior', 'syncTolerance' and 'syncMaster' attributes can be specified on the 'audio', 'video' and 'animation' elements. The 'syncBehaviorDefault' and 'syncToleranceDefault' attributes can be specified on the 'svg' element.
属性定義:
SMIL 2.1 の 'syncBehavior' の定義 ([SMIL21], 10.4.1 節) を見よ。 See the SMIL 2.1 definition of 'syncBehavior' ([SMIL21], section 10.4.1).
アニメーション:不可
SMIL 2.1 の 'syncBehaviorDefault' の定義 ([SMIL21], 10.4.1 節) を見よ。 See the SMIL 2.1 definition of 'syncBehaviorDefault' ([SMIL21], section 10.4.1).
アニメーション:不可
SMIL 2.1 の 'syncTolerance' の定義 ([SMIL21], 10.4.1 節) を見よ。 See the SMIL 2.1 definition of 'syncTolerance' ([SMIL21], section 10.4.1).
アニメーション:不可
SMIL 2.1 の 'syncToleranceDefault' の定義 ([SMIL21], 10.4.1 節) を見よ。 See the SMIL 2.1 definition of 'syncToleranceDefault' ([SMIL21], section 10.4.1).
アニメーション:不可
SMIL 2.1 の 'syncMaster' の定義 ([SMIL21], 10.4.1 節) を見よ。 See the SMIL 2.1 definition of 'syncMaster' ([SMIL21], section 10.4.1).
アニメーション:不可
実行時同期属性を用いて動画内容にテキストを同期させる方法を、下の2つのファイルに示す(上がメイン, 下がサブ)。 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.
<?xml version="1.0"?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" baseProfile="tiny" viewBox="0 0 400 100" height="100%" width="100%" syncBehaviorDefault="locked"> <!-- 実行時同期属性 --> <title> Sync* Attributes </title> <!-- 実行時同期属性の用例 --> <desc> An example which illustrates the use of sync* attributes </desc> <video x="10" y="10" xml:id="myclip" xlink:href="rtsp://www.example.org/mysong.m4v" syncMaster="true"/> <animation x="10" y="50" xml:id="mylyrics" xlink:href="timed-lyrics.svg"/> </svg>
<?xml version="1.0"?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" baseProfile="tiny" viewBox="0 0 400 100" height="100%" width="100%"> <!-- 歌詞を動画に同期させる --> <title> Synchronizing lyrics with video </title> <!-- この文書には参照元の何らかの動画内容と同期させる歌詞テキストが含まれる --> <desc> This document contains the textual lyrics to synchronize with some video content in the referencing document </desc> <g fill="blue" font-family="Arial" font-size="10" transform="translate(20, 20)"> <text xml:id="Text0" display="none">これは異なる文書で</text> <set xlink:href="#Text0" attributeName="display" to="inline" begin="0" end="1"/> <text xml:id="Text10" display="none">何らかの動画と</text> <set xlink:href="#Text10" attributeName="display" to="inline" begin="1.1" end="2"/> <text xml:id="Text20" display="none">同期して表示させる</text> <set xlink:href="#Text20" attributeName="display" to="inline" begin="2.1" end="3"/> <text xml:id="Text30" display="none">何かの歌詞を模倣する</text> <set xlink:href="#Text30" attributeName="display" to="inline" begin="3.1" end="4"/> <text xml:id="Text40" display="none">実験用のテキスト</text> <set xlink:href="#Text40" attributeName="display" to="inline" begin="4.1" end="5"/> </g> </svg>
timed 要素( video と animation )が syncBehavior 属性を用いた実行時同期のふるまいを指定していないので、ふるまいは最も近い先祖、この場合は svg 要素の syncBehaviorDefault 属性から定まる。 Since the timed elements ('video' and 'animation') do not specify their runtime synchronization behavior using the 'syncBehavior' attribute, the behavior is deduced from the 'syncBehaviorDefault' attribute on the nearest ancestor, in this case on the 'svg' element.
この属性の値 'locked' は、部分木内のすべての timed 要素 が同じ時間軸を共有することを意味する。この場合、メインシーンの時間軸では video と animation の時間軸が互いにロックし合う。 This attribute has the value 'locked', which means that all the timed elements in the subtree share the same timeline. In this case, the main scene timeline, the 'video' and 'animation' timelines are then locked to each other.
マスターは動画に与えられる、つまり、ストリームミングセッションで動画がストールした場合、動画の時間軸は一時停止することになり、結果、歌詞の時間軸とメインシーンも同様に一時停止することになる。 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.
initialVisibility 属性は視覚メディア要素( video と animation )に適用され、最初の活動期間が開始される前のメディアオブジェクトの可視性の制御に利用される。アクティブになる前に可視の視覚メディア要素では最初のフレームを表示するものとする。 animation 要素に対しては、これは参照先のファイルの時刻 0 の状態が描画されることを意味する。 video 要素に対しては、これは動画の最初のフレームを意味する。 The 'initialVisibility' attribute applies to visual media elements ('video' and 'animation') 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 'animation' element this means the referenced file rendered at time 0. For a 'video' element it means the first frame of the video sequence.
属性定義:
最初の活動期間が開始される前のメディアオブジェクトの可視性を制御する。 Controls the visibility of the media object before its first active duration period has started.
属性値は次のいずれか: The attribute value can be either of the following:
省略値 。メディアオブジェクトを最初の活動期間が開始されるまで、要素が display="none" だったかのように、表示しないことを指示する。 The lacuna value. Indicates that the media object is not displayed, as though the element had display="none", until its first active duration starts.
メディア要素は親の時間コンテナが初期化された時点から(すなわち親の SVG 文書の時刻 0 から)可視。この間、活動期間が開始されるまで、メディア要素は初期化された状態のまま 非アクティブ にされる。 The media element is visible from the initialization of the parent time container (i.e. time 0 of the parent SVG document). During this time, and until the active duration starts, the media element is initialized but remains inactive.
アニメーション:不可