Some browsers allow their functionality to be extended by third party plug-ins. A plug-in is a dynamically loadable library specialized in interpreting and presenting a certain data format. The plug-in will run as part of the browser process, and have access to limited areas of the browser window, thus appearing to the user as part of the browser.
A browser decides what plug-in to hand a document to by examining the extension of the document ``filename''. Extensions are bound to MIME-types describing the expected data type in the document, and documents are handed to a plug-in that has announced it can handle the MIME-type in question. The document retrieval is done by the browser, so plug-ins may currently not be used to handle data sent using protocols not supported by the browser. This limitation, which plays a role when real-time negotiation is required between the plug-in and the server providing the data, may be circumvented by letting the initial document contain information necessary for the plug-in to set up it's own connection. Future browsers should let plug-ins not only specify what MIME-types they expect, but also protocols provided.
As of 1996-10-11,
BrowserWatch [68]
listed 53 known WWW browsers, of which four was indicated as having
plug-in support. Netscape Navigator, the most widely used browser
[68], was the first to allow third party
plug-ins. Fortunately, the other three browser developers have decided
to stick to Netscape's plug-in format, making available plug-ins sharable.
Like is the case with external applications, plug-ins will have to be installed before being used. Netscape gives guidelines for how plug-in developers may simplify this process for the user, and for how HTML documents requiring plug-ins for embedding automatically may let the user download the plug-in if not already available [69].
In Netscape Navigator, plug-ins may be either embedded or full screen. An embedded plug-in shows up along with other information elements, and require an EMBED-tag inside a HTML-document. Figure 4.1 gives an example of a HTML-document with an EMBED-tag. A plug-in is activated as full screen when a document with the MIME-type of the plug-in is accessed directly. Full page plug-ins are typically used for document viewers.
Figure 4.1: Example of an EMBED-tag in a
HTML-document.
Note the use of WIDTH and HEIGHT to set the size of the window in figure 4.1. Setting the size of embedded windows is required in Netscape Navigator. The ``correct'' size of the window is often not known until parsing of the video stream has started, but Navigator doesn't let a plug-in resize the window. For the convenience of both users and programmers, future browsers could allow resizing of embedded windows, followed by restructuring of the surrounding document contents.
Figure 4.2: A plug-in viewing MPEG movies in
Netscape Navigator. On the left, the plug-in is embedded in a
HTML-document, while the right image shows a full screen plug-in.
Figure 4.2 shows the difference between an embedded and a full screen plug-in. Note that other text of the HTML-document surrounds the embedded plug-in, which is shown in a sub-window. The full screen plug-in occupies the entire view area of the browser window.
The Plug-in Plaza of BrowserWatch [68], striving to list existing plug-ins, shows several plug-ins for displaying video inside a browser. The plug-ins may be used to view MPEG or QuickTime movies on Macintosh and MS Windows based computers. Plug-in Plaza lists no plug-ins capable of inline video conferencing or other two-way communications.
Chapter 5 on page
describes the implementation of a Unix-plug-in capable of displaying
MPEG-movies inside Netscape Navigator, shown in
figure 4.2.