There are basically three kinds of plugins available with web browsers. These are:
Microsoft <OBJECT> tags enclosing ActiveX objects
Netscape <EMBED> tags enclosing browser plugins
Java <APPLET> tags enclosing Java applets
In Netscape Navigator, the LiveConnect mechanisms can run specific functions by name. This call-back mechanism is available to <EMBED> and <APPLET> plugins, but it isn't clear as to what extent this is supported by <OBJECT> plugins so you may need to experiment with your browser to see what works and what doesn't. Use the <EMBED> and <APPLET> functionality as a guideline because the plugin handlers are all likely to share some code. Even so, it requires the Java VM (Virtual Machine) to be started for it to work. LiveConnect also requires that the <APPLET> tag contains the MAYSCRIPT attribute to give the applet permission to communicate with JavaScript.
In MSIE, the callbacks are managed via ActiveX mechanisms. Again, an ActiveX object can call a named JavaScript function.
The distinctions between these different plugin architectures become increasingly blurred and basically all of their functionality could probably have been provided with a single mechanism had the browser manufacturers worked together more co-operatively and been less concerned with carving out territory and gaining market share at each other's expense.
Interacting with plugins using JavaScript is possibly one of the least portable and most frustrating things to develop solutions for. The competing plugin suppliers have also utterly failed to develop common API calls for media players such that you need to treat each one as a special case even if you only want to play, pause, and stop video clips under JavaScript control.
Neither of the mainstream browsers supports the other's chosen technology fully or reliably. It is not uncommon to find MSIE crashes on Windows with <EMBED> style plugins. Netscape Navigator does not support <OBJECT> plugins at all well, and ActiveX code crashes a Macintosh horribly when either browser tries to run it. That's understandable since it's usually X86 machine code and right now Power PC processors don't like it. The latest MSIE version 5.0 for the Macintosh provides a switch to disable ActiveX plugins altogether. Even Microsoft Windows Media Player on Macintosh is supported by way of an <EMBED> tag. Real player is recommended to be used as an <OBJECT> plugin on MSIE for Windows although it mostly works the same as an <EMBED>. There are some JavaScript API calls that are not available in both modes though.
This means for example to embed video into a page, even with the same kind of video, you basically have to implement four different containers to support MSIE and Netscape on Macintosh and Windows. Given that, there are now other browsers that can cope with plugins. That increases the number of varieties of HTML page content that needs to be created. Now that QuickTime, Windows Media Services and Real Media are all contending for market share, they all require different plugins and that multiplies your problem threefold. Now, it is likely that some of the platform/media combinations will be similar enough to share the same code. Even then, it still leaves you with something like six radically different ways that you will need to construct the plugin container if you want to do anything sophisticated and JavaScript driven.
See also: | <EMBED>, Event, LiveConnect, Plugin compatibility issues, Plugin object |
Prev | Home | Next |
Plugin compatibility issues | Up | Plugin object |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |