Inside Macintosh: QuickTime Reference
| Previous | Chapter Contents | Chapter Top | Next |
QuickTime 4.1 now provides support for the "data:" URL scheme. You can avoid the overhead of a separate HTTP transaction for small files by embedding the data directly into the SMIL file using a data URL instead. The specification for this scheme is available at:
<http://www.ietf.org/rfc/rfc2397.txt>
data:[<mediatype>][;base64],<data>A number of applications can Base64 encode files; a useful one is MPack, which is available free at:
<ftp://ftp.andrew.cmu.edu/pub/mpack/>
An example SMIL document that uses the "data:" scheme is shown in Listing 3.
Note that these data URLs cannot have line breaks in them, though they are printed that way to fit on a page in Listing 3.
Listing 3 Usage of the "data:" scheme, producing a GIF image
<!--DOCTYPE smil PUBLIC "-//W3C//DTD SMIL 1.0//EN"The SMIL document shown in Listing 4 lets you create a simple text display, using text descriptors, as described at
<http://www.apple.com/quicktime/authoring/importtext.html>.
Listing 4 A simple text display using text descriptors
<!--DOCTYPE smil PUBLIC "-//W3C//DTD SMIL 1.0//EN"Inside Macintosh: QuickTime Reference
| Previous | Chapter Contents | Chapter Top | Next |