Use this appendix as a reference tool when writing SMIL files. For complete information on SMIL and RealSystem, see Chapter 6. In the tables throughout this appendix, an asterisk (*) denotes a required attribute. Ellipses (...) indicate where nonessential information has been left out of examples.
The header region's <meta.../>
tags provide presentation information. A <meta.../>
tag can also set a base URL for source clips in the SMIL file.
Attribute | Value | Function | Reference |
---|---|---|---|
content * |
any value | Provides content for the name attribute. |
click here |
name * |
abstract |
Gives presentation abstract. | click here |
author |
Lists name of presentation author. | click here | |
base |
Sets base URL for source clips. | click here | |
copyright |
Supplies presentation copyright. | click here | |
title |
Gives presentation title, which displays in the RealPlayer run list. | click here |
![]() |
Note |
---|
You can define other information attributes besides abstract, author, copyright, and title. See "Adding Presentation Information". |
<meta name="author" content="Jane Morales"/>
<meta name="title" content="Multimedia My Way"/>
<meta name="copyright" content="(c)1998 Jane Morales"/>
<meta name="base" content="rtsp://realserver.example.com/"/>
The <layout>
and </layout>
tags define the layout of visual clips such as video and animation. Within the tags, you define a root-layout region and separate regions for the clips. The layout must be defined in the SMIL header.
Within <layout>...</layout>
, <root-layout>
sets the overall size of the playback area. Clips do not play in the root-layout area.
Attribute | Value | Function | Reference |
---|---|---|---|
background-color |
color name or hex value | Sets root-layout color. | click here |
height * |
pixels | Sets playback area height. | click here |
system-captions |
on|off |
Determines if root-layout is created based on system captions preference. |
click here |
width * |
pixels | Sets playback area width. | click here |
<layout>
<root-layout background-color="maroon" width="250" height="230"/>
<region .../>
<region .../>
</layout>
Within <layout>...</layout>
, <region>
tags define the size and placement (relative to root-layout
) of each region used to play clips.
Attribute | Value | Function | Reference |
---|---|---|---|
background-color |
color name or hex value | Sets region background color. | click here |
fit |
fill , hidden , meet , scroll , or slice |
Determines how clip fits region when the two are different sizes. | click here |
height * |
pixels or percentage | Sets region height. | click here |
id * |
name | Provides target name for setting clips to play in the region. | click here |
left * |
pixels or percentage | Sets region offset from the left side of the root-layout region. | click here |
system-captions |
on|off |
Determines if region is created based on system captions preference. | click here |
top * |
pixels or percentage | Sets region offset from the top of the root-layout region. | click here |
width * |
pixels or percentage | Sets region width. | click here |
z-index |
number | Defines order of overlapping regions. | click here |
<layout>
<root-layout .../>
<region id="video" top="5" left="5" width="240" height="180"
background-color="blue" fit="fill" z-index="3"/>
<region.../>
</layout>
To define locations and timing attributes for clips within a presentation, use one of the following source tags:
<animation.../>
<audio.../>
<img.../>
<ref.../>
<text.../>
<textstream.../>
<video.../>
<RealAdInsert.../>
Except for <RealAdInsert.../>
, the choice of tag does not affect playback. All clip source tags can use <ref.../>
, for example. The <RealAdInsert.../>
tag is not a SMIL tag, but a RealSystem tag that RealServer replaces with a SMIL tag for an advertising clip. It does not include a src
attribute, but can include any other SMIL clip attribute. These attributes get passed to the replacement tag. See Chapter 9 for more on <RealAdInsert.../>
.
Attribute | Value | Function | Reference |
---|---|---|---|
abstract | abstract | Gives abstract for clip. | click here |
author | name | Lists author for clip. | click here |
begin |
h , min , s , or ms |
Delays normal playback time. | click here |
clip-begin |
h , min , s , or ms |
Specifies clip's internal timing mark where playback begins. | click here |
clip-end |
h , min , s , or ms |
Specifies clip's internal timing mark where playback ends. | click here |
copyright | copyright | Lists copyright information for clip. | click here |
dur |
h , min , s , or ms |
Sets total time clip plays. Do not use with end . |
click here |
end |
h , min , s , or ms |
Sets end time for clip relative to begin time. Do not use with dur . |
click here |
fill |
freeze or remove |
Freezes or removes (default) clip from screen when it stops playing. | click here |
id |
name | Names clip for reference by other SMIL elements. | click here |
region |
<region.../> tag id name |
Assigns clip to a region. | click here |
repeat |
integer or indefinite |
Repeats the clip the specified number of times, or indefinitely. | click here |
src * |
URL | Provides full or relative URL for clip. | click here |
system-bitrate |
bits per second | Sets bit rate attribute for <switch>...</switch> . |
click here |
system-captions |
on|off |
Determines if clip plays based on system captions preference. | click here |
system-language |
language code | Sets language attribute for <switch>...</switch> . |
click here |
title | title | Lists title for clip. | click here |
<video src="rtsp://realserver.example.com/media/video2.rm" region="video"
begin="40s" clip-begin="5100ms"clip-end="4.5min" fill="freeze"/>
<audio src="rtsp://realserver.example.com/media/music.rm"
dur="10.5s" repeat="5"/>
For a still image, you can include the following options in the image source tag. Note that these options are extensions to SMIL that work only with RealPlayer.
Option | Value | Function | Reference |
---|---|---|---|
bgcolor | color name or hex value | Changes GIF transparency to color. | click here |
bitrate |
bits per second (bps) | Sets streaming bit rate. | click here |
reliable |
true |
Guarantees reliable image transmission. | click here |
target |
_browser |
Makes Web browser the URL target. | click here |
_player |
Sets RealPlayer as command target. | click here | |
url | URL | Sends URL to browser on mouse click. | click here |
command:play() |
Gives play command on mouse click. | click here | |
command:pause() |
Gives pause command on mouse click. | ||
command:seek( time ) |
Makes RealPlayer seek to specified time in timeline on mouse click. Time has dd:hh:mm:ss.xyz format. |
||
command:stop() |
Gives stop command on mouse click. |
A question mark operator (?) separates image options from the image URL in the clip source tag. Additional options preceded by ampersands (&) can follow in this format:
<img src= "URL
?option=value&option=value
"/>
![]() |
Note |
---|
Image options and values are not in quotation marks
because they are part of the quoted src value.
|
<img src="ad1.gif?bitrate=1000&bgcolor=blue"/>
<img src="ad.gif?url=http://www.example.com&target=_browser" .../>
<img src="stop.gif?url=command:stop()&target=_player" .../>
<img src="seek.gif?url=command:seek(1:35.4)&target=_player" .../>
The <par>
and </par>
tags make enclosed clips play in parallel. No attributes are required for a <par>
tag.
Attribute | Value | Function | Reference |
---|---|---|---|
abstract | abstract | Gives abstract for group. | click here |
author | name | Lists author for group. | click here |
begin |
h , min , s , or ms |
Delays normal group playback time. | click here |
copyright | copyright | Lists copyright for group. | click here |
dur |
h , min , s , or ms |
Sets total time group plays. | click here |
end |
h , min , s , or ms |
Sets end time for group relative to begin time. Do not use with endsync . |
click here |
endsync |
first |
Ends group when first clip ends. | click here |
last |
Ends group when last clip ends. | ||
id( clip id ) |
Ends group when specified clip ends. | ||
id |
name | Names group for reference by other SMIL elements. | click here |
repeat |
integer or indefinite |
Repeats the group the specified number of times, or indefinitely. | click here |
system-bitrate |
bits per second | Sets bit rate attribute for <switch>...</switch> . |
click here |
system-captions |
on|off |
Determines if group plays based on system captions preference. | click here |
system-language |
language code | Sets language attribute for <switch>...</switch> . |
click here |
title | title | Lists title for group. | click here |
<par>
<video src="videos/newsong.rm"/>
<textstream src="lyrics/newsong.rt"/>
</par>
<par endsync="id(text)" repeat="2" begin="4s">
<video src="videos/newsong.rm"/>
<textstream id="text" src="lyrics/newsong.rt"/>
</par>
The <seq>
and </seq>
tags group clips that play in sequence. No attributes are required for a <seq>
tag.
Attribute | Value | Function | Reference |
---|---|---|---|
begin |
h , min , s , or ms |
Delays normal group playback time. | click here |
dur |
h , min , s , or ms |
Sets total time group plays. | click here |
end |
h , min , s , or ms |
Sets end time for group relative to begin time. |
click here |
id |
name | Names group for reference by other SMIL elements. | click here |
repeat |
integer or indefinite |
Repeats the group the specified number of times, or indefinitely. | click here |
system-bitrate |
bits per second | Sets bit rate attribute for <switch>...</switch> . |
click here |
system-captions |
on|off |
Determines if group plays based on system captions preference. | click here |
system-language |
language code | Sets language attribute for <switch>...</switch> . |
click here |
<seq repeat="3">
<audio src="rtsp://realserver.example.com/one.rm"/>
<audio src="rtsp://realserver.example.com/two.rm"/>
</seq>
The <switch>
and </switch>
tags contain clips or groups of clips that RealPlayer chooses between based on its available bandwidth or language preference. Clips or groups that RealPlayer evaluates must include a system-bitrate
or system-language
attribute.
Attribute | Value | Function | Reference |
---|---|---|---|
id |
name | Names group as a link target for other SMIL files. | click here |
![]() |
Additional Information |
---|
See "Switching Between Alternate Choices". |
<switch>
<audio src="french/seattle.rm" system-language="fr"/>
<audio src="german/seattle.rm" system-language="de"/>
<audio src="english/seattle.rm"/>
</switch>
The <a>...</a>
tags work like HTML hyperlink tags to connect a media source clip to another clip. But whereas you enclose text between <a>
and </a>
in HTML, you enclose a media source tag between <a>
and </a>
in SMIL.
Attribute | Value | Function | Reference |
---|---|---|---|
href * |
URL | Sets hyperlink URL. | click here |
show |
new |
Opens URL in browser while RealPlayer continues. | click here |
pause |
Opens URL in browser and pauses RealPlayer. | ||
replace (default) |
Opens URL in RealPlayer. |
<a href="http://www.example.com/index.htm" show="new">
<video src="video.rm" region="videoregion"/>
</a>
An <anchor>
tag can define a hot spot hyperlink that can be temporal as well as spatial. It fits within a media source tag:
<video ...>
<anchor .../>
</video>
Note that here the <video>
source tag does not end with a forward slash as it normally does. Instead, a </video>
tag follows it and the <anchor.../>
tag.
Attribute | Value | Function | Reference |
---|---|---|---|
begin |
h , min , s , or ms |
Defines when hot spot becomes active or when linked media clip begins in its timeline. | click here click here |
coords |
pixels or percentages | Defines boundary for hot spot as left, top, right, and bottom offset from source clip. | click here |
end |
h , min , s , or ms |
Determines when hot spot deactivates. | click here |
href * |
URL | Sets hyperlink URL. | click here |
id |
name | Defines target for use by other hypertext links. | click here |
show |
new |
Opens URL in browser while RealPlayer continues playback. | click here |
pause |
Opens URL in browser and pauses RealPlayer. | ||
replace (default) |
Opens URL in RealPlayer. |
<video src="video.rm" region="videoregion">
<anchor href="rtsp://realserver.example.com/vid2.rm" coords="20,40,80,120"/>
</video>
<video src="video.rm" region="videoregion">
<anchor href="http://www.example.com" show="pause" coords="10,30,70,100"
begin="5s" end="45s"/>
</video>
In a SMIL hyperlink, you can include a command:openwindow
argument with the following options to open the link target in a new RealPlayer window. These extensions to SMIL work only with RealPlayer 7 and later.
Attribute | Value | Function | Reference |
---|---|---|---|
(name) * |
_new |
Opens URL in a new RealPlayer window. | click here |
_blank |
|||
_self |
Opens URL in the current window. | ||
_current |
|||
name | Opens URL in a new RealPlayer window that has the given name. | ||
(URL) * |
URL | Provides URL for the new clip or presentation. | click here |
autosize |
true |
Puts new window in autosize mode. | click here |
false |
Opens new window in compact mode. (Default) | ||
zoomlevel |
normal |
Plays clip at its normal size. (Default) | |
double |
Doubles clip size. | ||
full |
Plays clip at full-screen. | ||
ontopwhileplaying |
true |
Keeps new window on top of other windows. | |
false |
Lets user control window placement. (Default) |
The syntax for a pop-up window in an <a>
or <anchor>
tag looks like the following, with name
and URL
coming first and second as single statements rather than as attribute=value
pairs:
<a href="command:openwindow(name
,URL, playmode=value,
...
)">...</a>
<a href="command:openwindow(_new, rtsp://realserver.example.com/animals.rm,
autosize=true, ontopwhileplaying=true)">
<img src="launch_button.gif" region="button"/>
</a>
<video src="rtsp://realserver.example.com/video/video1.rm" region="video">
<anchor href="command:openwindow(popup,
rtsp://realserver.example.com/video/video2.rm, zoomlevel=double)"
coords="0,0,25%,25%"/>
</video>