Inside Macintosh: QuickTime Reference

| Previous | Chapter Contents | Chapter Top | Next |

How It Works

When the QuickTime Plug-in encounters a URL, it compares the URL in an unpredictable order with the list of substitutes. Note that these comparisons are case sensitive. If the start of the supplied URL matches exactly one of the "oldprefixs", oldprefix is removed and newprefix is inserted in its place and the search for substitution stops. The resulting URL is passed along to QuickTime or the browser as normal.

This only affects URLs in HREF tracks, sprite action URLs, and hotspot URLs. (Note that QuickTime has been able to do this with VR hotspot URLs, using the HOTSPOT tag). Data reference URLs are not substituted.

In general, URLs can be re-targeted when the same piece of content needs to be served for a variety of purposes. For example, in an HREF track and sprite actions one might have the following URLs:

=content=frontview.mov
=content=backview.mov
=action=buyit.cgi?item=hotplate

and an embed line with

URLSUBSTITUTE="<=content=>:<http://contentserver.com/views/>"
URLSUBSTITUTE="<=action=>:<http://ecommerce.com/actions/>"
Note:  This above example won't work in the Internet Explorer browser, so we use URLSUBSTITUTE1 and URLSUBSTITUTE2, as shown below.

and an embed line with

URLSUBSTITUTE1="<=content=>:http://contentserver.com/views/>"
URLSUBSTITUTE2="<=action=>:http://ecommerce.com/actions/>"

which will result in the following URLs being used after substitution:

http://contentserver.com/views/frontview.mov
http://contentserver.com/views/backview.mov
http://ecommerce.com/actions/buyit.cgi?item=hotplate

This also helps in the situation where a URL has changed from the time that a movie was created. For example, a movie authored with the kActionGoToURL sprite action to the author's home page could be quickly changed to point to a new home page by adding a URLSUBSTITUTE tag to the movie's user data with the Plug-in Helper.


© 2000 Apple Computer, Inc.

Inside Macintosh: QuickTime Reference

| Previous | Chapter Contents | Chapter Top | Next |