Technote 1197QuickTime 4.1.1/4.1.2 |
CONTENTSQuickTime 4.1.1 ChangesQuickTime 4.1.2 Changes Detecting the Presence/Version of QuickTime from Web Browsers on Windows Using Gestalt to get the QuickTime Version Summary |
QuickTime 4.1.1/4.1.2 can be described as a minimal-changes releases that provide a number of miscellaneous bug fixes. This Technote describes the changes made between the release of QuickTime 4.1 and the update releases of QuickTime 4.1.1 and 4.1.2. |
QuickTime 4.1.1 ChangesListed below are many of the important changes included in the QuickTime 4.1.1 release:
Back to top QuickTime 4.1.2 ChangesListed below are many of the important changes included in the QuickTime 4.1.2 release:
Back to top Detecting the Presence/Version of QuickTime from Web Browsers on WindowsQuickTimeCheck.ocxIncluded in QuickTime for Windows 4.1.1 is the file QuickTimeCheck.ocx, a Windows-only DLL that implements an "automation object", which is essentially a scriptable object for embedding in a Windows application like Internet Explorer. This particular object gives HTML authors in Internet Explorer for Windows the ability to detect the presence of QuickTime and determine its version. Unlike ActiveX controls, this kind of object doesn't have any user interface. Instead, a web developer using VB Script (or JScript in Internet Explorer) will create an instance of the object and make direct requests to the object. A web developer must use a VB Script embedded in a web page to create and to communicate with the object. Checking for QuickTimeTo detect the presence of QuickTime, first create the object, check if the object creation succeeded and check if the QuickTime extension (the file QuickTime.qts) is available. The following VB Script shows how this is done: Dim theObject On Error Resume Next 'Do not report runtime error if object itself was not installed Set theControl = CreateObject("QuickTimeCheckObject.QuickTimeCheck.1") On Error Goto 0 'Allow runtime errors If IsObject(theObject) Then If theObject.IsQuickTimeAvailable(0) Then MsgBox "QuickTime is available!" End If End If
There's another flavor of the Shown below is HTML code with an embedded VB Script which makes use of the QuickTimeCheck.ocx object to check for the presence of QuickTime. If QuickTime is detected, the code simply displays a message stating QuickTime was found. Similarly, if QuickTime is not detected, the code displays a message stating QuickTime could not be found. However, if you find users that don't have QuickTime, you'll probably want to suggest they install it in order to get the best possible user experience. You can use a web badge on your web site to provide an active visual link to Apple's QuickTime site. See Apple's web badges page for more information on web badge usage. <HEAD> <TITLE>Test for QT</TITLE> <SCRIPT LANGUAGE="Javascript"> <!-- hide from pre-script browsers var haveqt = false; //--> </SCRIPT> <SCRIPT LANGUAGE="VBScript"> <!-- hide from pre-script browsers On Error Resume Next Set theObject = CreateObject("QuickTimeCheckObject.QuickTimeCheck.1") On Error goto 0 If IsObject(theObject) Then If theObject.IsQuickTimeAvailable(0) Then 'Just check for file haveqt = true End If End If //--> </SCRIPT> <SCRIPT LANGUAGE="Javascript"> <!-- hide from pre-script browsers if (navigator.plugins) { for (i=0; i < navigator.plugins.length; i++ ) { if (navigator.plugins[i].name.indexOf("QuickTime") >= 0) { haveqt = true; } } } //--> </SCRIPT> </HEAD> <BODY> <SCRIPT LANGUAGE="Javascript"> <!-- hide from pre-script browsers if (haveqt) {document.write("You have QuickTime!!!");} else {document.write("You don't seem to have QuickTime");} //--> </SCRIPT> <NOSCRIPT> Man, you don't even have Scripting! </NOSCRIPT> <NOEMBED> You aren't going to see QT if you don't allow EMBEDs! </NOEMBED> <H1>Check for QuickTime</H1> </BODY> </HTML>
In devising your QuickTime detection strategy, probably the best way to proceed is to first use a basic script like the one shown above at the HTML level, and alternately use QuickTime sprites, or other techniques, to do more sophisticated checking if necessary. Finally, remember QuickTimeCheck.ocx is only installed with QuickTime 4.1.1. Therefore, the above code will report that QuickTime is not present if it is run on systems that do not have QuickTime 4.1.1. Version InformationIt's now possible to determine the particular version of QuickTime installed using the QuickTimeCheck.ocx object. The following line of code: Set myQTVersion = theObject.QuickTimeVersion
will return in
For example, a decimal return value of
The QuickTimeCheck.ocx object works on Windows 95/98, Windows NT 4, and Windows 2000. It is installed when a QuickTime basic installation is performed, which means it will always be available. Back to top Using Gestalt to get the QuickTime Version
As always, the standard way to determine which version of QuickTime is installed is to call the Macintosh Toolbox API { /* check the version of QuickTime installed */ long version; OSErr result; result = Gestalt(gestaltQuickTime,&version); if ((result == noErr) && (version >= 0x04128000)) { /* we have version 4.1.2! */ } } |
SummaryYou are encouraged to review this Technote and related information to help implement changes in your code to take advantage of the added features and bug fixes in QuickTime 4.1.1 and 4.1.2. |