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.

XML Import

QuickTime 5 introduces support for opening XML documents and importing them as movies –– without relying on their extension. The syntax is:

<?xml version="1.0">
<?quicktime type="application/smil"?>

where application/smil is replaced with the mime type for the XML document. You can verify this by using a SMIL script. You rename the file to end with .mov and add the above two lines to the top of the document, and then Save As with the .mov extension. The two lines are followed by the XML document’s content.

Note that the lines must be present in order for the code to work correctly, and both lines must be at the very top of the document. Note also that you can’t have extra lines in between the two lines.

New QuickTime Media Links XML Importer

QuickTime 5 introduces support for a new XML importer –– QuickTime Media Links. This is a small XML file that has similar attributes to the embed tag in HTML used for the plugin, but targets QuickTime Player instead of the plugin. This section discusses the supported attributes and values, and how to create the file.

To test the new QuickTime Media Links XML importer, you create a text file with the following two lines at the top of the file:

<?xml version="1.0"?>
<?quicktime type="application/x-quicktime-media-link"?>

Next, you add the embed tag itself:

<embed src="http://somewhere.com/Movies/test.mov" />

Supported Attributes and Values

The following attributes and values are currently supported:

 autoplay - true/false
 controller - true/false
 fullscreen - normal/double/half/current/full
 href - url
 kioskmode - true/false
 loop - true/false/palindrome
 movieid - integer
 moviename - string
 playeveryframe - true/false
 qtnext - url
 quitwhendone - true/false
 src - url (required)
 type - mime type
 volume - 0 (mute) - 100 (max)

Note the following:

while this (although valid in HTML) is not:

<embed src="http://somewhere.com/Movies/test.mov" autoplay />

Only a subset of the possible attributes, however, need to be specified at once.

Support for the XML importer is packaged in a movie importer ('eat ' component) and is designed to work in any QuickTime-aware application. However, there is currently no file type or file extension associated with this type. Instead, the importer is found by using the MIME type when embedded in a XML movie. The MIME type is found in the line:

<?quicktime type="application/x-quicktime-reference"?>

The purpose of this embed format is to serve as a text link that can be opened in QuickTime Player. Currently, the text link format (.qtl) is configured by the MIME settings panel to be specially routed to QuickTime Player and is never seen by the plug-in.

This format allows QuickTime Player to basically open the reference file and then set the appropriate attributes. There is no movie media involved as there is with SMIL.

The format can be used to author a movie with the specified options. Thus, in order to create a movie with the fullscreen and autoplay options set, you could create a file like the following, import it, and then save the resulting movie self-contained:

<?xml version="1.0"?>
<?quicktime type="application/x-quicktime-media-link"?>
<embed src="http://somewhere.com/Movies/test.mov"  autoplay="true"
            fullscreen="double"/>

Keep in mind that this is XML, and not HTML. Don’t forget the trailing "/>" in the embed line.



< Previous PageNext Page > Hide TOC


Last updated: 2001-10-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