Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

MovieQTList Embed Tag Attribute

QuickTime movies can contain structured data in QTList format. A QTList has a user-defined structure, much like a database or an XML file. QuickTime 5 and later include wired actions that allow a movie to parse a QTList and take actions based on the contents. For example, a QTList can contain a list of audio files, and the movie can load and play songs from the list based on user selections.

QuickTime movies can read a properly structured XML file into a QTList, or exchange XML-structured data between a QTList and a server. This enables a QuickTime movie to act as the front end of a database, for example, allowing the user to view or modify records stored on a remote server.

A QuickTime movie can have one QTList for the movie as a whole, as well as one for each track in the movie.

QuickTime 6 adds a MovieQTList parameter that allows you to pass data into the movie-level QTList directly from HTML. This lets you specify the default contents of the movie QTList as part of your Web page. Combined with either JavaScript or a server-side script, this enables you to dynamically pass data into a movie when it is opened in a browser.

The MovieQTList parameter is used in the EMBED and OBJECT tags of your Web pages. For example:

<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
        CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab"
        WIDTH="xx" HEIGHT="yy" >
 
        <PARAM NAME="src" VALUE="my.mov" />
        <PARAM NAME="MovieQTList" VALUE=
        "<myDataBase>
            <myRecord>
                <lastname>Bailey</lastname>
                <firstname>Bill</firstname>
                <phone>555-1212</phone>
            </myRecord>
         </myDataBase>"
/>
 
<Embed src=my.mov
    height=yy width=xx
    MovieQTList=
"<myDataBase>
    <myRecord>
        <lastname>Bailey</lastname>
        <firstname>Bill</firstname>
        <phone>555-1212</phone>
    </myRecord>
</myDataBase>"
/>
 
</OBJECT>

Note that the XML data is just data––there is no XML header or meta-information.

Most recent browsers can handle the HTML in the example above, ignoring all the angle brackets and forward slashes because they occur between quotes. Some older browsers may become confused, however, and terminate the PARAM or EMBED tag at the first ">" in the MovieQTList parameter value. You can prevent this by constructing the QTList data using JavaScript.

For example:

<script language="JavaScript">
    embedTag = '  <embed'
        + ' src=\"my.mov\"'
        + ' height=yy width=xx'
        + ' MovieQTList='
        + '  \"<myDataBase>'
        + '    <myRecord>'
        + '      <lastname>Bailey</' + 'lastname>'
        + '      <firstname>Bill</' + 'firstname>'
        + '      <phone>555-1212</' + 'phone>'
        + '    </' + 'myRecord>'
        + '  </' + 'myDataBase>\"'
        + ' /' + '>;
 
    document.writeln(embedTag);
</script>

To use the MovieQTList parameter, you typically add a set of wired actions to your movie (using either the QuickTime API or a QuickTime editing program such as LiveStage Pro) that use properties of a QTList. An example would be loading a child movie using a URL from the movie QTList. You would then format the data you wish to pass in your HTML so that it conforms both to proper XML syntax and to the structure of your QTList.

The MovieQTList parameter creates a movie QTList if the movie does not contain one already. If the movie does contain a movie QTList, the MovieQTList parameter values overwrite the existing list. This allows you to create a movie that contains a default list to be used when the movie is viewed outside your Web pages.

Important:  Test your HTML carefully. No error message is displayed if the data is incorrectly formatted for XML or fails to match the structure of your QTList.



< Previous PageNext Page > Hide TOC


Last updated: 2002-07-01




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice