var QTInstalled = PluginDetect.isMinVersion('QuickTime', '0') >= 0 ? true : false;
var QTVersion = PluginDetect.getVersion('QuickTime');
var canPlayQTVR = PluginDetect.isMinVersion('QuickTime', '5,0,5') == 1 ? true : false;
I believe that QuickTime 5.05 or higher is capable of playing QuickTime VR movies. Hence the canPlayQTVR variable depends on the '5,0,5' input argument.
Note: QuickTime on iPad/Safari does not seem to support QTVR, yet it is still the genuine Quickime plugin. QuickTime on iPad/Safari does not reveal the plugin version either, and thus for the iPad we would have isMinVersion('QuickTime', '5,0,5') returning 0. Hence the code "PluginDetect.isMinVersion('QuickTime', '5,0,5') == 1 ? true: false" correctly evaluates to 'false' for the iPad.
Detecting genuine QuickTime or 3rd party compatible plugin
Let us suppose that you embedded a QuickTime video in a web page. Let's also say that both the genuine QuickTime plugin and the 3rd party plugins (VLC, Totem, etc...) are able to play your video. Under Linux, your QuickTime video could play with VLC or Totem. And under Windows or Mac OSX, it could play with the QuickTime plugin.
In this case, you would not care whether the genuine QuickTime plugin or a 3rd party plugin was being used to view the video. All you would care about is that your video can play on as many computers and platforms as possible.
Which means that we want to detect whether QuickTime and/or a 3rd party compatible plugin is installed in your browser. So how do we do the plugin detection here?
If the QuickTime video has a mimetype of 'video/quicktime', then all we have to do for any non-Internet Explorer browser is verify that the 'video/quicktime' mimetype is present and enabled. For Internet Explorer, we use the usual PluginDetect methods. The code is as follows:
var canPlayQTvideo = PluginDetect.isMinVersion('QuickTime', '0') >= 0 ||
PluginDetect.hasMimeType('video/quicktime') ? true : false;
The PluginDetect.hasMimeType(mt) method is useful if a 3rd party plugin is being used to play the video. The hasMimeType(mt) method will return the mimetype object if the specified mimetype is present and enabled in the browser. Just choose the appropriate input value for mt.
Detection for Internet Explorer 7+
For Internet Explorer 7+, we have to worry about those yellow security bar popups when doing QuickTime detection. These popups occur whenever we use an ActiveX control that the browser deems unsafe and that the user has never explicitly approved. By default, most ActiveX controls are assumed to be unsafe by IE 7+.
In order to do QuickTime detection, however, we must utilize one or more ActiveX controls. The trick here is to only use pre-approved controls that never cause any security popup to occur.
For Internet Explorer 7+, there are 2 pre-approved QuickTime ActiveX controls. These 2 controls will not cause any security related warning messages to appear in the browser. They are: