Skip to Content
QuickTime for Java: A Developer's Notebook
book

QuickTime for Java: A Developer's Notebook

by Chris Adamson
January 2005
Intermediate to advanced
256 pages
6h 34m
English
O'Reilly Media, Inc.
Content preview from QuickTime for Java: A Developer's Notebook

Embedding QuickTime in HTML

Every once in a while, a developer new to QuickTime will post to one of the developer lists, saying he needs QTJ to put a QuickTime movie in a web page.

QTJ is great, but this is way, way overkill. For this task, you don’t need QTJ. In fact, you’d just be creating headaches for yourself by requiring QTJ and dealing with the hassles of applets. Instead, you can just embed QuickTime content in HTML.

Note

The mailing lists at http://lists.apple.com/ are a great source of information, particularly quicktime-java, quicktime-users (authoring), and quicktime-api (native programming). java-dev is also helpful for figuring out issues with Mac OS X’s Java implementation.

How do I do that?

In your HTML page, use an <object> tag, which wraps an <embed>, as shown in Example 1-1.

Example 1-1. Embedding QuickTime in HTML

<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
 width="160" height="136"
 codebase="http://www.apple.com/qtactivex/qtplugin.cab">
   <param name="src" VALUE="buhbuhbuh.mov"/>
   <param name="autoplay" VALUE="true"/>
   <param name="loop" VALUE="true"/>
   <param name="controller" value="true"/>
<embed src="buhbuhbuh.mov" width="160" height="136"
  scale="tofit"
  controller="true"
  autoplay="true"
  loop="true"
  pluginspage="http://www.apple.com/quicktime/download/"/>
</object>

The parameters are generally self-explanatory: height, width, and src are the only ones that are actually required. Because I’ve chosen to include a controller widget, I add 16 to the height ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

What's New in Java 7

What's New in Java 7

Madhusudhan Konda
Java EE 8 Cookbook

Java EE 8 Cookbook

Edson Yanaga, Elder Moraes

Publisher Resources

ISBN: 0596008228Catalog PageErrata