Inside Macintosh: QuickTime Reference

| Previous | Chapter Contents | Chapter Top | Next |

A Simple Sequence

In the example in Listing 1, an image starts by displaying a logo in JPEG format for five seconds. It then plays streaming video, which is a stored stream. This particular SMIL document does not specify the duration, which means that it will play for its entire length. Once it has finished, it will display the very same JPEG image at the end. Using this simple sequence, you could wrap or bracket a stream, for example, with your company logo.

Listing 1  A SMIL file displaying a JPEG image for five seconds, then playing a VOD stream to the end of the movie, followed by displaying a JPEG image without duration

<smil>
    <head>
        <layout>
            <region id="j_VOD_j" width="160" height="120" />
        </layout>
    </head>
    
    <body>
            <!--start with 160 x 120 jpeg from url, for duration of 5 secs-->
            <img src="http://anyqtpartners.apple.com/ad/Images/image.jpg"
                dur="5s"region="j_VOD_j"/>
        
            <!--insert VOD movie, plays to end of movie-->
            <video src="rtsp://anycoolqtsdemo.apple.com/ql41/codecs/sorenmodqt.mov"
                region="j_VOD_j"/>
                    
            <!--then back to orig jpeg from url for duration of 5 seconds 
            (duration required for display)-->
            <img src="http://anyqtpartners.apple.com/ad/Images/image.jpg"
                region="j_VOD_j" dur="5s"/>
    </body>                         
</smil>

Simple sequences are very easy to create. In the body of a SMIL document, you can explicitly state that this is a sequence by using the <seq> tag. If you don't, the default will still be a sequence.


© 2000 Apple Computer, Inc.

Inside Macintosh: QuickTime Reference

| Previous | Chapter Contents | Chapter Top | Next |