SMIL's timing attributes help you to tailor your presentation. You can use these attributes to adjust when clips start to play. Or you might stream just one scene from a video to create a preview without encoding a separate video clip. This chapter describes the basic SMIL timing features. Once you master these features, you can tackle advanced timing as described in Chapter 14.
SMIL timing attributes are optional, giving you a powerful way to customize presentations by specifying when and how long elements play. Before you use SMIL timing attributes, though, you should know how you want to construct your overall presentation timeline. For more on this, see "Step 5: Organize the Presentation Timeline".
![]() |
Note:
This chapter uses the term element to indicate anything
that can use a SMIL timing attribute. For simple presentations,
elements are typically clip source tags like <video/> and group
tags like <par> . But you can also use timing attributes in tags
such as <prefetch/> , <animate/> , and <area/> .
|
The <seq>
, <par>
, and <excl>
group tags set the basic timing structure for a
presentation. To stream a sequence of videos, for example, you do not need to
use SMIL timing attributes. You simply arrange the clips in a <seq>
group as
described in Chapter 11. Your presentation timeline then flows automatically
from the clip timelines and the group arrangement. You need to add timing
attributes only if, for example, you want to add a pause between each clip,
shorten the time a clip plays, or play just one scene from a clip.
In general, timing attributes for an element are relative to the group that
contains the element. For elements in a <seq>
group, timing attributes are
relative to the end of the preceding element. For elements in a <par>
or <excl>
group, they're relative to the start of the group. The following example shows
a sequence that consists of a parallel group followed by a video clip. For the
audio clip, for example, the timing attributes are relative to the start of the
<par>
group:
<body> |
The following are the basic SMIL timing attributes described in this chapter:
begin
, end
, dur
These attributes set the total length of time that an element plays. They are the most widely used of the SMIL timing attributes. See "Setting Begin and End Times" and "Setting Durations".
clipBegin
, clipEnd
These attributes let you play just a portion of a clip, such as a certain scene out of a video. See "Setting Internal Clip Begin and End Times".
min
, max
These attributes let you set absolute boundaries for how little or how long an element can play. See "Setting Minimum and Maximum Times".
endsync
This attribute ends a parallel or exclusive group when a certain element in the group ends. See "Ending a Group on a Specific Clip".
repeatCount
, repeatDur
The repeatCount
and repeatDur
attributes let you repeat an element a specific number of times, or for as many repetitions as possible within a certain time. See "Repeating an Element".
mediaRepeat
With mediaRepeat
, described in "Stopping a Clip's Encoded Repetitions", you can stop the repetitions encoded into a clip such as an animated GIF.
fill
, erase
, fillDefault
These attributes let you keep an element visible or remove it when it is no longer active. See "Setting a Fill" and "Specifying a Default Fill".
SMIL provides two methods to specify time values, a shorthand method and a "normal play time" method. Both methods provide the same capabilities. Although you can use both methods within the same SMIL file, using just one method makes authoring SMIL presentations easier.
![]() |
Tip: RealOne Player displays a presentation's elapsed time in one-second increments. You can click the time-elapsed field to display time values to 1/10th of a second, however. This can help you decide what timing values you want to use with a clip. |
The shorthand method is best suited for specifying short, simple timing
values such as five seconds, ten minutes, or 1-1/2 hour. As demonstrated in
the following table, the shorthand markers of h
, min
, s
, and ms
provide an easy
way to designate a timing value for a SMIL element.
![]() |
Tip:
Decimal values are not required. You can express two
seconds as "2s" or "2.0s" , for example.
|
The "normal play time" format for SMIL timing is suited for long, complex timing values, such as specifying one hour, fourteen minutes, 36 and 1/2 seconds. The normal play time format values use the following syntax:
|
Only the ss
field is required. When the time value does not include a decimal
point, the last field is read as the seconds. For example, 1:30
means 1 minute
and 30 seconds, whereas 1:30:00
means 1 hour and 30 minutes. Note that all
of the following values are equivalent to 90 minutes:
begin="1:30:00.0" |
The begin
and end
attributes affect when an element starts or stops,
respectively. This section explains how to use begin
and end
with the basic
SMIL timing values. Chapter 14 describes advanced timing values that you can
use with begin
and end
to add interactivity to a presentation.
Using the begin
attribute, you can vary the point at which a clip starts to play
back within the presentation timeline:
<video src="video1.rm" |
Were the preceding clip in a <par>
or <excl>
group, it would start playing at
20.5 seconds after the group became active. The begin
attribute thereby lets
you stagger the starting times of clips contained in these groups. Were this
clip in a <seq>
group, there would be 20.5 seconds of blank time before the clip
starts. The begin
attribute therefore lets you insert delays into sequences.
![]() |
For More Information: See also "Setting a Fill with Sequential Clips" |
![]() |
View it now!
(requirements for viewing this sample)
This sample demonstrates basic begin values.
|
You can set an end
attribute alone or in combination with a begin
attribute as
shown in the example below, which sets the clip to end at 62.7 seconds into its
part of the presentation timeline:
<video src="video1.rm" begin="20.5s" |
Note that the end
time is measured from the point where the clip would start
if no begin
time were set. To calculate how long the clip is active, subtract the
begin
value from the end
value. In the preceding example, the clip is active a
total of 42.2 seconds (62.7 minus 20.5) regardless of the length of its internal
timeline. If the clip's timeline were shorter than 42.2 seconds, the clip's last
frame would display until the full 42.2 seconds had elapsed.
![]() |
Tip:
The dur attribute gives you an alternative and sometimes
simpler way to specify how long an element plays. For more
information, see "Setting Durations"
|
In group tags, the begin
and end
attributes function much as they do in clip
tags:
<seq>
, <par>
, or <excl>
group is part of a larger sequence, a begin
attribute inserts "blank time" before the group becomes active. During this blank time, RealOne Player is not paused, but no activity occurs onscreen.<seq>
, <par>
, or <excl>
group is contained in a larger <par>
group, a begin
value delays when the group becomes active relative to other elements in the larger <par>
group.<seq>
, <par>
, or <excl>
group is contained in a larger <excl>
group, a begin
value determines when it becomes active within the <excl>
group.end
attribute in a <seq>
, <par>
, or <excl>
group determines when the group, and hence all clips in the group, stop playing. The following example shows a parallel group within a larger sequence. The <par>
group has both a begin
and an end
attribute:<seq> |
In this example, the begin
value delays group playback until 5 seconds after the preceding element in the sequence stops. The end
attribute stops all clips in the <par>
group after 3.5 minutes, regardless of their playback states. If all clips conclude before that time, there will be blank playback time before the next element in the sequence starts.
The clipBegin
and clipEnd
attributes specify a clip's internal timing marks
where playback begins and ends. They allow you to play just part of a clip that
has an internal timeline, such as an audio, video, or animation clip. They have
no effect on groups or static clips such as still images, though. The following
example uses clipBegin
and clipEnd
with a video clip:
<video src="video1.rm" |
Here, the clip starts playing at its internal 10-second mark rather than at its encoded beginning. It stops when it reaches its 50-second mark, having played for a total of 40 seconds.
![]() |
Warning!
Do not use clipBegin and clipEnd for a live broadcast
or when delivering clips with a Web server. For more
information, see "Limitations on Web Server Playback".
|
![]() |
View it now!
(requirements for viewing this sample)
This sample demonstrates basic clipBegin and
clipEnd values.
|
You can combine clipBegin
and clipEnd
attributes with begin
and end
attributes. In the following sample, a begin
time is added to the preceding
example:
<video src="video1.rm" clipBegin="10s" clipEnd="50s" |
The begin
time delays the clip's normal starting point by 5 seconds. When this
time elapses, the clip starts at its 10-second internal timeline marker and plays
for 40 seconds, which takes it to the 50-second mark of its internal timeline.
In this case, the clipEnd
attribute determines how long the video is active. You
could also add an end
attribute to modify this behavior, as shown in the
following example:
<video src="video1.rm" clipBegin="10s" clipEnd="50s" begin="5s" |
Combined with the begin
value, the end
value of 50 means that the clip's
"window of activity" within the presentation is 45 seconds. Because the clip
stops playing after 40 seconds, there is an extra 5 seconds during which the
clip does not play but remains active and frozen onscreen. In contrast, if you
used end="30"
, the begin
and end
values would set a playback time of 25
seconds, overriding the specified clipEnd
time.
The dur
attribute controls how long an element stays active after it starts to
play. The following example ends the video after 85 seconds, regardless of the
length of the clip's internal timeline. If the video's timeline is shorter than 85
seconds, the video's last frame appears frozen onscreen until the duration
elapses:
<video src="video1.rm" |
A common use of dur
is to control how long a static clip such as an image
appears onscreen. Because a static clip has an intrinsic duration of zero
seconds, using dur
is the easiest way to set the clip's playback time. The
following example displays an image for two minutes:
<img src="button1.gif" |
![]() |
View it now!
(requirements for viewing this sample)
The first sample shows the use of a basic dur value. The
second sample plays a sequence of three video previews
created with dur . Clicking a preview launches the full clip in a
separate window.
|
In the preceding example, end="2min"
would achieve the same result as
dur="2min"
because no begin
time is used. When a begin
attribute is present,
you need to calculate the end
value relative to the begin
value. With a dur
attribute, however, you just set the total duration you want. This makes dur
easier to use in some cases.
For example, suppose that you want a video to play for exactly two minutes. If
a begin="20.5s"
value delays the video playback for 20.5 seconds, you have to
calculate the end
value by adding the begin
value to the total playback time you
want, as shown in the following example (140.5 - 20.5 = 120 seconds):
<video src="video1.rm" begin="20.5s" |
With a dur
attribute, on the other hand, you just specify the total playback
time, as shown here:
<video src="video1.rm" begin="20.5s" |
As the preceding examples illustrate, you can use either end
or dur
depending
on how you want to measure time for clip playback. For most simple timing
needs, you use either end
or dur
, but not both. If an element includes both end
and dur
, the attribute that specifies the shorter playback time is used.
With clips that have internal timelines, you can use dur="media"
to set the
clip's duration to the length of its internal timeline. This is useful only when
you include another timing value, such as an end
attribute. Consider the
following example:
<video src="video1.rm" |
Because this clip uses both end
and dur
, the attribute specifying the shorter
playback time is used. Suppose the video clip normally runs 15 minutes. In
this case, end="10min"
ends the clip after 10 minutes. But if the clip runs just 5
minutes, dur="media"
ends the clip when it finishes its normal playback. If you
did not have dur="media"
in this case, the end="10min"
value would keep the
clip active an additional 5 minutes, unnecessarily lengthening playback.
You can use dur="indefinite"
to extend an element's duration indefinitely. As
with dur="media"
, dur="indefinite"
is typically used with another timing
attribute that ends the element. For example, the following clip stays active
indefinitely until the viewer clicks the image with the ID stop
:
<par> |
When an element has an indefinite duration, RealOne Player's timeline slider
does not operate because the presentation's end time cannot be known in
advance. Hence, viewers cannot seek through the presentation. The timeline
slider will work, though, if a group timing attribute overrides the element's
indefinite duration. For example, if you added dur="10min"
to the <par>
tag in
the preceding example, RealOne Player's timeline slider would operate and
indicate a presentation lasting ten minutes.
![]() |
For More Information: Chapter 14 explains the advanced timing commands that let you end a clip on a certain event, such as when another clip is clicked. |
end
attribute, the dur
attribute in a <seq>
, <par>
, or <excl>
tag sets an absolute duration for the group. For more information, see "Using Begin and End Times with Groups".dur="media"
and dur="indefinite"
attributes are compatible with a clipBegin
value. A valid clipEnd
value always overrides these durations, however.repeatCount
attribute can play a percentage of an element when you don't know how long the element lasts. For example, you can play half of a clip by using repeatCount="0.5"
instead of dur
. With a three-minute clip, for example, repeatCount="0.5"
is equivalent to dur="1.5min"
. ![]() |
For More Information:
For more on repeatCount , see "Repeating
an Element a Certain Number of Times".
|
<par>
or <excl>
group, you can pick a simple duration, such as dur="5s"
, and include fill="freeze"
in the source tag. This freezes the image until the <par>
group ends, or until another element in the <excl>
group replaces the image. This method is preferred over using dur="indefinite"
because the indefinite
value can prevent RealOne Player from determining how long the entire group lasts.![]() |
For More Information:
For instructions on using the fill
attribute, See "Setting a Fill".
|
By default, a <par>
or <excl>
group ends when all elements in the group finish
playing. You can modify this behavior with the endsync
attribute. Suppose a
long clip of background music plays in parallel with a shorter RealText clip.
Using endsync
, you can stop the group when the RealText clip finishes, cutting
off the background music once the text has displayed. The endsync
attribute
has no effect in <seq>
tags or clip source tags. The following table lists the
endsync
values.
Value | Function | Reference |
---|---|---|
all |
Ends the group once all clips have finished. | click here |
first |
Ends the group when the first clip finishes. | click here |
ID |
Ends the group when a specific clip finishes. | click here |
last |
Ends the group when the last clip finishes. This is the default. | click here |
The two values endsync="last"
and endsyc="all"
are similar. Both end a <par>
or
<excl>
group when the last clip finishes playing. (Here, "last
" refers to playback
times and not the order that clips are listed in the group.) Because the default
value is endsync="last"
, you do not need to add this value to the group tag
explicitly.
In the following example, the group behavior would be the same if you used
just the <par>
tag. Here, the parallel group concludes when the video ends, as
long as the video plays more than two minutes. If the video has a shorter
duration, the group ends when the image clip's two-minute duration expires:
<par |
When all group elements use basic timing values, as in the preceding example,
endsync="all"
functions just like endsync="last"
. The difference between these
values arises only when elements in the group use interactive timing values,
which are described in Chapter 14. Consider the following example of an
exclusive group in which each clip plays only when a button is clicked:
<excl |
In this case, using a group tag of <excl>
or <excl endsync="last">
would not
work. When this exclusive group starts, no clips are active because playback
depends on the viewer clicking a button. The default value of endsync="last"
immediately ends the group in this case. The endsync="all"
value keeps the
group active until all clips in the group have played, however. In the preceding
example, the group ends after the viewer has clicked all three buttons to play
all three videos.
![]() |
For More Information:
Exclusive groups are described in
"Creating an Exclusive Group". The section "Defining a
Mouse Event" explains the activateEvent timing value.
|
The values endsync="first"
and endsync="
ID
"
can stop a <par>
or <excl>
group
when a specific element stops playback. Use endsync="first"
to stop the group
when the first element in the group stops playing. (Note that "first
" refers to
playback times and not the order that elements are listed in the group.) All
other elements in the group stop playing at that point, regardless of their
playback statuses or any timing parameters specified for them.
The attribute endsync="
ID
"
causes the group to conclude when the designated
element ends playback. All other elements in the group stop playing at that
point, regardless of their playback statuses or any timing parameters used
with them. The designated element must have a corresponding id
value in its
source tag, as illustrated in the following example:
<par |
![]() |
Note:
Because all , first , last , and media are endsync values, do not
use these words as clip IDs when using endsync=" ID " .
|
dur
or end
attribute in a <par>
or <excl>
tag overrides endsync
. In these cases, RealOne Player ends the group as specified by the dur
or end
attribute, not the endsync
attribute.endsync="
ID
"
and select the ID of an element that repeats twice, for example, both repetitions must finish before the group stops.endsync
attribute. Suppose that you define the following parallel group:
|
The group stops when the first element stops, then repeats. On the second repetition, the group again stops when the first element stops.
begin
times, the actual or possible restarts do not affect endsync
. Consider the interactive example discussed previously:<excl endsync="all"> |
By default, each video can restart whenever the viewer clicks the video's start button. The viewer may play video1.rm
, then video2.rm
, then video1.rm
again, then video2.rm
again. These restarts do not affect the endsync
attribute. But once the viewer has played each of the three videos at least once, the endsync
attribute ends the <excl>
group, preventing the videos from restarting again.
![]() |
For More Information:
The restart and restartDefault attributes
give you more control over restart possibilities. For details, see
"Controlling Whether an Element Restarts".
|
Using a repeat attribute, you can specify how many times, or for how long, an element repeats. You can also make an element repeat indefinitely. The following table summarizes these attributes.
Attribute | Value | Function | Reference |
---|---|---|---|
repeatCount |
integer |indefinite |fractional_value |
Repeats the clip the specified number of times, or indefinitely. | click here |
repeatDur |
time_value |indefinite |
Repeats the clip the specified amount of time. | click here |
The repeatCount
attribute repeats an element a specific number of times. You
can use integer values such as 2
or 4
to specify an exact number of repetitions.
You can also use decimal values to stop the clip during a repetition. In the
following example, the video plays 3-1/2 times:
<video src="video1.rm" |
The repeatDur
attribute repeats an element for a specified amount of time. Like
a begin
, end
, or dur
attribute, the repeatDur
attribute uses a standard SMIL
timing value, as described in "Specifying Time Values". When you use
repeatDur
, the element repeats as many times as it can within the specified
time, shown in the following example as five minutes:
<video src="video1.rm" |
The repeatDur
attribute functions like end
, so if you include a begin
time, the
total playback time is the repeatDur
value minus the begin
value. For example,
the following clip is active within the presentation timeline for five minutes,
but it does not play during the first minute. Its repeating cycles then last a
total of four minutes:
<video src="video1.rm" |
A dur
attribute included with repeatCount
or repeatDur
sets the total time that
must elapse before the element repeats. For example, each repetition of the
following clip lasts three minutes. Because the clip plays twice, the total
playing time is six minutes:
<video src="video1.rm" |
If the video in the preceding example has an internal timeline longer than three minutes, the video stops after three minutes and immediately repeats, playing again for just three minutes. If the video runs less than three minutes, its last frame appears frozen until the full three minutes have elapsed.
An end
attribute sets the total playback time during which an element can
repeat. You can use it with or without dur
. For example, the repeatCount
, dur
,
and end
values in the following tag cause the clip to play one cycle in three
minutes, repeat, then stop after playing a total of five minutes. This places the
end of playback at two minutes into the second cycle:
<video src="video1.rm" |
An indefinite
value used with a repeatCount
or repeatDur
attribute causes an
element to repeat until another timing attribute or user event stops the loop.
In the following example, the audio clip repeats continuously until the viewer
clicks the RealOne Player Stop button:
<audio src="song.rm" |
As explained in "Specifying the Length of Each Repeating Cycle", a dur
attribute can set the length of each repeating cycle. In the following example,
each loop lasts 30 seconds:
<audio src="song.rm" |
Using the indefinite
value for an element in a sequence prevents the sequence
from ending unless the <seq>
tag itself specifies the end time with a dur
or end
attribute. With a <par>
group, you can use endsync="
ID
"
to stop the group
when an element other than the looping element finishes. In the following
example, the audio loop stops when the RealPix slideshow concludes:
<par |
![]() |
For More Information:
See "Ending a Group on a Specific Clip"
for more information on endsync .
|
For clips such as animated GIF images, you can halt the clip's native
repetitions by adding mediaRepeat="strip"
to the clip's source tag:
<img src="image.gif" dur="20s" |
Although the mediaRepeat="strip"
attribute stops a clip from repeating, it does
not necessarily render a clip static. For example, an animated GIF image may
consist of ten unique frames that play in sequence, with the sequence
repeating indefinitely. If mediaRepeat="strip"
is used, the ten unique frames
play in sequence once, but do not repeat.
Once you strip out a clip's native repetitions, you can use timing attributes to set a different pattern of repetition. Suppose that a GIF image shows one frame every second for ten seconds, then repeats this cycle indefinitely. To add a delay of five seconds between each cycle, you can use the attributes shown in the following example:
<img src="image.gif" mediaRepeat="strip" dur="15s" repeatDur="indefinite"/> |
In this example, the mediaRepeat
attribute strips out the GIF image's native
repetitions. The dur
attribute sets the repeating cycle to 15 seconds, meaning
the image animates as normal for 10 seconds, then pauses for five seconds.
The repeatDur
attribute makes this 15-second cycle repeat indefinitely.
![]() |
View it now!
(requirements for viewing this sample)
In this sample, a continuously looping animated GIF first plays normally. The same GIF repeats with its native looping stripped out, and SMIL timing used to set each repeating cycle. |
When you repeat a clip streamed with RTSP or HTTP, each repetition consumes bandwidth because RealOne Player does not cache the clip. Alternatively, you can use CHTTP to cache a repeating clip on RealOne Player. The clip then consumes bandwidth only the first time it plays. You should use CHTTP only for small clips, however, because the clip cannot be larger than RealOne Player's cache size of a few Megabytes.
![]() |
For More Information: For more information on using CHTTP, see "Caching Clips on RealOne Player". |
When you stream with RTSP or HTTP, RealOne Player prebuffers each repetition to keep the presentation from pausing when the clip replays. The presentation therefore needs spare bandwidth for buffering the repeating cycles. To determine how much bandwidth to reserve, divide the clip's preroll by the amount of time that the clip plays in each cycle. Next, multiple that number by the clip's streaming bandwidth.
Suppose that a RealAudio clip streams at 20 Kbps, plays for 60 seconds, and requires 8 seconds of prebuffering. The reserve bandwidth is the following:
((8/60) x 20) = 2.7 Kbps |
The inclusion of the reserve bandwidth sets the total streaming bandwidth requirement to 22.7 Kbps. This is OK for 56 Kbps modems, but too high for 28.8 Kbps modems, which have a 20 Kbps maximum as listed in the table "Maximum Streaming Rates".
![]() |
Tip: To determine how much preroll a clip requires, open the clip in RealOne Player, and use File>Clip Properties>Clip Source to view the buffering information. |
RealOne Player never requests more than two streams for a repeating clip. If
you use repeatCount="8"
, for example, RealOne Player requests and plays the
first stream. As it does so, it prebuffers the second, identical stream. As it plays
the second stream, it requests the first stream again, prebuffering it for the
third repetition, and so on.
end
and dur
both specify the clip's playing time, with the shorter value used. When an element includes repeatDur
or repeatCount
, though, end
and dur
have different functions. The end
attribute sets the total time for all repetitions, whereas the dur
attribute sets the length of each repeating cycle.indefinite
value (and only the indefinite
value), repeatCount
and repeatDur
function identically. Therefore, it doesn't matter if you use repeatCount="indefinite"
or repeatDur="indefinite"
.repeatCount
is useful for playing just part of an element when you don't know how long the element lasts. For example, you can play half of any clip by using repeatCount="0.5"
. With a three-minute clip, for example, repeatCount="0.5"
is equivalent to dur="1.5min"
.clipBegin
and clipEnd
attributes, described in "Setting Internal Clip Begin and End Times", with repeating clips.<EMBED>
tag's LOOP
or NUMLOOP
parameter to repeat the entire presentation. For more information, see "Setting Automatic Playback".When an element ends but is not immediately replaced by another element,
you can use the fill
attribute to specify whether the element disappears or
remains onscreen. Useful primarily with visual clips and elements such as
SMIL animations, the fill
attribute does not affect audio-only clips. The
following table summarizes the fill
attribute values.
Value | Function | Reference |
---|---|---|
auto |
Makes fill behavior depend on timing attributes. | click here |
default |
Lets fillDefault control the fill behavior. |
click here |
freeze |
Freezes element when it finishes. | click here |
hold |
Keeps element visible until the group ends. | click here |
remove |
Makes element disappear when it finishes. | click here |
transition |
Freezes clip long enough for a transition effect to occur. This is used only with clips, and not with group tags. Chapter 16 explains the transition value. |
click here |
The fill
action comes after the clip's end time, as set by its internal timeline, or
as specified by any timing values such as dur
, end
, repeatCount
, or repeatDur
.
Consider the following example:
<par> |
The dur="3min"
attribute keeps the first clip active exactly three minutes,
regardless of the length of its internal timeline. The fill
attribute takes effect
when this duration elapses. Suppose the fill
attribute freezes the clip onscreen.
Because the second clip's duration makes the entire <par>
group last five
minutes, the first clip freezes for two minutes past its duration. The following
figure illustrates this fill period.
If you do not use a fill
attribute with an element, and you do not set a
fillDefault
value in a group that contains the element, the element behaves as if
fill="auto"
is set. (You can also set fill="auto"
explicitly.) The effect of the auto
value depends on whether certain timing elements are used:
dur
, end
, repeatCount
or repeatDur
timing attribute, the fill="auto"
value is equivalent to fill="remove"
. For example, a video that uses a dur
attribute disappears when the duration expires.fill="auto"
value is equivalent to fill="freeze"
. For example, the final frame of a video that does not use any SMIL timing values freezes until the group that contains the clip ends.![]() |
For More Information:
The following sections explain how
fill="remove" and fill="freeze" attributes affect clips in different
types of groups. For more on fillDefault , see "Specifying a
Default Fill".
|
In a sequence of clips, a clip automatically disappears when it ends, so each
clip already behaves as if it has a fill="remove"
attribute. The fill="freeze"
value
affects a clip in a sequence only if the subsequent clip has a delayed start. In
the following example, the second clip's begin
time inserts a five-second delay
before it plays. The fill="freeze"
value keeps the first clip visible during the
delay:
<seq> |
A fill="hold"
value displays a clip until the sequence ends. In the following
example, an image used as a background displays first. Next, a RealText clip
and video play in parallel in front of the image. Without the hold
value, the
image would disappear as soon as its duration elapsed. But the hold
value
keeps the clip visible until the entire sequence ends:
<seq> |
For the last clip in a sequence, fill="freeze"
and fill="hold"
function similarly.
They have an effect only if the <seq>
tag has a dur
or end
value that keeps it
active after all clips have played. If all clips finish playing after eight minutes,
but the <seq>
tag has a dur="10min"
attribute, for instance, a fill="freeze"
or
fill="hold"
attribute for the last clip keeps that clip visible for the final two
minutes of the sequence.
Use fill="remove"
with a clip in a <par>
group to make the clip disappear when
it finishes playing. In the following example, the RealText clip disappears as
soon as it finishes playing. Assuming that the video clip has a longer timeline,
the parallel group ends when the video finishes playing:
<par> |
In a <par>
group, fill="freeze"
and fill="hold"
both keep a clip visible until the
group completes. In the following example, the final text block of the RealText
clip stays visible when the clip finishes playing. Assuming that the video clip
has a longer timeline, the parallel group ends with the video clip:
<par> |
Use fill="remove"
on a clip in an <excl>
group to make the clip disappear when
it finishes playing. In the following example, each video clip disappears as
soon as it finishes playing. If a clip finishes playing before another clip
becomes active, no clip is visible on the screen:
<excl> |
Use fill="freeze"
to keep a clip in an <excl>
group visible until another clip in
the group plays. Use fill="hold"
to keep the clip visible until the entire <excl>
group concludes. In this case, each opaque clip needs to display in a separate
region to prevent other clips from obscuring it.
The attribute fill="hold"
keeps a clip visible only until the group that contains
it ends. You can add erase="never"
to fill="hold"
to keep a clip visible for the
entire presentation, and even after the presentation has ended. This feature,
which does not work in group tags, is useful for adding a background to a
presentation that contains any number of groups, as shown in the following
example:
<body> |
In the preceding example, the background clip is listed as the first element in
a sequence that contains other clips and groups. The fill
and erase
values keep
the background clip visible while the subsequent clips and groups play.
Although the fill
attribute can be used for groups and other elements such as
SMIL animations, the most common use is with clips inside of groups. The
following table summarizes how the most commonly used fill
values affect
clips that display in <seq>
, <par>
, and <excl>
groups.
![]() |
For More Information:
See "Using Clip Fills with Transition
Effects" for more information on fill="transition" .
|
You can also use a fill
attribute with a value of remove
, freeze
, or hold
in a group
tag. Consider the following example, in which album credits and cover art
display before a song plays:
<seq> |
In this example, the fill="freeze"
value for the JPEG album cover keeps that clip
visible as long as the <par>
group is active. The <par>
group itself has a
fill="hold"
value that keeps its final state visible until the containing <seq>
group finishes. In other words, the <par>
group's fill="hold"
value extends the
first two clips' fill periods until the <seq>
group ends. The result is that the
credits and cover image remain visible until the song completes, as the
following illustration shows.
![]() |
Tip:
To set a fill value for a group and pass that value onto the
elements in the group, use fillDefault instead of fill in the group
tag.
|
fill="freeze"
is set unless the clip tag contains a dur
, end
, repeatCount
or repeatDur
attribute. In tags where a dur
, end
, repeatCount
or repeatDur
attribute is present, the clip acts as if fill="remove"
is set. Setting a fill
value explicitly, though, always overrides the default.<par>
group only, you can use erase="never"
with fill="freeze"
to display a clip throughout the entire presentation. Because fill="hold"
along with erase="never"
does the same for clips in any type of group, however, it is easier always to use this latter combination.dur
attribute along with fill="remove"
is the simplest means for setting how long a graphic image, which has no internal timeline, appears onscreen. In the following example, the image disappears 14.5 seconds after it appears:<img src="poster.jpg" dur="14.5s" fill="remove"/> |
dur
value along with fill="freeze"
is the most common method for displaying a graphic image for as long as a parallel group is active:<par> |
fill
attribute works slightly differently than it does in earlier versions of RealPlayer that supported SMIL 1.0. For more information, see "Behavioral Changes".You can use the fillDefault
attribute in a group tag to set a fill
value for that
group and its elements, whether those elements are clips or other groups. All
elements within the group receive the default fill
value unless they have
another fill
value explicitly set. The following table lists the possible fillDefault
values.
Attribute | Function | Reference |
---|---|---|
auto |
Makes fill behavior depend on timing attributes. | click here |
freeze |
Freezes elements in the group when they finish playing. | click here |
hold |
Freezes elements in the group until the group ends. | click here |
inherit |
Makes each element inherit the fillDefault setting from the containing group. This is the default value. |
click here |
remove |
Makes elements in the group disappear when finished. | click here |
transition |
Freezes clips in the group long enough for a transition effect to occur. Chapter 16 explains the transition value. |
click here |
The following are the general rules for using fillDefault
in a group tag:
fillDefault
value is set in a clip's group tag, and no fill
value is set for the clip, the clip uses the group's fillDefault
value.fill
value explicitly in a clip source tag always makes the clip use that value regardless of any fillDefault
setting in the group tag.fillDefault
value explicitly set will inherit the fillDefault
value from a larger group that contains it.The next example illustrates the fillDefault
attribute set in a <par>
group, with
some of the group elements overriding the attribute value:
<par |
The following fill
actions occur in this group:
<par>
group's fillDefault="freeze"
value sets its fill
value to freeze
, and passes this value along to all its elements.<img/>
tag does not include a fill
attribute, so it receives a fill="freeze"
value from the <par>
tag.<video/>
tag's fill="default"
attribute makes it receive the freeze
value just like the <img/>
tag. In other words, fill="default"
is the default value used with the containing group has a fillDefault
attribute. (The attribute fill= "auto"
is the default value if no fillDefault
attribute is used.) Thus, setting fill="default"
explicitly has the same effect as leaving fill
out of the tag altogether.<textstream/>
tag includes a fill="remove"
attribute, which overrides the fill="freeze"
value it receives from the <par>
tag.A group that does not have a fillDefault
value explicitly set for it automatically
inherits the fillDefault
value of its containing group. The following example
illustrates this inheritance with a master <par>
group that contains three other
<par>
groups as its elements:
<par id="master_group" |
The following fill
actions occur in this set of nested groups:
fillDefault="freeze"
value for master_group
sets the group's fill
value to freeze
, passing this value to all group elements.group_X
does not include a fillDefault
attribute, so it receives a fill="freeze"
value from the <par>
tag.fillDefault="inherit"
attribute in group_Y
makes this group receive the freeze
value from the master group. In other words, fillDefault="inherit"
is the default value used with a group when its containing group has a fillDefault
attribute. Setting fillDefault="inherit"
explicitly has the same effect as leaving fillDefault
out of the tag altogether.group_Z
includes a fill="remove"
attribute, which overrides the fillDefault="freeze"
value it receives from the master group. This group uses the freeze
value, passing it to all the elements it contains.
![]() |
©2002 RealNetworks, Inc. All rights reserved.
For more information, visit RealNetworks Click here if the Table of Contents frame is not visible at the left side of your screen. |