<?xml version="1.0" encoding="ISO-8859-1" ?>

<?xml-stylesheet type="text/xsl" href="/lib/xsl/devedge-1.00/article_en.xsl"?>
<nde:article 
  xmlns:nde="http://devedge.netscape.com/2002/de"
  url="/viewsource/2002/gecko-plugins/"
  xmlns="http://www.w3.org/1999/xhtml"  
  xml:lang="en">

  <nde:header>
    <nde:title>Netscape Gecko Plugin Overview</nde:title>
    <nde:category>Article</nde:category>
    <nde:authlist>
      <nde:author>
        <nde:authname>Arun K. Ranganathan</nde:authname>
        <nde:authaffil>Netscape Communications</nde:authaffil>
        <nde:email href="/community/feedback/">Feedback</nde:email>
      </nde:author>
    </nde:authlist>
    <nde:pubdate year="2002" month="07" day="31"/>

    <nde:channels>
      <nde:channel id="viewsource" />
      <nde:channel id="plugins" />
    </nde:channels>
  
 
    <nde:summary>
      Learn about changes in Netscape Gecko's plugin architecture vs. the Netscape 4 generation and recommended plugin development strategies.
    </nde:summary>    
  </nde:header>

<nde:keywords>solutionfinder</nde:keywords>

 <nde:head>

</nde:head>

<nde:content>

  <h2>Introduction</h2>
    <p>

   <a href="/central/gecko">Netscape Gecko</a> is a standards-based browser embedded in Netscape 6.x and 7.x, AOL 
   for Mac OS X, CompuServe 7, and Mozilla.
   <p />
   This document outlines what websites who wish to provide streaming media 
 experiences to Gecko-based browsers can do, and also presents information 
 for those <a href="#Your_Own">wishing to develop Netscape-style plugins</a>, 
 or augment existing Netscape-style plugins.
  </p> 

  <h2>A Definition of Terms</h2>
     <p>
     
       <ul>
         <li><a name="A_plugin_"></a>A <b>plugin</b> (often "plug-in") is a component 
     that is installed into the browser application <b>plugins directory</b>.
 It typically is a small component (on Windows, a DLL) that handles
a <a href="http://sunsite.berkeley.edu/%7Eemorgan/waves/mimetypes.html">MIME 
type</a> and is built using the <a
 href="/library/manuals/2002/plugin/1.0/">Netscape 
 Plugin API</a> by companies such as Macromedia, Real, Microsoft, and Adobe. 
  A plugin allows web developers to play embedded or streaming media 
content directly in a web browser window, and often the plugin exposes methods 
of its own to JavaScript (see <b>Scriptability)</b>.  A plugin is typically 
 invoked via special HTML tags for that purpose, such as the <a
 href="/library/manuals/2002/plugin/1.0/intro.html#1002612">EMBED</a>
 tag or the <a
 href="/library/manuals/2002/plugin/1.0/intro.html#1001793">OBJECT</a>
 tag.  </li>
     <li><b><a name="Scriptability"></a>Scriptability </b>is the ability
of  the plugin to interact with JavaScript in web pages.  This feature 
allows  web sites to create streaming media experiences that have DHTML user 
interfaces  to drive plugin events.  An example of this would be JavaScript-driven 
 "Play" and "Pause" buttons in HTML, which would then allow the end user to
 "Play" or "Pause" active content in a plugin's area by clicking on HTML buttons.
 This feature is useful for those wishing to combine DHTML, JavaScript
and streaming media to create interactive user experiences.</li>
     <li><b><a name="A_Helper_Application"></a>A Helper Application</b> 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 <i>always</i> play the content inside a browser window.  <a
 href="#wmp_helper_app:">An example</a> is given below for Windows Media Player.
 See also a definition of <a
 href="http://sunsite.berkeley.edu/%7Eemorgan/waves/mimetypes.html">MIME types</a>.<br />
     <br />
   </li>
     
</ul>
     </p>
    

  <h2>General Recommendations</h2>

      <p>
 This document assembles some material useful to web sites wishing to deploy
 streaming media alongside their standard web content (DHTML, JavaScript,
etc.).<br />
       <br />
   
</p>
<p>  All major plugins work well with Netscape Gecko.  In particular, the
following plugins are now scriptable:

<ol>
  <li><a href="http://www.macromedia.com/go/getflashplayerbutton/">Macromedia's
latest Flash player</a>, released in December 2002.  A DevEdge article deals specifically
with <a href="/viewsource/2003/scripting-flash/">scripting the Flash plugin in Netscape Gecko browsers</a> -- 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<ent:trade/>.
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
    <a href="#Macromedia_">Flash</a> for more information.</li>
  <li><a href="http://www.apple.com/quicktime/download/">Apple's Quicktime
6 </a>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 <a
 href="#QuickTime">Quicktime </a>for more information.</li>
  <li>The <a href="http://www.viewpoint.com">Viewpoint player</a>, 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
<a href="/viewsource/2003/vmp-scripting/">scripting of the ViewPoint plugin</a> in Netscape Gecko browsers -- this is the latest information on
ViewPoint content in Netscape Gecko.</li>
  <li><a href="http://proforma.real.com/real/player/blackjack.html">RealPlayer
8</a>, bundled with Netscape browsers, including Netscape 7.0 and later.
 Note that RealPlayer 8 is considered a legacy product by RealNetworks.</li>
  <li>RealOne player, which is RealNetworks latest revision to their player.
 This version is not bundled with Netscape browsers, but is available
for download from<a href="http://www.realone.com/"> http://www.realone.com/</a>
.  In particular, <a
 href="http://www.real.com/RI/RC.020708r1choice_c2.fbar.txt..RI/realoneplayer.html?src=020708r1choice_c2">click
here to download the free RealOne player</a> .</li>
<li>Netscape 7.1 will ship with support for Microsoft Windows Media Player as an ActiveX control.  Though
the Windows Media Player <strong>plugin</strong> 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 <a href="/viewsource/2003/windows-media-in-netscape/">scripting of the
Windows Media Player in Netscape 7.1</a> -- this is the latest information on Windows Media Player.</li>
</ol>
</p> <p>
 The following general recommendations hold true for all of the plugins mentioned  
in this article:
<ol>
<li>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 <a href="/viewsource/2002/markup-and-plugins/">the DevEdge
article that discusses this in detail</a>.  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 <a href="/viewsource/2003/windows-media-in-netscape/">Windows Media Player and Netscape 7.1</a>.</li>
  <li>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 <b>invocation MIME type </b>in this article, 
and is a MIME type determined by the plugin manufacturer.  This means 
that the MIME type that the <i><b>type </b></i>attribute refers to in both 
the <a
 href="/library/manuals/2002/plugin/1.0/intro.html#1001793">OBJECT</a> 
and the <a
 href="/library/manuals/2002/plugin/1.0/intro.html#1002612">EMBED</a> 
tag need not match the MIME type of the source being referred to in the <i><b>data 
    </b></i>or <i><b>src</b></i> attributes respectively.  This is best 
seen with some examples for <a
 href="#invocation">Real</a>
and <a
 href="#invocation2">Windows
Media Player</a> that are described later in this document.  <b>Invocation 
MIME types</b> are useful because they allow you to invoke a specific plugin, 
despite the configuration of the end-user's hard drive.</li>
  <li>It is possible to use the <a
 href="/library/manuals/2002/plugin/1.0/intro.html#1001793">OBJECT</a> 
tag with Netscape Gecko browsers (to be W3C compliant in HTML 4.01 and XHTML), 
and it is recommended <a
 href="/library/manuals/2002/plugin/1.0/intro.html#1001793">that 
you nest your OBJECT tags for Gecko-based browsers inside the OBJECT tags 
for IE as shown in the example</a>.  However, the <a
 href="/library/manuals/2002/plugin/1.0/intro.html#1001793">OBJECT</a> 
tag usage in Netscape Gecko browsers is subject to a few caveats:</li>
  <ul>
    <li>Only recent browsers <a
 href="http://bugzilla.mozilla.org/show_bug.cgi?id=134445">bearing a bug fix
allow the OBJECT tag the ability to retrieve missing plugins via MIME type
lookup.</a></li>
    <li>The use of the <i><b>data</b></i> attribute with the <a
 href="/library/manuals/2002/plugin/1.0/intro.html#1001793">OBJECT</a> 
tag is <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=152334">currently 
dependent on how the actual plugin is implemented</a>.  This situation 
will change when the <a
 href="http://bugzilla.mozilla.org/show_bug.cgi?id=152334">affiliated bug 
is fixed</a>.  This means that you can invoke a plugin with the <a
 href="/library/manuals/2002/plugin/1.0/intro.html#1001793">OBJECT</a> 
tag and param tags as a workaround to gain equivalency to the use of the 
     <i><b>data</b></i> attribute, as in the case of the <a
 href="#invocation2">Windows
Media Player example</a>.</li>
  </ul>
  <li><a
 href="/library/manuals/2002/plugin/1.0/intro.html#1002612">It is 
best to nest your EMBED tag within your OBJECT tag</a> -- this has been the 
mechanism of invoking both ActiveX controls for IE and Netscape plugins for 
Netscape browsers ever since the release of Netscape Communicator 4.x</li>
  <li>You can use JavaScript to determine what plugins are installed in the 
browser, and what versions of the plugins are installed.  These techniques 
    <a
 href="#prog-det">are
mentioned in the section on QuickTime.</a></li>
</ol>
      </p>


  <h2>Popular Plugins</h2>
    <p>
<h3><font color="#000099"><a name="RealPlayer"></a>RealPlayer</font></h3>
  <p>
    The RealPlayer plugin (both RealPlayer 8 and RealOne) are fully exposed to 
 JavaScript calls that Real has publicized for DHTML and JavaScript programmers: 
 <a href="http://service.real.com/help/library/guides/extend/embed.htm">http://service.real.com/help/library/guides/extend/embed.htm</a></p>
           
<h4>Recommendations:</h4>
            
<ul>
       <li>RealPlayer 8 and RealOne support a variety of popular audio and
 video formats, and can be invoked to handle these as either <a
 href="#A_plugin_">plugins</a> or <a href="#A_Helper_Application">helper applications</a>,
depending on how a user has configured their RealPlayer:</li>
           
  <ul>
       <li><b>Audio: </b>mp1, mp2, and mp3, ra files (RealPlayer only), wav, 
 midi, aiff, au</li>
       <li><b>Video: </b>rv files (RealPlayer only), rm or ram files (RealPlayer 
 only), mpeg, avi</li>
           
  </ul>
         
</ul>
     
<ul>
     <li>In certain situations, although RealPlayer 8 (or RealOne) can handle 
 the media type, the plugin may not automatically handle the <a
 href="http://sunsite.berkeley.edu/%7Eemorgan/waves/mimetypes.html">MIME type</a>
associated with that media type.  This depends entirely on how the media
player is configured. Fortunately, by way of <b><i>invocation MIME types</i></b>
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 <a
 href="/library/manuals/2002/plugin/1.0/intro.html#1002612">EMBED</a>
 tag:</li>
           
  <a name="invocation"></a><ul>
       <li><b>Audio WAV files: </b><font face="arial,helvetica"><font
 face="arial,helvetica"><font face="arial,helvetica"><font
 color="#400040" style="background-color: rgb(255,255,255);" size="2"
 family="SANSSERIF" face="Verdana" lang="0">   &lt;embed type="audio/x-pn-realaudio-plugin" 
 width="200" height="200" src=<a class="moz-txt-link-rfc2396E"
 href="http://www.student.oulu.fi/%7esairwas/object-test/audio/test.wav">"http://www.student.oulu.fi/%7esairwas/object-test/audio/test.wav"</a>&gt; </font></font></font></font></li>
       <li><font face="arial,helvetica"><font face="arial,helvetica"><font
 face="arial,helvetica"><font color="#400040"
 style="background-color: rgb(255,255,255);" size="2" family="SANSSERIF"
 face="Verdana" lang="0"><b>Audio MIDI files: </b></font></font></font></font><font
 face="arial,helvetica"><font face="arial,helvetica"><font
 face="arial,helvetica"><font color="#400040"
 style="background-color: rgb(255,255,255);" size="2" family="SANSSERIF"
 face="Verdana" lang="0">   &lt;embed type="audio/x-pn-realaudio-plugin" width="200"
height="200" src=<a class="moz-txt-link-rfc2396E"
 href="http://www.mozilla.org/quality/browser/front-end/testcases/plugins/bcosofu.mid">"http://www.mozilla.org/quality/browser/front-end/testcases/plugins/bcosofu.mid"</a>&gt; </font></font></font></font></li>
       <li><font face="arial,helvetica"><font face="arial,helvetica"><font
 face="arial,helvetica"><font color="#400040"
 style="background-color: rgb(255,255,255);" size="2" family="SANSSERIF"
 face="Verdana" lang="0"><b>Video (AVI) files:  </b></font></font></font></font><font
 face="arial,helvetica"><font face="arial,helvetica"><font
 face="arial,helvetica"><font color="#400040"
 style="background-color: rgb(255,255,255);" size="2" family="SANSSERIF"
 face="Verdana" lang="0">(right click to play):<br />
      &lt;embed controls="ImageWindow" type="audio/x-pn-realaudio-plugin" 
width="400"   height="400" src=<a class="moz-txt-link-rfc2396E"
 href="http://tomandjerrythemovie.warnerbros.com/dld/speak.avi">"http://tomandjerrythemovie.warnerbros.com/dld/speak.avi"</a>&gt;</font></font></font></font></li>
           
  </ul>
     
</ul>
  <p>
  <b>Note </b>that the <i><b>invocation MIME type </b></i>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 <i>video/avi</i>, we are saying <i>audio/x-pn-realaudio-plugin</i>. 
 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.  <i><b>Invocation MIME types</b></i> provide 
you with more control.</p>
             
<h3><font color="#000099"><a name="Windows_"></a>Windows Media Player </font></h3>
<p>
      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 <a href="#Scriptability">scriptability</a>, which
 only works with <a href="/viewsource/2003/windows-media-in-netscape/">Netscape 7.1, which loads the Windows Media Player as an ActiveX control</a>.
  Furthermore, Windows Media Player does ship with the Windows XP Operating
 System, and works well as a <a href="#A_Helper_Application">Helper Application</a>.
 More information on Windows Media Player can be found in the  <a
 href="/viewsource/2001/ms-wmp/">DevEdge
 Article on Windows Media Player</a>.</p>

      <b>What's Supported:</b><br />
           
<ul>
        <li><b><a name="wmp_helper_app:"></a>Launch as a <a
 href="#A_Helper_Application">helper app</a>.</b>  Applications on your
 PC are configured to handle certain types of files.  If, for example,
     <b>I configure Windows Media Player to handle AVI files</b>, 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:</li>
       
  <ul>
      <li>To open the file with avifile, a component inside Windows Media 
Player, OR</li>
      <li>To Save the File to Disk, which is always an option in case the 
user wants to save the file and retrieve it later.</li>
      <li>Here's an example of this: <a
 href="http://www.geocities.com/MotorCity/Pit/3571/martial/mikemookjong2.avi"><font
 face="arial,helvetica"><font face="arial,helvetica"><font
 face="arial,helvetica"><font color="#400040"
 style="background-color: rgb(255,255,255);" size="2" family="SANSSERIF"
 face="Verdana" lang="0">http://www.geocities.com/MotorCity/Pit/3571/martial/mikemookjong2.avi</font></font></font></font></a>
 .  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.</li>
       
  </ul>
   
</ul>
   
<a name="invocation2"></a><ul>
        <li><b>Embed plugin on a web page.   </b>Here are two ways of
 doing this:</li>
       
  <ul>
      <li>Using <a
 href="/library/manuals/2002/plugin/1.0/intro.html#1001793">OBJECT</a>
 tag:   &lt;object type="application/x-mplayer2" height="500" width="500"&gt;
 &lt;param name="src"         <br />
  value="http://www.geocities.com/MotorCity/Pit/3571/martial/mikemookjong2.avi"&gt;<br />
  &lt;/object&gt;</li>
       
  </ul>
   
</ul>
   
<ul>
       
  <ul>
      <li>Using <a
 href="/library/manuals/2002/plugin/1.0/intro.html#1002612">EMBED</a>
 tag: &lt;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"&gt;&lt;/embed&gt;</li>
       
  </ul>
   
</ul>
  <p><b>Note</b> that the use of the <a
 href="/library/manuals/2002/plugin/1.0/intro.html#1001793">OBJECT</a>
 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  <i>pluginspage</i> attribute, telling users where to obtain the plugin
if  it is not present. <a
 href="http://bugzilla.mozilla.org/show_bug.cgi?id=134445">Future Netscape
 Gecko browsers</a> will allow the use of the <i>codebase</i> attribute with
 the <a
 href="/library/manuals/2002/plugin/1.0/intro.html#1001793">OBJECT</a>
 tag as an equivalent for the <i>pluginspage</i> or <i>pluginurl</i> attributes
 in the <a
 href="/library/manuals/2002/plugin/1.0/intro.html#1002612">EMBED</a>
 tag.</p>
  <p>
  <b>Note </b>also that in both the <a
 href="/library/manuals/2002/plugin/1.0/intro.html#1001793">OBJECT</a>
 tag and <a
 href="/library/manuals/2002/plugin/1.0/intro.html#1002612">EMBED</a>
 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 <i><b>invocation
 MIME Types </b></i>is made use of.  Similar to the RealPlayer example
 above, the use of the <i>application/x-mplayer2 </i>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 <i><b>Invocation MIME Types </b></i>for
Windows  Media Player include:</p>
   
<table border="1">
    <tbody>
      <tr>
        <th class="type">Mime Type</th>
   <th class="desc">Description</th>
   <th class="suff">Suffixes</th>
   <th>Enabled</th>
      </tr>
   <tr>
   <td>application/asx</td>
   <td>Media Files</td>
   <td>*</td>
   <td>Yes</td>
   </tr>
   <tr>
   <td>video/x-ms-asf-plugin</td>
   <td>Media Files</td>
   <td>*</td>
   <td>Yes</td>
   </tr>
   <tr>
   <td>application/x-mplayer2</td>
   <td>Media Files</td>
   <td>*</td>
   <td>Yes</td>
   </tr>
   <tr>
   <td>video/x-ms-asf</td>
   <td>Media Files (*.asf,*.asx)</td>
   <td>asf,asx,*</td>
   <td>Yes</td>
   </tr>
   <tr>
   <td>video/x-ms-wm</td>
   <td>Media Files (*.wm)</td>
   <td>wm,*</td>
   <td>Yes</td>
   </tr>
   <tr>
   <td>audio/x-ms-wma</td>
   <td>Media Files (*.wma)</td>
   <td>wma,*</td>
   <td>Yes</td>
   </tr>
   <tr>
   <td>audio/x-ms-wax</td>
   <td>Media Files (*.wax)</td>
   <td>wax,*</td>
   <td>Yes</td>
   </tr>
   <tr>
   <td>video/x-ms-wmv</td>
   <td>Media Files (*.wmv)</td>
   <td>wmv,*</td>
   <td>Yes</td>
   </tr>
   <tr>
   <td>video/x-ms-wvx</td>
   <td>Media Files (*.wvx)</td>
   <td>wvx,*</td>
   <td>Yes</td>
   </tr>
         
  </tbody>  
</table>
  <p>
  <b>Note </b>that the <i>first three MIME Types </i>above are not associated
 with any file type, but are <i>generic</i> 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.</p>
   
<ul>
                 

      <b>What is Not Supported:</b><br />
       
       <li>Scriptability in browsers older than Netscape 7.1, since only <a href="/viewsource/2003/windows-media-in-netscape/">Netscape 7.1 can
       load the Windows Media Player</a> as an ActiveX control.</li>    
      <li><b>AVI file handing</b> 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 <i><b>invocation MIME type </b></i>as outlined above.       <br />
      </li>
           
</ul>
                
<h3><font color="#000099"><a name="QuickTime"></a>QuickTime</font></h3>
   <p>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 <a
 href="http://www.apple.com/quicktime/">http://www.apple.com/quicktime/</a>
 .  Unlike other plugins mentioned here, QuickTime offers users an extensive
 ability to control what <i>QuickTime's Netscape-style plugin itself</i>
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:</p>
   
<ul>
    <li>Launch the QuickTime standalone application.</li>
    <li>Go to Edit | Preferences | QuickTime preferences from the menu.</li>
    <li>Choose Browser plug-in from the drop down list, and click on MIME 
settings.</li>
   
</ul>
  <p><a name="prog-det"></a>You <a
 href="http://developer.netscape.com/docs/manuals/communicator/jsref/brow2.htm">can
 programmatically determine (via JavaScript)</a> what settings the QuickTime
 plugin is running by querying <a
 href="http://developer.netscape.com/docs/manuals/communicator/jsref/brow2.htm">the
 mimetypes array</a> for the setting you want (navigator.mimetypes[]).  Thus,
 if the user adds video/avi to the list of MIME types supported by the QuickTime
 plugin, it will now appear in the MIME types array.</p>
         
<h4>Recommendations:</h4>
           
<ul>
      <li>You can deploy <a href="#Scriptability">scriptable content</a>
if  you wish, since <a href="http://www.apple.com/quicktime/">QuickTime 6</a>
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 b<a
 href="http://developer.netscape.com/docs/manuals/communicator/jsref/brow3.htm">y
 looking at the plugins array and determining the version</a>.  Versions
less than "6" are not scriptable.</li>
    <li>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.<br />
    </li>
       
</ul>
               
<h3><font color="#000099"><a name="Macromedia_"></a>Macromedia Flash</font></h3>
 <p>All Netscape Gecko products, except Mozilla, ship with a version of
<a href="http://www.macromedia.com/go/getflashplayerbutton/">Flash</a>. 
Flash 6 r65 (released December 2002) is bundled with Netscape 7.02, which is scriptable and supports <a href="http://www.macromedia.com/support/flash/ts/documents/wmode.htm">WMODE</a>.

 Netscape 7.0 bundled Flash 6 r40, which is scriptable and was <a
 href="http://www.macromedia.com/go/getflashplayerbutton/">released for public
download</a> on July 2002. Netscape 6 and CompuServe 7 shipped  with the
earlier Flash 5 version.</p>        
<h4>Recommendations:</h4>
      <p>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: </p>
               
<ul>
          <li><b>Scripting Flash animation:</b> 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 <a
 href="http://developer.netscape.com/docs/manuals/communicator/jsref/brow3.htm">plugins
array description field.</a>  This subject is also the subject of another article on DevEdge which covers
in detail the experience of <a href="/viewsource/2003/scripting-flash/">scripting Flash in Netscape Gecko browsers</a>.  If you are bound to using the <a
 href="#Scriptability">scriptability</a> 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 <a href="http://www.macromedia.com/">Macromedia homepage</a>.<br />
            <br />
             </li>
          <li><b>Known Flash 6 / Netscape Gecko bugs</b>:</li>
                       
  <ul>
          <li>One of the top issues is a persistent CPU drainage <a
 href="http://bugzilla.mozilla.org/show_bug.cgi?id=132759">discussed extensively
 in an entry</a> in the <a href="http://bugzilla.mozilla.org/">Bugzilla open
 source bug database</a>.  Macromedia has fixed this in latest versions -- read about detecting Flash versions
 and upgrading in the article on <a href="/viewsource/2003/scripting-flash/">scripting Flash in Netscape Gecko</a>.<br />
      </li>
                       
  </ul>
               
</ul>
                 
<h3><font color="#000099"><a name="Sunsoft_"></a>Java</font></h3>
  <p>
     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 <a
 href="http://java.sun.com/products/plugin/index.html">Sun's JavaSoft division</a>.
  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.</p>     
<h4>Recommendations and Caveats:</h4>
         
<ul>
<li>Recommended reading is an article on DevEdge that deals exclusively with <a href="/viewsource/2002/markup-and-plugins/">markup (e.g. APPLET, OBJECT, EMBED elements) and plugins</a>, and also
covers Java.</li>
       <li>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:</li>
  <ul>
    <li>You can use the classid attribute of the OBJECT tag: &lt;object classid="java:MyClassName.class"....&gt;
.  This is the only <i>classid</i> 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.</li>
    <li>You can use the type attribute to refer to a known Java MIME type:
&lt;object type="application/x-java-applet;jpi-version=1.4.0_01" data=MyClassName.class"....&gt;<br />
    </li>
  </ul>
   
</ul>
   
<ul>
    <li><b>Always </b>fully test your Java application using <a
 href="http://java.sun.com/plugin/">the latest JRE provided by Sun</a>.<br />
       </li>
         
</ul>
   
<ul>
    <li><b>Be aware </b>of the change in security model.  Sun's JVM
does  not use the Netscape Communicator 4.x <a
 href="http://developer.netscape.com/docs/manuals/signedobj/capabilities/index.html">Capabilities 
API</a> for security model.  Instead, the Java Virtual Machine uses 
   <a href="http://java.sun.com/j2se/1.3/docs/guide/security/">Sun's Java 
2 Security Model (and policy files)</a>.  <br />
    </li>
   
</ul>    </p> 
  
  <h2>Additional Development Resources</h2>
    <p>
<h3><a name="Your_Own"></a>Building Your Own Netscape-style Plugin</h3>
<p>
 The <a
 href="/library/manuals/2002/plugin/1.0/">Netscape 
Plugin API</a> 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
<b>caveats</b> and <b>reference material:</b>
</p>
 
<ul>
   <li><a
 href="http://developer.netscape.com/viewsource/index_frame.html?content=naru_plugins.html">LiveConnect, 
or the JRI | JNI Bridge to script plugins in Netscape Communicator 4.x</a>, 
is <b>no longer supported</b> in Netscape Gecko-based browsers.  If you
want to expose your plugin to JavaScript, you'll want to read <a
 href="http://mozilla.org/projects/plugins/scripting-plugins.html">this article</a>.</li>
  <li>Similarly, if you want your plugin to be able to access the Web page's
JavaScript, <a
 href="http://mozilla.org/projects/plugins/bi-directional-plugin-scripting.html">read
this article</a>.<br />
  </li>
   <li>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 <b>only Netscape Gecko supports.  </b>We
will publish this API soon -- for the time being, <a
 href="http://www.sierratel.com/oeschger/plugins/">it lives here</a>.</li>
   <li>The central reference area for plugin development is the <a
 href="http://mozilla.org/projects/plugins/">Plugins Project Page on mozilla.org</a> 
.</li>
 
</ul>
 
<h3><a name="Installing"></a>Installing Your Plugin</h3>
<p>
 In general, since Netscape Gecko<a
 href="http://mozilla.org/projects/embedding/"> is an embeddable browser technology</a>,
the <a
 href="/viewsource/2001/find-gecko/#intro">number 
of browsers based on Netscape Gecko</a> 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, <a
 href="http://mozilla.org/projects/plugins/install-scheme.html">there's a 
way to locate all these browsers, and the plugins directories where they are
installed</a>.  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.<br />
<br />
In addition, <a
 href="http://mozilla.org/projects/plugins/first-install-problem.html">a
robust plugin installer ought to solve the problem of first installation</a>
-- 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.</p>
 
<h4><a name="su-vs-xpi"></a>SmartUpdate vs. XPInstall</h4>
<p>
 In Netscape Communicator 4.x browsers, the preferred mechanism for installing 
plugins was <a
 href="http://developer.netscape.com/docs/manuals/communicator/jarman/index.htm">SmartUpdate</a>, 
which involved signed JAR files (rather like signed CAB files in IE) and JavaScript
as the installer-language.  This delivery mechanism allowed plugins
to be delivered dynamically to end-users, without necessitating a departure
from the browser or without restarting the browser.  <b>But SmartUpdate
is no longer supported in Netscape Gecko-based browsers.  </b>Instead, 
the technology that replaces it is <b><a
 href="/viewsource/2002/xpinstall-guidelines/">XPInstall</a> </b>(also abbreviated 
as <b>XPI</b> and pronounced "zippy").  XPInstall is capable of doing 
everything SmartUpdate could do in Netscape Communicator 4.x::</p>
 
<ul>
   <li><a href="/viewsource/2002/xpinstall-guidelines/">XPInstall
has a JavaScript API</a> and uses JavaScript as the install logic.</li>
   <li><a
 href="/viewsource/2002/xpinstall-guidelines/">XPI 
packages are ZIP packages</a>, and in fact are used by mozilla.org to install 
browser components such as chrome.</li>
 
</ul>
<p> The main page for XPInstall information is: <a
 href="/viewsource/2002/xpinstall-guidelines/">DevEdge's XPInstall Guidelines article</a> 
.  Here are some important caveats about XPInstall:</p>
 
<ul>
   <li>Although the <a href="http://www.compuserve.com/">CompuServe</a> browser 
is based on Netscape Gecko, the CompuServe browser <b>does not</b> 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.</li>
   <li>Unlike SmartUpdate, XPInstall in its current iteration is <b>not </b>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:<img src="barley_dlog.gif" alt="Example XPI Download"
 width="400" height="299" />
   </li>
 
</ul>
 <br />
 
<h3><a name="ActiveX"></a>Netscape Gecko's Equivalent to ActiveX Controls</h3>
<p>
  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.  <br />
 For ActiveX developers, Netscape Gecko-based browsers do provide alternatives 
to perhaps achieve the same goals.<b><br />
</b>
</p>

<h4>Equivalent Mechanisms in Netscape Gecko-based browsers</h4>
<p>
 These present solutions to consider above and beyond the W3C web standards: </p>
<ol>
   <br />
   
  <ul>
     <li><a
 href="/library/manuals/2002/plugin/1.0/">
  Netscape Plugin API</a>   (NPAPI) --  technically, major "ActiveX-only" 
or "ActiveX-optimized"  components such as Windows Media Player and <a
 href="http://www.brilliantdigital.com">  b3d Projector</a>   can be rewritten 
using the Netscape Plugin API.  Components can  <a
 href="http://mozilla.org/projects/plugins/scripting-plugins.html">be made 
scriptable</a>   and there is some "open source" support for <a
 href="http://mozilla.org/projects/plugins/plugin-host-control.html"> making 
Netscape-style plugins work in IE 6 and up, which do not support the NPAPI</a>
  .    </li>
     <br />
     <li><a
 href="/central/security/">
  Signed JavaScript</a> is another option.  Signed JavaScript is "vouched 
for" by a third-party  Certificate Authority, so users can trust it, and it
can be used to do a variety of "native application" type tasks -- open files,
open network connections,  write to the disk, etc.  One of the ways
this is accomplished is via            <a
 href="http://mozilla.org/scriptable/">XPConnect</a>   and the <a
 href="http://mozilla.org/projects/security/components/jssec.html#privs-list">
  UniversalXPConnect</a>   privilege, which calls upon the known <a
 href="http://mozilla.org/projects/xpcom/">  XPCOM</a>   environment to do 
various  tasks that ordinary web-delivered JavaScript can not do.  <a href="/central/security/">The DevEdge Security Central</a>
provides an aggregate of information about how to extend the browser's capabilities beyond "the sandbox."</li>
   
  </ul>
 
</ol>
 
<ol>
   
  <ul>
     <li><a href="http://www.xulplanet.com/">chrome:// and XUL</a>   are
windowing toolkit technologies which can create compelling applications 
outside the context of DHTML and a webpage. Using XUL/JavaScript and
 jar files deployed with a suitable <a
 href="/viewsource/2002/xpinstall-guidelines/">XPInstall</a>, you can really 
enhance the features of the browser.  </li>
   
  </ul>
 
</ol>
 
<ol>
   
  <ul>
     <li><a href="http://www.javasoft.com">Java Applets</a>   have traditionally 
been juxtaposed with ActiveX.  Example: MSN's chat  client is an ActiveX 
component (for IE) and a plugin for Netscape 4.x.  <a
 href="http://www.compuserve.com/chat/">CompuServe uses Java for chat applications</a>.</li>
     <br />
     
  </ul>
 
</ol>
    </p>       
   
  </nde:content>

  <nde:related area="nde">
    <nde:item url="/central/plugins">Plugins Central</nde:item>
  </nde:related> 
</nde:article>
