/* --- description: MooTools wrapper to embed QuickTime movies. license: MIT-style authors: - Jose Prado requires: core/1.2.4: [Browser, Class.Extras, Array, Hash, Element, Element.Event] provides: Quickie Browser.Plugins.QuickTime ... */ (function() { var qtEvents = ['begin', 'loadedmetadata', 'loadedfirstframe', 'canplay', 'canplaythrough', 'durationchange', 'load', 'ended', 'error', 'pause', 'play', 'progress', 'waiting', 'stalled', 'timechanged', 'volumechange']; Quickie = new Class({ Implements: [Options, Events], version: '2.1', options: {/* onPlay: $empty, onStop: $empty,*/ id: null, height: 1, width: 1, container: null, attributes: { controller: "true", postdomevents: "true" } }, initialize: function(path, options){ this.setOptions(options); options = this.options; this.id = this.options.id || 'Quickie_' + $time(); this.path = path; var container = options.container; // Extra attributes options.attributes = $H(options.attributes); options.attributes.src = path; // Get Browser appropriate HTML code this.html = this.toHTML(); if (Browser.Engine.trident) { document.getElementById(container).innerHTML = this.html; this.quickie = document.getElementById(this.id); this.ieFix.delay(10, this); } else { var wrapper = document.createElement('div'); wrapper.innerHTML = this.html; this.quickie = wrapper.firstChild; this.transferEvents(); document.id(container).empty(); document.getElementById(container).appendChild(this.quickie); } }, toHTML: function() { if (!this.html) { var attributes = this.options.attributes, height = (attributes.controller == "true") ? this.options.height + 16 : this.options.height, width = this.options.width, element = ''; if (Browser.Engine.trident) { element = ''; }); element += ''; } else { element = '= 0) { return true; } } } else { try { var test = new ActiveXObject('QuickTime.QuickTime'); } catch(e) {} if (test) { return true; } } return false; })();