Pluglet Display Modes
There are two basic display modes for a Pluglet (or Plugin):
Embedded Pluglet
For Pluglets embedded within an HTML page, either the OBJECT or
the EMBED element may be used.
When deciding how you want to embed a Pluglet in an HTML page, keep in mind
that the EMBED element is not part of standard HTML and that neither
the Document Object Model (DOM) Specification 1 nor 2 lists it. Also keep in
mind that, though both Netscape Communicator and Internet Explorere do support
this element, support is not uniform. Clearly, the direction is away from use
of the EMBED element and towards the OBJECT element.
Both the OBJECT and EMBED elements offer an extensive
list of attributes. However, OBJECT elements may be nested within
other OBJECT elements, and content-specific PARAM
elements can be used between initial and closing OBJECT elements.
<OBJECT ...> <PARAM ... >
</OBJECT>
Information about the OBJECT element can be found at http://www.w3.org/MarkUp/.
The following shows a simple example of the OBJECT element invoking
the (imaginary) ZeePlayer Pluglet when the .zee MIME
type (surfZeeMoveie.zee) is encountered:
<HTML>
<BODY>
<OBJECT type="video/x-zeemedia" data="http://www.zee.com/surfZeeMovie.zee"
name="ZeePlayer" height="400" width="600">
// Nested objects and parameters could go here.
</OBJECT>
</BODY>
</HTML>
Nested objects (OBJECT elements) might be used to display other
content should the ZeePlayer not be a registered Pluglet in the
browser. Parameters (PARAM elements) could be used to pass specific
information to the objects (Pluglets) when they are loaded.
The following shows how the EMBED element might handle the same
content:
<HTML>
<BODY>
<EMBED type="video/x-zeemedia" src="http://www.zee.com/surfingZeeMovie.zee"
name="ZeePlayer" height="400" width="600">
</EMBED>
</BODY>
</HTML>
Full-Page Pluglet
A full-page Pluglet can be invoked in three different ways:
- when a URL pointing to a file of the Pluglet MIME type is entered in the
Address/URL field of the browser;
- when JavaScript sets the document URL (e.g.,
document.URL="http://www.zee.com/surfingZeeMovie.zee")
to the URL pointing to the file, then opens it (e.g., document.open());
- when an applet redirects the browser to the URL (via
java.net.HttpURLConnection).
The result is a new page fully occupied by the Pluglet.
For a quick demo of the difference between an embedded Plugin versus a full-page
one, click on the two links belows:
http://www.coastnews.com
http://www.coastnews.com/flash/banner4.swf
The first link embeds the media (banner4.swf) in the HTML of the page the CoastNews.com
main page using the OBJECT element. When you click on the second link, you directly
enter the URL for the media content in the Address/URL field of the browser.
The media then expands into the full window of the browser, and it also loops,
since the loop control element is only in the OBJECT element. (Note: You need
the Shockwave-Flash Player for this demo; otherwise still GIF images will be
displayed as alternate content.)
|