A SMIL file can define links to other media. A video might link to a second video, for example, or to an HTML page that opens in a browsing window. You can even define areas as hot spots with links that vary over time. The bottom corner of a video can link to a different URL every ten seconds, for instance. This chapter explains how to create hyperlinks that open HTML pages, as well as new streaming media presentations.
SMIL provides two hyperlink tags, both found in HTML. So if you are familiar
with HTML linking, you'll pick up SMIL linking quickly. The SMIL <a>
tag is
the simpler means of creating links, but the <area/>
tag is more powerful. The
<area/>
tag includes all of the features of <a>
, and adds additional ones, such
as the ability to define multiple links for each clip, and to create hot spots
(image maps) and timed links. Using the <area/>
tag for all hyperlinks is
recommended, but the <a>
tag is also available for basic linking functions.
![]() |
For More Information: The two sections "Creating a Simple Link", and "Using the <area/> Tag", provide the basic instructions for using the two link tags. |
Your SMIL file can link to HTML pages that open in a RealOne Player environment, or the viewer's default Web browser. As explained in "The Three- Pane Environment", RealOne Player offers three types of HTML windows: a related info pane, a media browser pane, and any number of secondary browser windows that pop up above the three-pane environment.
![]() |
For More Information: The section "Selecting a Browsing Window" explains the attributes that target the RealOne Player panes. |
A hyperlink can also open in the RealOne Player media playback pane, targeting an existing SMIL region, replacing the current presentation, or popping up a new media playback window. Note, though, that SMIL offers features that you can use in place of hyperlinking. For example, you can pop up a new window during the course of a presentation by using SMIL layout tags. With advanced timing, you can start or end a clip when the viewer clicks another clip. Neither of these features requires hyperlinks. So before you define hyperlinks, be sure that you understand the possibilities offered by SMIL.
![]() |
For More Information: The section "Linking to Streaming Media" lists the attributes and values specific to streaming media links. |
A hyperlink can pop up a new RealOne Player media playback window when
clicked, You can also pop up a window with a <topLayout>
tag as described in
"Secondary Media Playback Windows". Defining secondary media playback
windows is appropriate when you want the new window to pop up at a
predefined point in your presentation. Creating a hyperlink to a new RealOne
Player media playback window is preferable when you want the new window to
pop up based on viewer interaction, and the media you display in the window
is not part of your main SMIL presentation.
If you plan to create an interactive application, you need to consider carefully whether to provide interactivity through hyperlinks, exclusive groups, or both. Suppose that you plan to create a presentation that offers three different video clips that the viewer can select by clicking three buttons. You can author your SMIL presentation in different ways:
Using hyperlinks, you can link each button to a separate video. In this case, your main SMIL file does not contain <video/>
tags that refer to the video clips. Instead, each button uses a hyperlink to play the clip when the button is clicked. This method works well when you want to launch each video in a separate window.
Within an exclusive group, you include a <video/>
tag for each video clip. You then use advanced SMIL timing attributes to play each video clip when the viewer clicks one of the buttons. This method is preferable if you want to display all buttons and clips in a single media playback window, or you want to include SMIL timing and layout attributes in each <video/>
clip source tag.
![]() |
For More Information: See "Creating an Exclusive Group". Chapter 14 explains advanced timing features. |
The screen pointer turns into a hand icon when the viewer moves the pointer over an active link. Typically, the viewer opens the link by clicking it. SMIL lets you define other ways to open a link, too. You might specify a keyboard key that the viewer can press to open the link, for instance. Links can also open automatically, letting you display different Web pages as a presentation plays, for example.
![]() |
For More Information: See "Defining Basic Hyperlink Properties" for more information about these features. |
<area/>
tags with a single clip source tag, however.longdesc
attribute in a clip source tag, using it to describe the hyperlink destination. See "Using a Long Description" for more information.The simplest type of link connects an entire source clip to another clip. As in
HTML, you define the link with <a>
and </a>
tags. But whereas you enclose
text between <a>
and </a>
in HTML, you enclose a clip source tag between <a>
and </a>
in SMIL:
<a href="rtsp://helixserver.example.com/video2.rm"> |
The preceding example links the source clip video1.rm to the target clip
video2.rm. When the viewer clicks video1.rm as it plays, video2.rm replaces it. In
an <a>
tag, the href
attribute is required. The URL begins with rtsp://
if the
linked clip streams to RealOne Player from Helix Universal Server, or http://
if
the file downloads from a Web server.
![]() |
For More Information: For information on link attributes, see "Defining Basic Hyperlink Properties". See either "Linking to HTML Pages" or "Linking to Streaming Media" depending on your intended link target. |
The <area/>
tag differs from the <a>
tag in that you place it within the clip
source tag rather than around it. This means that you must turn unary clip
source tags such as <video/>
into binary tags such as <video>...</video>
, as
described in "Binary and Unary Tags". The <area/>
tag typically ends with a
closing slash, but in some cases you need to use an <area>...</area>
tag pair.
The following is a basic <area/>
tag that links one video clip to a second video
clip:
<video src="video1.rm" region="video_region"> |
If the <area/>
tag includes no spatial coordinates, the entire clip becomes a
link, making the <area/>
tag function just like the <a>
tag. A clip source tag
can include any number of <area/>
tags. When you define multiple <area/>
links for a single clip, however, you need to do one or both of the following:
<area/>
link is active at a different time.<area/>
tag to turn each link into a hot spot that does not overlap the other hot spots.An <area/>
tag can include temporal attributes that specify when the link is
active, relative to the start of clip playback. If you do not include temporal
attributes, the link stays active as long as the source clip appears onscreen. To
add timing attributes, use the SMIL begin
and end
values. You cannot use dur
,
clipBegin
, or clipEnd
, however.
The following example creates two temporal links for the clip video1.rm. The first link is active for the first 30 seconds of playback. The second link is active for the next 30 seconds. Because no spatial coordinates are given, the entire video is a link:
<video src="video1.rm" region="video_region"> |
![]() |
Tip:
An active link is one that the viewer can open, whether by
clicking it or pressing the link's access key. The link does not
open automatically, however, unless you use actuate="onLoad" .
For more information, see "Opening a URL Automatically".
|
![]() |
For More Information:
For more on the begin and end attributes,
see "Setting Begin and End Times". These attributes use the
SMIL timing values described in "Specifying Time Values". See
"Opening Pages on a Mouse Click" for an example of
hyperlinks that vary over time.
|
To create a hot spot with an <area/>
tag, you use the shape
attribute to define
the hot spot's shape, and a coords
attribute to define the hot spot's size and
placement. You define the shape
and coords
attributes in SMIL just as you do
in HTML 4.0. You can use either pixel measurements or percentages to define
any hot spot. The following example shows two hot spots created for a clip:
<video src="video1.rm" region="video_region"> |
How you specify the coordinate values depends on what shape (rectangle, circle, or polygon) you want, as explained in the following sections. In all hot spots, the coordinates are measured from the media clip's upper-left corner regardless of where you place the clip in a region.
Use shape="rect"
to create a rectangular hot spot. You then specify four coords
values in pixels or percentages to set the hot spot's size and placement,
measured from the upper-left corner of the source clip in the following order:
Coordinate values are separated by commas, as shown in the following example:
<video src="video1.rm" region="video_region"> |
The preceding example uses pixel values to define a hot spot 60 pixels wide (80 pixels minus 20 pixels) and 80 pixels high (120 pixels minus 40 pixels). It creates a hot spot like that shown in the following illustration.
![]() |
Tip: Think of the first pair of values as defining the x and y coordinates of the hot spot's upper-left corner, and the second pair of values as defining the x and y coordinates of the hot spot's lower-right corner. |
You can use shape="circle"
to create a circular hot spot. Three coords
values
then specify in pixels or percentages the circle's center placement and radius in
the following order:
The coordinate values are separated by commas, as shown in the following example:
<video src="video1.rm" region="video_region"> |
The preceding example uses pixel values to place the circular hot spot's center 100 pixels in from the clip's left edge, and 120 pixels down from the clip's top edge. The hot spot has a radius of 50 pixels. The following figure illustrates this example.
![]() |
Tip:
The last value, which sets the circle's radius, should not be
more than the smaller of the other two values. If the first two
values are 40 and 20 , for example, the third value should not be
more than 20 . Otherwise, part of the circle extends beyond the
clip boundaries and is cut off.
|
Use shape="poly"
to make a polygonal hot spot with any number of sides. You
might create a triangle or an octagon, for example. For every n
sides of the
polygon you want to create, you must specify 2
n
values in the coords
attribute.
To create a triangle, for example, you need to specify six coords
values. Each
pair of coordinate values indicates the placement of a corner of the polygon in
this order:
The following example defines a triangular hot spot:
<video src="video1.rm" region="video_region"> |
The following figure illustrates the preceding example. The first value pair for
the coords
attribute defines the triangle's lower-left corner. The coords
value
pairs then proceed clockwise, defining the top corner, followed by the lower-
right corner.
![]() |
Tip: When defining a polygon, you can start with any corner, specifying the placement of additional corners by going around the polygon either clockwise or counter-clockwise. |
fill
, meet
, or slice
value for the fit
attribute in the <region/>
tag may resize the clip. In these cases, a hot spot defined with percentages scales with the clip, whereas one defined with pixels does not. If the clip is the same size as the region, or the region's fit
value is hidden
or scroll
, the clip does not scale. For more information, see "Fitting Clips to Regions".coords
attribute. For example, the values "4%" and "4.5%" are both valid.coords
attribute. For example, the attribute coords="50,50,100%,100%"
places a rectangular hot spot's left and top boundaries in and down 50 pixels from the source clip's upper-left corner, respectively. But the hot spot's right and bottom boundaries extend to the source clip's right and bottom edges, respectively, no matter the source clip's size.coords="30,30,10,10"
for a rectangular hot spot are ignored, and the hot spot will not function. Here, the hot spot's left side is defined as being farther to the right than its right side. As well, the top is defined to be below the bottom.coords="50,50,300,300"
but the source clip is 200 by 200 pixels, the hot spot's effective coordinates are "50,50,200,200"
. For this reason, no percentage value can effectively be more than 100%.<area/>
tag.![]() |
View it now!
(requirements for viewing this sample)
Play this sample to view separate hyperlinks defined for each quadrant of the screen. |
The hyperlink attributes summarized in the following table affect link
properties in <a>
and <area/>
tags whether the link opens an HTML page or a
media presentation.
Attribute | Value | Function | Reference |
---|---|---|---|
accesskey |
key_name |
Defines a key stroke that opens the link. | click here |
actuate |
onLoad|onRequest |
Opens the link automatically or on request. | click here |
alt |
text |
Supplies alternate text. | click here |
href |
URL |
Provides the link URL. | click here |
nohref |
(none) | Indicates no URL (<area/> tag only). |
click here |
tabindex |
integer |
Sets a tabbing order for links. | click here |
![]() |
Tip:
The accesskey , alt , and tabindex attributes are defined the
same in SMIL 2.0 as they are in HTML 4.0.
|
As with an HTML hyperlink, the SMIL href
attribute specifies the URL to
open. This should be an HTTP URL for items opened in a browser window,
whether those items reside on a Web server or Helix Universal Server. SMIL
files or clips opened in RealOne Player should generally have an RTSP URL if
they reside on Helix Universal Server. They must have an HTTP URL if they
reside on a Web server, however. See the following sections for more
information:
<video/>
, the basic URL format is the same for hyperlinks.![]() |
Note:
The nohref attribute is not currently functional in
RealOne Player.
|
The nohref
attribute, which can be used only in <area/>
tags, indicates that the
hot spot has no URL associated with it. You can use nohref
with interactive
timing commands to start another clip when the hot spot is clicked, for
example, without activating a hyperlink to an external file. The nohref
attribute does not take a value.
The accesskey
attribute defines a keyboard key that the viewer can press to
open the link. The viewer presses just the defined key, and does not need to
press a helper key such as Alt to open the link. You can define any number of
access keys for a link. In the following example, the viewer could press the
keyboard letter m to open the link:
<area href="http://www.example.com" |
![]() |
Note: The SMIL playback area does not receive the keyboard focus by default. Therefore, the viewer must first click the SMIL playback area before pressing an access key. |
![]() |
View it now!
(requirements for viewing this sample)
This sample demonstrates access key hyperlinks. |
accesskey="M"
, for example. You can specify both the lowercase and uppercase versions of the same key, though, to ensure that letter case does not matter.longdesc
attribute in the clip source tag. See "Using a Long Description" for more information.z-index
value, its links override the links associated with the lower clips. However, if the upper clip uses a value of 1
to 50
for rn:mediaOpacity
, the links for lower clips will open.![]() |
For More Information:
For more on rn:mediaOpacity , see "Adding
Transparency to All Opaque Colors".
|
z-index
stacking order does not determine the link precedence, the link that becomes active first overrides the other links.The actuate
attribute has a default value of onRequest
, which makes the link
open only when the viewer clicks the link, or presses the link's access key. If
you set actuate="onLoad"
, however, the link opens as soon as the link tag
becomes active in the SMIL presentation timeline, without requiring any user
input. For example, the following link opens when the video clip begins to
play:
<video src="video1.rm" region="video_region"> |
As described in "Creating a Timed Link", you can use a begin
attribute in the
<area/>
tag to cause the link to become active after its associated clip starts to
play. This lets you open a link at some point after a clip begins to play.
![]() |
Tip:
A link that uses actuate="onLoad" is still clickable, meaning
that the viewer can reopen it after it opens automatically. If you
want to prevent this, set a short link duration by using
dur="1s" , for example, in the <area/> tag.
|
A hyperlink can include an alt
attribute that uses short, descriptive text as its
value. It is good practice always to include an alt
attribute in hyperlinks. When
the viewer moves the screen pointer over the link, the alt
text displays in the
status line above the RealOne Player media playback pane, indicating what the
link will open. In the following example, the text "Visit RealNetworks" is used
for the alt
value:
<area href="http://www.realnetworks.com" alt="Visit RealNetworks" .../> |
If the clip that includes the link also has an alt
value, the link's alt
value
displays instead of the clip's. If the link has no alt
value, its URL displays in
place of the clip's alt
value. In short, a link always overrides the clip's alt
value.
![]() |
For More Information:
The section "Including an Alternate Clip
Description" covers the alt attribute in clip source tags. See
"Coded Characters" for information on including special
characters in alt text.
|
When multiple links appear onscreen, the viewer can press Tab to cycle
between the links, then press Enter to open a link. Using the tabindex
attribute,
you can specify the tabbing order. This attribute, which has a default value of
0, takes a positive integer as a value. RealOne Player highlights the clip with
the lowest tabindex
value first. It highlights the clip with the next higher
tabindex
value each time the viewer presses Tab. The following is an example of
two clips playing in parallel, each of which has a hyperlink:
<par> |
In the preceding example, the link for the video clip has the lower tabindex
value, so RealOne Player highlights it first when the viewer presses Tab.
RealOne Player highlights the image clip next when the viewer presses Tab
again.
![]() |
Tip:
If two or more <area/> tags have the same tabindex value,
the tabbing order follows the order in which the clip source
tags appear in the SMIL file. This also occurs if you leave
tabindex out of all <area/> tags.
|
The attributes summarized in the following table allow you to open HTML pages from your SMIL presentation. You can use these attributes to open a Web page while a presentation plays, for example. Web page links open by default in a RealOne Player browsing pane, though you can also open them in the viewer's default browser.
Attribute | Value | Default | Function | Reference |
---|---|---|---|---|
rn:contextWindow |
auto|openAtStart |
auto |
Sets when related info pane opens. | click here |
external |
false|true |
false |
Opens link in a browser when true . |
click here |
height |
pixels |
media height | Sets related info pane height in <param> tag. |
click here |
rn:sendTo |
_osdefaultbrowser| |
(none) | Specifies window that opens the HTML page. | click here click here |
sourceLevel |
percentage |
100% |
Sets audio level. | click here |
sourcePlaystate |
pause|play|stop |
pause |
Changes source state. | click here |
target |
name |
current window | Targets window or frame. | click here |
width |
pixels |
330 |
Sets related info pane width in <param> tag. |
click here |
![]() |
Tip: You can also open an HTML URL through a Ram file. This is useful for presentations that consist of a single clip, and do not require the advanced features that SMIL provides. For instructions on this, see "Opening a URL in an HTML Pane". |
For a SMIL hyperlink to open in a Web browser, the external
attribute must be
set to true
. (The external
attribute's default value is false
, however, which opens
the link in the RealOne Player media playback pane.) The link must also use
an HTTP URL that the browser can request. Minimally, a SMIL link for
content played in a Web browser looks like the following example:
<area href="http://www.example.com" external="true"/> |
Using external="true"
is the only requirement for opening an HTML page in a
Web browser. As described in "Links to HTML Pages", however, RealOne
Player offers several browsing panes. The following table lists the attributes
required to open an HTML URL in one of these panes.
Attributes | Target | Reference |
---|---|---|
external="true" |
A secondary browsing window that does not attach to the media playback and related info panes. | click here |
external="true" |
The media browser pane, which can attach to, or detach from, the media and related info panes. | click here |
external="true" |
The viewer's default Web browser. | click here |
external="true" |
The related info pane, which appears to the right of the media playback pane. | click here |
![]() |
View it now!
(requirements for viewing this sample)
This sample provides an overview of RealOne Player linking, demonstrating how to use SMIL to open HTML pages in the RealOne Player related info and media browser panes. |
Note the following important points about using the rn:sendTo
attribute:
rn:sendTo
attribute works only in SMIL <area/>
tags. It does not function with <a>
tags.rn:sendTo
attribute requires that you declare the following namespace in the <smil>
tag:xmlns:rn="http://features.real.com/2001/SMIL20/Extensions" |
![]() |
For More Information: For background on customized attributes and namespaces, see "Using Customized SMIL Attributes". |
RealOne Player's media browser pane can attach to, or detach from, the media
playback and related info panes. This is the recommended pane for displaying
Web pages along with your presentation. To target this pane, declare the
RealNetworks extensions namespace in your <smil>
tag as described above,
and use a hyperlink that looks like the following:
<area href="http://www.example.com" external="true" |
![]() |
Tip:
To target this pane from an HTML page displaying in the
related info pane or a secondary browsing window within the
RealOne Player environment, use <a href=" URL "
target="_rpbrowser"> .
|
Web page links open in a RealOne Player media browser pane by default.
Although this is preferred means for displaying these pages, you can also open
these links in the viewer's default Web browser. To do this, declare the
RealNetworks extensions namespace in your <smil>
tag as described above,
and create a link that looks like the following:
<area href="http://www.example.com" external="true" |
Appearing to the right of the media playback pane, the related info pane can display HTML pages that supplement your SMIL presentation. It might display title and copyright information about clips as they play, for example. Using the SMIL timing features described in Chapter 13 and Chapter 14, as well as the hyperlinking features described in this chapter, you can open a URL in the related info pane at any time during the presentation.
To open an HTML page in the related info pane, declare the extensions
namespace (xmlns:rn="http://features.real.com/2001/SMIL20/Extensions"
) in
your <smil>
tag, and add rn:sendTo="_rpcontextwin"
to the <area/>
link tag:
<area href="http://www.example.com/context.html" external="true" |
Through <rn:param/>
tags, you can extend an <area/>
tag link to include sizing
information for the RealOne Player related info pane. This requires that you
turn your <area/>
tag into a binary tag as described in "Binary and Unary
Tags". To specify the related info pane width and height in pixels, you then
add <param/>
tags to the link, as shown in the following example:
<area href="..." external="true" rn:sendTo="_rpcontextwin" ...> |
![]() |
View it now!
(requirements for viewing this sample)
This sample automatically opens a series of HTML pages in the RealOne Player related info pane. |
When the media browser pane is attached, a SMIL presentation that plays
without an HTML page for the related info pane appears centered above the
media browser pane. If an HTML page later opens in the related info pane, the
SMIL presentation jumps to the left. To prevent this effect, which can be
jarring for the viewer, include rn:contextWindow="openAtStart"
in the <root-
layout/>
tag (not the <area/>
tag):
<root-layout width="320" height="240" |
When you use this attribute, the SMIL presentation appears at the left side of
the top two panes. Any HTML pages then sent to the related info pane appear
at the right side. To prevent height resizing when an HTML page appears,
specify the same height for the related info pane that you use in the <root-
layout/>
area. The rn:contextWindow
attribute has no visible effect when the
media browser pane is detached.
![]() |
View it now!
(requirements for viewing this sample)
In RealOne Player, make sure that the media browser pane is attached. Then, play the first sample, which makes room for the related info pane when the presentation starts, placing the video flush left. The second sample does not use rn:contextWindow , so the video appears centered at first,
moving to the left when the related info pane opens.
|
<root-layout/>
tag's height
and width
attributes). Be careful that the combined widths of the media playback pane and related info pane do not make the presentation too large to display on small computer screens.backgroundColor
attribute of your SMIL presentation's <root-layout/>
tag, as described in "Adding Background Colors".sourcePlaystate="play"
and actuate="onLoad"
in the <area/>
tag in your SMIL file.![]() |
Note: HTML frame and window targeting is not currently functional in RealOne Player. |
When you use SMIL to open an HTML page, the SMIL target
attribute works
much the same as the HTML target
attribute. When a hyperlink targets a
RealOne Player secondary browsing window (using just external="true"
) or the
default browser (using rn:sendTo="_osdefaultbrowser"
), the target
attribute can
do one of the following:
When a link specifies the media browser pane (with rn:sendTo="_rpbrowser"
) or
the related info pane (using rn:sendTo="_rpcontextwin"
), the target
attribute can
select an existing frame. The following example shows how to open a link in
the frame named rightpane
within the media browser pane:
<area href="http://www.example.com" external="true" |
![]() |
Tip:
The HTML values _new and _top are not supported in the
RealOne Player environment. Use actual window names
instead.
|
By default, the SMIL presentation pauses while an HTML page link opens.
The viewer can resume the presentation by clicking the RealOne Player Play
button. RealOne Player typically needs to rebuffer the presentation briefly
before continuing playback. You can also make RealOne Player stop the
presentation completely, or continue playing when the link opens, with a stop
or play
value, respectively, for the sourcePlaystate
attribute:
<area href="http://www.example.com" external="true" |
href
attribute any additional parameters you want the browser to receive. A common use of this is linking to an anchor in an HTML page:
<area href="http://www.example.com/story.html |
sourcePlaystate="play"
to keep the SMIL presentation playing while the viewer's default Web browser opens the link, you cannot prevent the browser from obscuring RealOne Player. Whether RealOne Player remains in front of other applications as it plays is entirely under the viewer's control.sourcePlaystate="play"
, leave a few Kbps of bandwidth available to download HTML pages, depending on the size of the HTML pages that will display. To minimize bandwidth required by the browser, link to Web pages that do not contain large graphics. The table "Maximum Streaming Rates" lists bandwidth targets.sourceLevel
attribute to change the RealOne Player volume when the Web page opens.When you link to another streaming media presentation, whether a SMIL file or a single clip, you can open the link URL in the existing RealOne Player media playback pane, or pop up a new media playback window. The following table summarizes the attributes that you use to link to streaming media.
Attribute | Value | Default | Function | Reference |
---|---|---|---|---|
href="command: |
( name , URL ) |
(none) | Opens media from Flash, RealPix, or RealText. | click here |
destinationLevel |
percentage |
100% |
Sets audio level of target. | click here |
destinationPlaystate |
pause|play |
play |
Sets play state of target. | click here |
show |
new|replace |
replace |
Opens link in a new or the current window. | click here |
sourceLevel |
percentage |
100% |
Sets audio level of source. | click here |
sourcePlaystate |
pause|play|stop |
pause|play |
Sets play state of source depending on show. |
click here |
target |
ID |
(none) | Links to a specific window or region. | click here |
A link that does not include the external="true"
attribute (which opens the link
in a Web browser) replaces the current presentation in the RealOne Player
media playback pane. The source presentation is only paused, however, so the
viewer can return to it by clicking RealOne Player's Play>Previous Clip
command. Hence, an RTSP link like the following:
<area href="rtsp://helixserver.example.com/video2.rm"/> |
is equivalent to the following link, in which the show
, destinationPlaystate
, and
sourcePlaystate
attributes are explicitly set to their default values:
<area href="rtsp://helixserver.example.com/video2.rm" show="replace" |
![]() |
Note: Currently, the source clip always stops, rather than pauses, when the destination clip replaces it. |
In some cases, you may want to set destinationPlaystate="pause"
to keep the
new presentation from playing until the viewer clicks the RealOne Player Play
button. It's not necessary ever to include the sourcePlaystate
attribute when
replacing a presentation in RealOne Player. Its value of pause
is always used
with show="replace"
, so specifying play
or stop
for sourcePlaystate
has no effect.
The following table summarizes the possible hyperlink attribute values for replacing a presentation in the existing RealOne Player pane. The first option listed in the table is the default.
![]() |
View it now!
(requirements for viewing this sample)
In this sample, click the playing clip to replace it with a new clip in the same media playback pane. |
You can use either the show
or the target
attribute to open a new media
playback window. The basic means for doing this is to set show="new"
in the
link tag. You can open any number of new windows this way. Using
show="new"
does not create a named window that you can target with another
hyperlink, however:
<area href="rtsp://helixserver.example.com/video2.rm" |
By default, the current window containing the link and the new window with the target media are both set to play. Therefore, the preceding example is equivalent to the following example:
<area href="rtsp://helixserver.example.com/video2.rm" show="new" |
Depending on how you want linking to operate, you can change the setting for
sourcePlaystate
to pause
or stop
. You can also set destinationPlaystate
to pause
. A
common scenario is to pause the source presentation when the viewer opens
the new window. The viewer can restart the source presentation by clicking the
RealOne Player Play button. The following example illustrates this markup:
<area href="rtsp://helixserver.example.com/video2.rm" show="new" |
![]() |
View it now!
(requirements for viewing this sample)
In these samples, you can click the playing clip to open a new clip in a new window and pause the first clip, or keep the first clip playing. |
![]() |
Note: Targeting a named media window or region is not currently functional in RealOne Player. |
Whereas show="new"
opens a link in a new, unnamed media playback window,
target="
name
"
creates a named window that you can select through subsequent
hyperlinks. It also lets you open linked media in a specific SMIL region of an
existing window, rather than in a new window. The show="new"
attribute does
not include these two capabilities.
The target
attribute takes a user-defined name as its value. As with show="new"
,
you can set sourcePlaystate
to play
, pause
, or stop
. You can also set
destinationPlaystate
to play
or pause
. The following example defines a link that
opens in a SMIL region or a new window named play3
:
<area href="rtsp://helixserver.example.com/video2.rm" |
When RealOne Player opens the link in preceding example, it displays the linked media in the following way:
play3
. That is, it looks for a SMIL region in any open window that has the play3
ID:<region id="play3" .../> |
play3
exists, RealOne Player displays the linked media in the window named play3
. That is, it looks for a window created through a previous hyperlink that used a target="play3"
attribute.play3
exists, RealOne Player creates a new window with the play3
name, displaying the linked media in that window.![]() |
View it now!
(requirements for viewing this sample)
These two samples each display two images linked to two separate videos. The first sample uses the target
attribute to open each video in
the same media playback window. The second sample uses
the target attribute to open each video in a
different media playback window.
|
target
and show
in a link, the show
attribute is ignored.target
exclusively to define your streaming media hyperlinks:target
nor show
. Replacing the presentation is the default action, so you do not need to include these attributes.target="
name
"
to open a link in a SMIL region, or in a new or existing window.show="new"
or target="
name
"
.
target="name"
.target="
name
"
.target="_new"
.fit
attribute determines how the linked media appears if the region and media are different sizes. See "Fitting Clips to Regions" for more on fit
.A SMIL file hyperlink can target a specific place in another SMIL file, or
another part of itself. To create a link of this type, you include the appropriate
SMIL ID in the href
attribute after the URL and a pound sign (#), just as if
linking to an HTML fragment:
<area href="rtsp://helixserver.example.com/movie2.smil |
The preceding link opens the designated SMIL file, and starts playback at the
clip or group that includes the text_and_video
ID:
<par |
Note that the target SMIL file defines two regions, newsregion
and textregion
.
When RealOne Player receives the new SMIL file, it creates those regions as
specified in the new SMIL file's header.
![]() |
View it now!
(requirements for viewing this sample)
In this sample, a sequence of three videos plays. Each numbered button links to a separate video through a SMIL fragment. You can thereby use the buttons to skip to any part of the presentation. |
![]() |
Note: Linking to a clip with a timeline offset is not currently functional in RealOne Player. |
You can use the <area>
tag's time coordinates to create a timeline offset in a
linked clip. Suppose that you want to link a video to another video at 30
seconds into the second video's timeline. In the source SMIL file, you define a
link from the first video to a SMIL file that contains the second video. In the
second SMIL file, the video's <area>
tag defines the timeline offset using SMIL
timing parameters.
Here is a sample of the link in the first SMIL file:
<video src="video1.rm" region="video_region"> |
The following is the linked video clip in the second SMIL file, newmedia.smil:
<video src="video2.rm" region="newsregion"> |
![]() |
For More Information: "Specifying Time Values" describes the SMIL timing values. |
href="#
ID
"
.<par>
, <seq>
, <excl>
, or <switch>
group by defining an id
attribute for the clip or group. Do not link to an element in a SMIL file header, however, or to an element within a <switch>
group.<par>
group and exclude the other clips in that group. All clips in the group will play in their designated regions.Two attributes in a hyperlink tag, sourceLevel
and destinationLevel
, can adjust
the volume of the source player and the destination player when a link opens.
If the source clip does not stop or pause when the link opens, for example, you
can use sourceLevel
to turn down the source player's volume and boost the
destination player's volume:
<area href="..." sourceLevel="35%" destinationLevel="125%".../> |
The audio level attributes always use a percentage value. The default value of 100% keeps the player at its current volume setting. A 50% value, for example, turns the player's audio volume down to half of its current setting, whereas a value of 200% doubles the audio volume.
Note that the sourceLevel
and destinationLevel
attributes control only the
relative volume of the audio stream sent to the speakers. They do not change
the general sound level setting on the viewer's computer, which remains
entirely under the viewer's control. All sound level adjustments are subject to
limitations in the computer hardware.
![]() |
Tip:
When displaying a Web page, as described in "Linking to
HTML Pages", you can use sourceLevel to turn down or boost
RealOne Player's volume as appropriate. The destinationLevel
attribute will not affect any audio elements, such as an
embedded WAV file played by the browser, though.
|
![]() |
View it now!
(requirements for viewing this sample)
This sample displays two hypertext links that play a video at half or double volume. |
A RealText, RealPix, or a Flash clip, playing alone or as part of a SMIL
presentation, can define a hyperlink that opens another clip in a new media
playback window, and stops the original presentation, on a click. This type of
link uses a proprietary parameter, command:openwindow(
name
,
URL
)
, as the value
of the href
attribute. This is not a SMIL feature, and you write this parameter
directly into the RealText or RealPix markup, or encode it in the Flash Player
file with the Get URL command.
The hypertext reference for this type of link has the following structure:
href="command:openwindow( |
The command:openwindow
parameter requires two arguments, name
and URL
.
The
zoomlevel
argument is optional. You can separate arguments with a
comma, but this is not required. A space may precede or follow a comma. If an
argument contains characters such as commas or parentheses, enclose it in
single quotation marks.
The required name
argument, which supplies a predefined or user-defined
name for the new media playback window, is the first parameter listed for
command:openwindow
. The following table describes the parameter values.
Following the name
argument, the required URL
argument gives the fully
qualified URL to the clip or SMIL presentation to play in the new window.
You must include the protocol (rtsp://
, http://
, chttp://
, or file://
) in the URL.
Relative URLs do not work.
For testing, or if developing a presentation that plays back locally for all
viewers, you can use absolute, local URLs in the following format, which
includes three forward slashes in file:///
, and uses forward slashes in path
names as well:
file:///C:/My Documents/videos/video1.rm |
The optional zoomlevel=double|full|normal
argument sets the new media
playback window to open in double-size or full-screen mode respectively. The
normal
value is the default. If the operating system does not support full-
screen mode, normal mode is used instead.
![]() |
For More Information: You can also open the initial presentation in double or full-screen mode by using a Ram file. For details on doing this, as well as guidelines for using double and full- screen modes, see "Controlling How a Presentation Initially Displays". |
![]() |
Note:
Earlier versions of RealPlayer support additional
parameters, such as autosize and ontopwhileplaying , that
RealOne Player ignores. RealOne Player is therefore backwards-
compatible with presentations developed for earlier versions of
RealPlayer. These additional parameters are obsolete, however.
|
The following examples show how to target various windows with the
command:openwindow
hyperlink syntax inRealText and Flash clips. These
examples link to single RealVideo clips, but you can link to any streaming clip
or SMIL presentation.
The following RealText link opens a URL in a new media playback window
named feature
:
<a href="command:openwindow(feature, rtsp://helixserver.example.com/comedy.rm)">Comedy Hour</a> |
The syntax in RealPix is the following:
url="command:openwindow(feature, rtsp://helixserver.example.com/comedy.rm)" |
In Flash, the Get URL command looks like this:
command:openwindow(feature, rtsp://helixserver.example.com/comedy.rm) |
When first clicked, this link creates a media playback window named feature
.
If another link also targets the feature
window, clicking that link starts the
new URL in the feature
window. Clicking the link in the following example
starts an animal program in the window running the comedy program:
<a href="command:openwindow(feature, rtsp://helixserver.example.com/animals.rm)">Sharks!</a> |
url="command:openwindow(feature, rtsp://helixserver.example.com/animals.rm)" |
The Flash Get URL version looks like this:
command:openwindow(feature, rtsp://helixserver.example.com/animals.rm) |
Each link opens a separate window if the window names are different, or you
use the predefined name _new
or _blank
. The following RealText links open
separate windows:
<a href="command:openwindow(_new, rtsp://helixserver.example.com/comedy.rm)">Comedy Hour</a> |
<a href="command:openwindow(_blank, rtsp://helixserver.example.com/animals.rm)">Sharks!</a> |
The following are the corresponding RealPix links:
url="command:openwindow(_new, rtsp://helixserver.example.com/comedy.rm)" |
url="command:openwindow(_blank, rtsp://helixserver.example.com/animals.rm)" |
In Flash, the Get URL commands look like these:
command:openwindow(_new, rtsp://helixserver.example.com/comedy.rm) |
command:openwindow(_blank, rtsp://helixserver.example.com/animals.rm) |
Use either _current
or _self
to open the URL in the current window. The
following example is for RealText:
<a href="command:openwindow(_self, rtsp://helixserver.example.com/comedy.rm)">Comedy Hour</a> |
The next RealText link plays the clip at double its encoded size:
<a href="command:openwindow(_current, rtsp://helixserver.example.com/animals.rm, zoomlevel=double)">Sharks!</a> |
The following are the same commands given through RealPix:
url="command:openwindow(_self, rtsp://helixserver.example.com/comedy.rm)" |
url="command:openwindow(_current, rtsp://helixserver.example.com/animals.rm, zoomlevel=double)" |
The following are the same commands issued through Get URL in Flash:
command:openwindow(_self, rtsp://helixserver.example.com/comedy.rm) |
command:openwindow(_current, rtsp://helixserver.example.com/animals.rm, zoomlevel=double) |
command:openwindow
and its parameters.command:openwindow
link, the new clip automatically plays, and the presentation that contains the link stops. You cannot change this playback state to pause the original presentation, for example.command:openwindow
is not a SMIL command, it does not offer all the SMIL linking features, such as activating automatically or on a keystroke.command:openwindow
link, the SMIL link is used.command:openwindow
syntax is backwards-compatible with RealPlayer 7 and RealPlayer 8, but not earlier RealPlayers, including RealPlayer G2.The following examples show different applications of hyperlinking. To see more examples, get the zipped HTML version of this guide as described in "How to Download This Guide to Your Computer", and view the Sample Files page.
The following markup uses a series of <area/>
tags with different begin
times
to open four Web pages at different points as an audio clip plays. The
actuate="onLoad"
attribute causes each link to open its Web page as soon as the
link becomes active. Because the links do not use rn:sendTo="_rpbrowser"
, the
pages open in secondary browsing windows. The sourcePlaystate="play"
attribute keeps the clip playing as each page opens:
<audio src="audio1.rm"> |
![]() |
View it now!
(requirements for viewing this sample)
Play this sample to watch HTML pages open automatically as a clip plays. |
![]() |
Tip: Opening a Web page requires bandwidth. If your streaming media uses all of the viewer's available bandwidth, opening a Web page may cause the presentation to stall. When opening Web pages during a presentation, be sure that your streaming media uses less bandwidth than the maximum listed in the table "Maximum Streaming Rates". |
A link to an HTML page does not have to open automatically. If you leave out
the actuate="onLoad"
attribute, the link opens only when the viewer clicks the
clip. In the following example, the video clip defines four timed hyperlinks.
The begin
and dur
attributes make each link active for one minute at a
different point in the presentation. Viewers therefore display different pages
depending on when they click the video clip:
<video src="rtsp://helixserver.example.com/video1.rm"> |
![]() |
View it now!
(requirements for viewing this sample)
Play this sample see a clip that links to different HTML pages at different times. |
![]() |
©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. |