dojo.provide("dojox.embed.Quicktime"); (function(d){ /******************************************************* dojox.embed.Quicktime Base functionality to insert a QuickTime movie into a document on the fly. ******************************************************/ var qtMarkup, qtVersion = { major: 0, minor: 0, rev: 0 }, installed, __def__ = { width: 320, height: 240, redirect: null }, keyBase = "dojox-embed-quicktime-", keyCount = 0, getQTMarkup = 'This content requires the QuickTime plugin.'; // *** private methods ********************************************************* function prep(kwArgs){ kwArgs = d.mixin(d.clone(__def__), kwArgs || {}); if(!("path" in kwArgs) && !kwArgs.testing){ console.error("dojox.embed.Quicktime(ctor):: no path reference to a QuickTime movie was provided."); return null; } if(kwArgs.testing){ kwArgs.path = ""; } if(!("id" in kwArgs)){ kwArgs.id = keyBase + keyCount++; } return kwArgs; } if(d.isIE){ installed = (function(){ try{ var o = new ActiveXObject("QuickTimeCheckObject.QuickTimeCheck.1"); if(o!==undefined){ // pull the qt version too var v = o.QuickTimeVersion.toString(16); function p(i){ return (v.substring(i, i+1)-0) || 0; } qtVersion = { major: p(0), minor: p(1), rev: p(2) }; return o.IsQuickTimeAvailable(0); } } catch(e){ } return false; })(); qtMarkup = function(kwArgs){ if(!installed){ return { id: null, markup: getQTMarkup }; } kwArgs = prep(kwArgs); if(!kwArgs){ return null; } var s = '' + ''; for(var p in kwArgs.params||{}){ s += ''; } s += ''; return { id: kwArgs.id, markup: s }; } } else { installed = (function(){ for(var i=0, p=navigator.plugins, l=p.length; i-1){ return true; } } return false; })(); qtMarkup = function(kwArgs){ if(!installed){ return { id: null, markup: getQTMarkup }; } kwArgs = prep(kwArgs); if(!kwArgs){ return null; } var s = '' + o.markup + ''); } getVer(); }else if(d.isIE && installed){ // we already know if IE has QuickTime installed dojox.embed.Quicktime.onInitialize(); } })(dojo);