Chapter 10. QuickTime for Java

When Java first came out, multimedia APIs were relatively weak; scratchy 8-bit sound just doesn’t cut it in today’s world. Users had rich media on their desktops and laptops, and the Java world quickly scrambled to find a better media API. Unsurprisingly, Java turned to QuickTime, one of the oldest and most sophisticated media APIs available.

Apple has ported QuickTime to Windows and released a set of Java APIs that provide users who would have to write their own native wrappers an easier interface to QuickTime. The APIs are still relatively “C-like,” but using them is much easier than writing your own bridge. Applications built using the QuickTime for Java technology are also cross-platform, as long as the only platforms you consider are Windows and Mac OS; Unix users are still out of luck when it comes to QuickTime. The examples in this chapter will run on Windows as well as on Mac OS X.

One of QuickTime’s most interesting features is its sheer scope of available functionality. The rich range of supported media types can be overwhelming. This chapter explores the available range of media and demonstrates how to play that media back from within Java applications.

Getting Started

The QuickTime API has two basic components: the documentation, which was designed for you, and a set of Java classes, which are for your Java compiler. To make the most out of QuickTime, make sure you can access both.

Documentation

When you install Mac OS X and the included developer ...

Get Mac OS X for Java Geeks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.