Multimedia (Multimedia) in JavaScript
The navigator object in JavaScript includes a child object called plugins. This object is an array, with an entry for each plug-in installed in the browser. The navigator.plugins object is only supported by Netscape, Firefox and Mozilla.
For example
Below is an example to illustrate how to list all plug-ins installed in your browser.
List of Plug-Ins
Result
Check for Plug-Ins
Each plug-in has an entry in that array. Each gateway has the following properties:
name - The name of the plug-in.
filename - An executable file that is downloaded to install the plug-in.
Description - A description of the plug-in, provided by the programmer.
mimeTypes - An array with an input port for each MIME type supported by that plug-in.
You can use these properties in a script to find installed plug-ins, and then use JavaScript, you can play the appropriate multimedia files. You observe the following example:
Using Plug-Ins
Result
Run the above command to see the result
Note - Here we are using HTML tags
Multimedia control
Together we do a real example that works in most browsers:
Using Embeded Object
Result
Run the above command to see the result
According to Tutorialspoint
Previous article: Animation in JavaScript
Next article: Debug in JavaScript