Quickie 2.1

Quickie is a small MooTools class to embed QuickTime objects into your website. It is based on the Swiff class provided by MooTools so if you’re familiar with that class, you’ll find yourself at home with this one.

Add the following IE conditional code to the head section of your document. This object is necessary for IE to fire the QuickTime DOM events as detailed in the JavaScript Scripting Guide for QuickTime.

Features

Allows you to listen for the DOM events QuickTime fires using familiar MooTools event listeners.

Options

id – (string, defaults to Quickie_uniqueid) Id for the element which will be used to reference the QuickTime movie.

width – (integer, defaults to 1) Width of the movie in pixels.

height – (integer, defaults to 1) Height of the movie in pixels.

container – (element) ID of the element where the QuickTime movie will be inserted. Note anything inside the container will be wiped out.

attributes – (object) Key/Value pairs of any of the attributes a QuickTime movie can receive. There are two defaults, controller is set to true and postdomevents is set to true.

Events

Quickie can attach listeners to any of the QuickTime DOM Events. To add an event, simply add another property in the options object which begins with ‘on’ followed by the name of the event you want to listen for with the first letter capitalized. No need to use the ‘qt_’ prefix. For example, to listen for the play event, you would add this to the options object:

onPlay: function() { alert('qt_play fired'); }

Known Issues

IE is very picky with QuickTime events so there are some circumstances where it behaves wonkily, particularly with initialization events. I’m working on taming IE, but at the very least the major events (play, pause, etc) behave reliably.

Compatibility

So far, I’ve only been able to test Quickie in the following browsers. Should work in others, will list them here pending confirmation.

Safari 4
Internet Explorer 7
Firefox 3

License

Quickie is licensed under the MIT License. Use it, modify it, have fun with it… in any circumstance.

Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.