Netscape Gecko Plugin Overview
Netscape Gecko is a standards-based browser embedded in Netscape 6.x and 7.x, AOL for Mac OS X, CompuServe 7, and Mozilla.
This document outlines what websites who wish to provide streaming media experiences to Gecko-based browsers can do, and also presents information for those wishing to develop Netscape-style plugins, or augment existing Netscape-style plugins.
A Definition of Terms
A Helper Application is
an application that is launched upon encountering a given media format,
and "helps" enhance browser functionality by launching a specific application
to play the specified content. Typically, this is media content that
is not intended to be embedded within a browser window, but is content that
will exist outside the browser's context, unless the application in question
is designed to always play the content inside a browser window. An example is given below for Windows Media Player.
See also a definition of MIME types.
This document assembles some material useful to web sites wishing to deploy
All major plugins work well with Netscape Gecko. In particular, the following plugins are now scriptable:
latest Flash player, released in December 2002. A DevEdge article deals specifically
with scripting the Flash plugin in Netscape Gecko browsers -- this is the most up to date
information, including information on detection, etc. The latest
Flash release added support for WMODE (transparency) on the Windows (Flash
6r65) and MacOSX (Flash 6r67) platforms. Netscape 7.02 for Windows, released February 2003, shiped with this new, WMODE-capable Flash
. The scriptable versions are Flash 6 r40 and onwards. Versions before Flash 6 r40 worked with Netscape Gecko browsers, but were not scriptable. See the section on Flash for more information.
- Apple's Quicktime 6 player, which is now fully scriptable. Quicktime 6 and onwards are scriptable in Netscape Gecko browsers, but Quicktime 5.x and before are not scriptable in Netscape Gecko browsers. See the section on Quicktime for more information.
- The Viewpoint player, for 3D animation and graphics viewing. Viewpoint's MetaStream plugin will ship with Netscape 7.0 and later versions of Netscape. A DevEdge article deals with the scripting of the ViewPoint plugin in Netscape Gecko browsers -- this is the latest information on ViewPoint content in Netscape Gecko.
- RealPlayer 8, bundled with Netscape browsers, including Netscape 7.0 and later. Note that RealPlayer 8 is considered a legacy product by RealNetworks.
- RealOne player, which is RealNetworks latest revision to their player. This version is not bundled with Netscape browsers, but is available for download from http://www.realone.com/ . In particular, click here to download the free RealOne player .
- Netscape 7.1 will ship with support for Microsoft Windows Media Player as an ActiveX control. Though the Windows Media Player plugin is not scriptable, now that Netscape 7.1 supports the loading of the ActiveX component directly into web pages rendering in Netscape 7.1, Windows Media Player is now fully scriptable in Netscape 7.1. An article on DevEdge deals with the scripting of the Windows Media Player in Netscape 7.1 -- this is the latest information on Windows Media Player.
The following general recommendations hold true for all of the plugins mentioned in this article:
- The most up-to-date on whether to use the EMBED element or the OBJECT element in order to include plugins in HTML pages rendering on Netscape Gecko browsers can be found in the DevEdge article that discusses this in detail. Note that with the release of Netscape 7.1, the OBJECT element can now be used to include the Windows Media Player as an ActiveX control -- see the article on Windows Media Player and Netscape 7.1.
- Most of these plugins can be invoked with a unique MIME type that is different from the actual MIME type of the file being deployed. This unique MIME type is called an invocation MIME type in this article, and is a MIME type determined by the plugin manufacturer. This means that the MIME type that the type attribute refers to in both the OBJECT and the EMBED tag need not match the MIME type of the source being referred to in the data or src attributes respectively. This is best seen with some examples for Real and Windows Media Player that are described later in this document. Invocation MIME types are useful because they allow you to invoke a specific plugin, despite the configuration of the end-user's hard drive.
- It is possible to use the OBJECT tag with Netscape Gecko browsers (to be W3C compliant in HTML 4.01 and XHTML), and it is recommended that you nest your OBJECT tags for Gecko-based browsers inside the OBJECT tags for IE as shown in the example. However, the OBJECT tag usage in Netscape Gecko browsers is subject to a few caveats:
- Only recent browsers bearing a bug fix allow the OBJECT tag the ability to retrieve missing plugins via MIME type lookup.
- The use of the data attribute with the OBJECT tag is currently dependent on how the actual plugin is implemented. This situation will change when the affiliated bug is fixed. This means that you can invoke a plugin with the OBJECT tag and param tags as a workaround to gain equivalency to the use of the data attribute, as in the case of the Windows Media Player example.
- RealPlayer 8 and RealOne support a variety of popular audio and video formats, and can be invoked to handle these as either plugins or helper applications, depending on how a user has configured their RealPlayer:
- Audio: mp1, mp2, and mp3, ra files (RealPlayer only), wav, midi, aiff, au
- Video: rv files (RealPlayer only), rm or ram files (RealPlayer only), mpeg, avi
- In certain situations, although RealPlayer 8 (or RealOne) can handle the media type, the plugin may not automatically handle the MIME type associated with that media type. This depends entirely on how the media player is configured. Fortunately, by way of invocation MIME types it is possible to invoke the RealPlayer 8 (or RealOne player) as a plugin regardless of how the end-user's machine is configured. Here are some markup examples using the EMBED tag:
- Audio WAV files: <embed type="audio/x-pn-realaudio-plugin" width="200" height="200" src="http://www.student.oulu.fi/%7esairwas/object-test/audio/test.wav">
- Audio MIDI files: <embed type="audio/x-pn-realaudio-plugin" width="200" height="200" src="http://www.mozilla.org/quality/browser/front-end/testcases/plugins/bcosofu.mid">
Video (AVI) files: (right click to play):
<embed controls="ImageWindow" type="audio/x-pn-realaudio-plugin" width="400" height="400" src="http://tomandjerrythemovie.warnerbros.com/dld/speak.avi">
Note that the invocation MIME type doesn't always reflect the MIME type of the actual resource, e.g. in the above example, although we are deploying the AVI file type, in lieu of using the affiliated MIME type, namely video/avi, we are saying audio/x-pn-realaudio-plugin. You do not have to use an invocation mimetype, but then you have no guarantee of what plugin will ultimately be loaded in the end user's browser while viewing your web page. Invocation MIME types provide you with more control.
Products using Netscape Gecko do not ship with Windows Media Player. However Windows Media Player 7.0 and 7.1 function perfectly within Netscape Gecko browsers, with the exception of scriptability, which only works with Netscape 7.1, which loads the Windows Media Player as an ActiveX control. Furthermore, Windows Media Player does ship with the Windows XP Operating System, and works well as a Helper Application. More information on Windows Media Player can be found in the DevEdge Article on Windows Media Player.What's Supported:
- Launch as a helper app. Applications on your PC are configured to handle certain types of files. If, for example, I configure Windows Media Player to handle AVI files, and then send the browser an AVI file over HTTP (e.g. by having the user click on a URL that links to an AVI file), then the user will be shown a dialog box with the following choices:
- To open the file with avifile, a component inside Windows Media Player, OR
- To Save the File to Disk, which is always an option in case the user wants to save the file and retrieve it later.
- Here's an example of this: http://www.geocities.com/MotorCity/Pit/3571/martial/mikemookjong2.avi . Clicking on this URL should spawn the helper application that is the default handler for AVI. Chances are, it is either QuickTime, RealPlayer, or Windows Media Player.
- Embed plugin on a web page. Here are two ways of doing this:
- Using OBJECT
tag: <object type="application/x-mplayer2" height="500" width="500">
- Using EMBED tag: <embed type="application/x-mplayer2" height="500" width="500" height="500" src="http://www.geocities.com/MotorCity/Pit/3571/martial/mikemookjong2.avi" pluginspage="http://www.microsoft.com/windows/windowsmedia/download/default.asp"></embed>
Note that the use of the OBJECT tag assumes that the plugin exists on the desktop, and doesn't tell you where to get it if it is missing. The EMBED tag allows you to provide the pluginspage attribute, telling users where to obtain the plugin if it is not present. Future Netscape Gecko browsers will allow the use of the codebase attribute with the OBJECT tag as an equivalent for the pluginspage or pluginurl attributes in the EMBED tag.
Note also that in both the OBJECT tag and EMBED tag examples above, in order to force Windows Media Player to open the AVI (and not have the API handled by any other plugin), the express use of invocation MIME Types is made use of. Similar to the RealPlayer example above, the use of the application/x-mplayer2 MIME type opens the AVI file in Windows Media Player, and this MIME type is used in lieu of the video/avi MIME type. Additional Invocation MIME Types for Windows Media Player include:
|video/x-ms-asf||Media Files (*.asf,*.asx)||asf,asx,*||Yes|
|video/x-ms-wm||Media Files (*.wm)||wm,*||Yes|
|audio/x-ms-wma||Media Files (*.wma)||wma,*||Yes|
|audio/x-ms-wax||Media Files (*.wax)||wax,*||Yes|
|video/x-ms-wmv||Media Files (*.wmv)||wmv,*||Yes|
|video/x-ms-wvx||Media Files (*.wvx)||wvx,*||Yes|
Note that the first three MIME Types above are not associated with any file type, but are generic MIME Types for Windows Media Player. The player can be invoked with these MIME Types irrespective of the actual codec or suffix of the media.
What is Not Supported:
- Scriptability in browsers older than Netscape 7.1, since only Netscape 7.1 can load the Windows Media Player as an ActiveX control.
AVI file handing with the video/avi MIME Type. The
Netscape-style plugin made by Windows Media Player will handle AVI MIME Types,
so in order to force Windows Media Player to handle AVI, you will need to
use an invocation MIME type as outlined above.
QuickTime is not bundled with Netscape Gecko browsers, but is a nice alternative for Mac users. QuickTime's installer will recognize all Netscape Gecko-based browsers, and is available from http://www.apple.com/quicktime/ . Unlike other plugins mentioned here, QuickTime offers users an extensive ability to control what QuickTime's Netscape-style plugin itself can handle. This means that you need not deploy content using invocation MIME types, but can use whatever the user has configured the plugin to handle. In order to configure the QuickTime Plugin:
- Launch the QuickTime standalone application.
- Go to Edit | Preferences | QuickTime preferences from the menu.
- Choose Browser plug-in from the drop down list, and click on MIME settings.
- You can deploy scriptable content if you wish, since QuickTime 6 is fully scriptable and available for download. It is a good test bed to test against. You can detect whether your content is running against non-scriptable versions of QuickTime by looking at the plugins array and determining the version. Versions less than "6" are not scriptable.
- You can offer a QuickTime option in addition to your Windows Media
Player or RealPlayer options, and you can restrict users to QuickTime 6
if you wish, once again, by determining the version.
All Netscape Gecko products, except Mozilla, ship with a version of Flash. Flash 6 r65 (released December 2002) is bundled with Netscape 7.02, which is scriptable and supports WMODE. Netscape 7.0 bundled Flash 6 r40, which is scriptable and was released for public download on July 2002. Netscape 6 and CompuServe 7 shipped with the earlier Flash 5 version.
For the best user experience and simplest code maintenance we recommend you do not detect Flash versions unless you want users to upgrade to the latest version due to these issues:
Scripting Flash animation: You may wish to deploy content
that scripts the Flash plugin, in which case you ought to detect the presence
of Flash 6 r40 or later by looking at the plugins
array description field. This subject is also the subject of another article on DevEdge which covers
in detail the experience of scripting Flash in Netscape Gecko browsers. If you are bound to using the scriptability or the FSCommands capabilities of
the Flash plugin, look for Flash 6 r40 and above. You can determine
version increments as those being greater than '40' in the Flash 6 series,
or greater than '6.' The best way to keep abreast of Macromedia's "dot-releases"
is to look at the Macromedia homepage.
- Known Flash 6 / Netscape Gecko bugs:
All Netscape Gecko products, except Mozilla, ship with a version of Java. Unlike Netscape Communicator 4.x, the Java Virtual Machine integration into Netscape Gecko browsers is entirely by way of plugin architecture, and the chief vendor is Sun's JavaSoft division. Netscape Communications no longer makes a Java Virtual Machine, and thus, Sun's JRE often has different behavior with respect to runtime. Netscape 7 has JRE 1.4.0_01, with earlier releases, such as Netscape 6.2.1, using an earlier version of the JRE.
Recommendations and Caveats:
- Recommended reading is an article on DevEdge that deals exclusively with markup (e.g. APPLET, OBJECT, EMBED elements) and plugins, and also covers Java.
- Although the APPLET element is deprecated in the current HTML DTD, you may choose to use it. Using EMBED and OBJECT are not necessary, unless your use of OBJECT is for full XHTML validation or HTML 4.01 compliance. You may invoke the Java Plugin using the OBJECT tag in two of the following possible ways:
- You can use the classid attribute of the OBJECT tag: <object classid="java:MyClassName.class"....> . This is the only classid that Netscape Gecko browsers support, since most classid attributes used with OBJECT tags in the web today refer to the UUIDs associated with IE's ActiveX controls. Netscape Gecko does not support ActiveX.
- You can use the type attribute to refer to a known Java MIME type:
<object type="application/x-java-applet;jpi-version=1.4.0_01" data=MyClassName.class"....>
Always fully test your Java application using the latest JRE provided by Sun.
Be aware of the change in security model. Sun's JVM
does not use the Netscape Communicator 4.x Capabilities
API for security model. Instead, the Java Virtual Machine uses
2 Security Model (and policy files).
Additional Development Resources
The Netscape Plugin API is a well documented and stable API that has been around since the very early days of Netscape browsers. There have been a few architectural changes, and thus developing a plugin for both the Netscape Communicator 4.x series and for Netscape Gecko browsers is possible. Here are the relevant caveats and reference material:
- Similarly, if you want your plugin to be able to access the Web page's
- Since LiveConnect is no longer supported as the architecture to script plugins, the old Communicator 4.x Plugin API documentation has been upgraded to include the subset of material that only Netscape Gecko supports. We will publish this API soon -- for the time being, it lives here.
- The central reference area for plugin development is the Plugins Project Page on mozilla.org .
In general, since Netscape Gecko is an embeddable browser technology,
of browsers based on Netscape Gecko have grown, and now includes CompuServe,
Netscape 6.x and 7.0, and variants of AOL's public beta. On Windows,
using the Win32 System Registry, there's a
way to locate all these browsers, and the plugins directories where they are
installed. An EXE installer or an InstallShield application ought
to read the Win32 System Registry and install the DLLs to the Netscape-Gecko
browsers that it interoperates with.
In addition, a robust plugin installer ought to solve the problem of first installation -- namely, what to do when the plugin software is installed first, and the browser is installed second. The plugin should leave information on how it can be found later on.
- XPI packages are ZIP packages, and in fact are used by mozilla.org to install browser components such as chrome.
The main page for XPInstall information is: DevEdge's XPInstall Guidelines article . Here are some important caveats about XPInstall:
- Although the CompuServe browser is based on Netscape Gecko, the CompuServe browser does not support XPInstall. Other AOL Time Warner browsers such as Netscape 6.x and 7.0 do support XPInstall, and the AOL beta provides support for it as well.
- Unlike SmartUpdate, XPInstall in its current iteration is not a signed technology. There are no digital signatures affiliated with XPI packages. Instead, the end-user is asked whether they want to download and install the package from a given URL or not. The dialog box looks like this:
Netscape Gecko-based browsers don't support Microsoft Internet Explorer's
ActiveX controls, and in general, proprietary APIs are discouraged in favor
of support of W3C Web Standards.
For ActiveX developers, Netscape Gecko-based browsers do provide alternatives to perhaps achieve the same goals.
Equivalent Mechanisms in Netscape Gecko-based browsers
These present solutions to consider above and beyond the W3C web standards:
- Netscape Plugin API (NPAPI) -- technically, major "ActiveX-only" or "ActiveX-optimized" components such as Windows Media Player and b3d Projector can be rewritten using the Netscape Plugin API. Components can be made scriptable and there is some "open source" support for making Netscape-style plugins work in IE 6 and up, which do not support the NPAPI .