Inside Macintosh: QuickTime Reference

| Previous | Chapter Contents | Chapter Top | Next |

A Sequence with HREF, Region and Background Text

In the example in Listing 2, a streamed video of known duration that is hyperlinked is displayed for its entire duration, followed by a live video stream.

In this more complex example, you specify a background color that defines a single region with a width and height. This one defines several regions and is more elaborate about the layout. It tells you that the overall presentation should be a certain size, the background color should be a certain value, and within the root layout you have several other regions which you use in playback. In this example, the playback is at 100 percent of the width and height.

The result is an iBook commercial that appears first via RTSP. If you click in the content region during its duration, you invoke the URL in a browser window, launching the browser if it is not already open. Once the iBook commercial is finished, it is followed by the Apple PowerMac G4 tanks commercial via RTSP.

Listing 2  A SMIL file displaying a streamed video of known duration, which is click- through enabled (hyperlinked), followed by a live video stream

<smil xmlns:qt="http://www.apple.com/quicktime/resources/smilextensions" qt:autoplay="true">
    <head>
        <layout>
            <root-layout id="rl" width="250" height="250" background-color="green" />
            
            <region id="vodAd" width="240" height="180" />
            <region id="vodmovie" width="100%" height="100%" fit="fill" />
        </layout>
    </head>

    <body>
        <seq>
            <a href="http://www.apple.com" show="new">
            <!-- VOD ad -->
            <video src="rtsp://coolqtsdemo.apple.com/ads/vodibooklow.mov" 
                        region="vodAD" /></a>

            <!-- to a VOD movie --> 
            <video src="rtsp://cool.apple.com/ads/vodtankslow.mov" region="vodmovie "/>
        </seq>
    </body>
</smil>

It is possible to extend these examples and introduce more elaborate spatial and temporal layouts, so that you can make more than one thing happen at a time. You can have sequences within hierarchies, for example.


© 2000 Apple Computer, Inc.

Inside Macintosh: QuickTime Reference

| Previous | Chapter Contents | Chapter Top | Next |