Commands
Command tags add functionality and interactivity to a SMIL presentation.
For example, you can use them to launch URLs in a browser or RealPlayer,
or to issue RealPlayer commands such as Pause and Play.
The syntax of command tags is very similar to HTML, in that it
uses standard <a href ...> and </a>
tags, and usually specifies a target where the action specified
will occur.
Opening a URL in RealPlayer
The following RealText tag makes the text enclosed between <a
href...> and </a> a hyperlink that
opens in RealPlayer:
<a href="URL" target="_player">...</a>
The specified URL should begin with a protocol designation such
as http:// or rtsp://. The URL can use
any protocol RealPlayer or the user's Web browser supports. The
optional target="_player" attribute launches
the new stream in the current RealPlayer window. If you do not use
the target attribute or you specify target="_browser",
the linked URL opens in a Web browser window.
The following example launches a new SMIL Presentation in RealPlayer:
<a href=
"rtsp://realserver.bu.edu:554/ramgen/a/v/av/nis/training/smil2/video2.smil
target="_player">Play Next</a>
Opening a URL in a Web Browser
You can create hyperlinks to web pages in RealText. The hyperlink
syntax is identical to HTML. For example:
<a href="http://www.bu.edu/webcentral/">Visit
WebCentral</a> to learn more about this topic.
You can also create e-mail hyperlinks using the mailto:
syntax just as in HTML.
RealPlayer Commands
RealPlayer commands include functions such as stopping and starting
the player, or moving to a specific point in the playback timeline.
All command tags contain the following basic elements, with modifications
for each specific type of command:
<a href="command:<some command>" target="_player">...</a>
Note that commands are case-sensitive and must be enclosed in double
quotes. The target="_player" attribute is
required. The following sections describe the available commands
for RealPlayer:
Command Syntax
Seek <a href="command:seek(time)" target="_player">
Pause <a href="command:pause()" target="_player">
Play/Resume <a href="command:play()" target="_player">
|