Chapter 13. Using ActiveX and Plug-Ins with JavaScript
Today's browsers provide a lot of built-in functionality; however, there are many things they cannot do unaided, such as playing video or sound. Functionality of this sort is quite common on the Internet, and plug-ins and their ability to extend browser functionality make it possible to enjoy a richer web experience.
Plug-ins are downloaded applications and, as their name suggests, "plugged into" the browser. Many different plug-ins exist today; the more common ones include Adobe Flash Player, Microsoft's Silverlight, and Apple's QuickTime player.
Essentially, plug-ins are objects that encapsulate all the functionality they need to perform their tasks, such as playing audio files, in a way that hides the complexity from the website author. They are usually written in languages such as C++ and Java.
Plug-ins usually, but not always, have some sort of user interface. For example, the QuickTime plug-in has a user interface that displays buttons to play/pause the audio or video file, a seek bar to go to a precise point in the playback, and a volume control (see Figure 13-1.
Figure 13.1. Figure 13-1
Some plug-ins make objects with various methods and properties available to you to access with JavaScript, much as you access the methods and properties of the window
object or the Document Object Model. For example, the QuickTime player plug-in ...
Get Beginning JavaScript®, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.