Windows Media Player Plugin Detector




A few PluginDetect commands for Windows Media Player detection

PluginDetect.getVersion('WindowsMediaPlayer'): [Returns string or null]
   Returns the version (as a string) of the installed plugin. When getVersion() returns a version, it only means that the plugin is installed. It does NOT necessarily mean that the plugin is enabled.
   Returns null when the version could not be determined (when plugin is not installed/not enabled, or plugin is installed but the version information is unavailable).

By default, the returned version string is comma delimited and has the format of "A,B,C,D". If you wish to change the getVersion() delimiter, then use:
   PluginDetect.getVersion(delimiter) where delimiter is a string with exactly 1 character.

For example,
   PluginDetect.getVersion(".");   // set delimiter
   var version = PluginDetect.getVersion("WindowsMediaPlayer");    // version has the format of "A.B.C.D"


PluginDetect.isMinVersion('WindowsMediaPlayer', minVersion, mimetype):
[Returns number]
   Returns 1 if plugin is installed & enabled for the specified mimetype, and plugin version is >= minVersion.
   Returns 0 if plugin is installed & enabled for the specified mimetype. The plugin version is unknown, and thus we are unable to determine if version >= minVersion.
   Returns -0.1 if plugin is installed & enabled for the specified mimetype, but plugin version is < minVersion.
   Returns -0.2 if plugin is installed but not enabled for the specified mimetype. This means that the Windows Media Player plugin is present, but the browser will not use this plugin to display a file with that mimetype. If there is a 3rd party plugin asociated with that mimetype, then it (instead of the Windows Media Player) will be used by the browser to display the file with that mimetype.
   Returns -1 if plugin is not installed or not enabled.
   Returns -3 if you supplied a bad input argument to the isMinVersion() method.


minVersion: [string or number input argument]
   This is the minimum plugin version.
   Can be a string such as  '1,5,0,0' or '1.5' or '1,5,0,1' or '1.5.0.1' etc...
   Can be a number such as 0 or 1.5 or 1.50 etc...
   If minVersion is not specified, then PluginDetect will assume minVersion is '0'.
   Strings are more versatile than numbers since '1,5,0,1' cannot be expressed as a number.


mimetype: [string, optional input argument]
   The mimetype input is only used by PluginDetect for non-Internet Explorer browsers. It is ignored if the browser is Internet Explorer.
   If mimetype input is not a string, or is an empty string, or is a string with only space characters in it, or is not specified at all, then PluginDetect will assume a default value. Most people will not need to specify any mimetype, and therefore the default value is assumed.
   Spaces in the mimetype input string are ignored. The mimetype input string is case sensitive.   




The Plugin Version is Detected in Some Browsers, but not all

For Internet Explorer on Windows, PluginDetect will detect the plugin version for Windows Media Player (WMP) 7 and higher.

For all other Windows browsers, you will need the Windows Media Player Firefox Plugin in order for PluginDetect to know the plugin version. Due to security or compatibility reasons, however, some browsers with the Firefox plugin may not allow PluginDetect to see the WMP version. (Chrome browser comes to mind, because it gives a security popup when trying to query the Firefox plugin for the media player version.)

Any non-IE browsers on Windows without the WMP Firefox plugin will not reveal the version of the media player.

Any browsers on other platforms will not reveal the version of the WMP.

[Note: PluginDetect will determine if the WMP plugin is installed or not, independent of whether the plugin version is detectable.]



Javascript Can Control the Windows Media Player

It is already well known that you can use javascript to interact with the WMP plugin. For example, you can script the plugin to start a movie clip, stop a movie clip, etc...

The main problem here is that you cannot script the plugin in all browsers and all platforms. You most likely will only be able to script the plugin in Internet Explorer and in browsers compatible with the WMP Firefox Plugin.

Fortunately PluginDetect can give you a quick and easy way to know when it is possible to script the plugin. See the plugin detector source code at the top of this page for more details.



3rd party plugins for Windows Media files

As a general rule, 3rd party plugins capable of playing Windows Media should not be recognized by PluginDetect as being a genuine Microsoft Windows Media Player (WMP) plugin. The one most notable exception to this rule is the Flip4Mac plugin. Flip4Mac is a 3rd party plugin for Macintosh that can play Windows Media content. Because Microsoft appears to officially endorse Flip4Mac, PluginDetect will treat this plugin as a genuine WMP. When the Flip4Mac plugin is detected by PluginDetect it will say that the WMP is installed. Version information is not revealed for Flip4Mac, however.

Note that some 3rd party plugins may try to fool PluginDetect into thinking that they are the genuine WMP. The most glaring example appears to be the Totem player under Linux. PluginDetect will correctly detect Totem as a 3rd party plugin and not as a genuine WMP plugin.


If you wish to detect the presence of either the genuine WMP plugin OR a 3rd party compatible player, you should take a look at the plugin detector source code at the top of this page.




Top of Page