<img src="https://img.shields.io/badge/%20-ALL-%2300B180" style="float:left"/><br />

The JWP web player and associated code provide an array of core features to engage your viewers and monetize your content. But, you can extend these core features by using plugins.

By adding custom or third-party plugins within the setup configuration of a web player, you can produce unique user experiences:

  • Create custom user interactions

  • Initiate bespoke player behaviors

<br />

ο»Ώ

The following instructions explain only how to add plugins to the web player. Since JWP does not provide support for any third-party plugin or created plugins that you may add or create, we strongly recommend testing your implementation in a staging environment.

<br /> <hr />

## Add and register a plugin

ο»Ώ

A plugin becomes accessible in the `jwplayer().plugins` object only after it is registered.

<br />

Use the following steps to add and register a plugin:

  1. Within the options argument of `setup()`, add a `plugins` object that includes the URL of the plugin script to be added. When the player is instantiated, the plugin script is downloaded and initialized.<br /><br />As shown in the following example, multiple plugin scripts can be added to `plugins` as a comma-delimited list. Be sure to add any key-value pairs required by a plugin script.

    ο»Ώ
  2. In the plugin script file, use `registerPlugin(pluginName, playerMinimumVersion, pluginClassOrFunction)` to attach the script to the player.

    <br />

    ο»Ώ

    <br />

    ArgumentDescription
    **pluginName** stringName of the plugin matching its filename<br /><br />**The** `pluginName` **must match the filename of the plugin.**
    **playerMinimumVersion** stringMinimum player version required the plugin
    **pluginClassOrFunction** class | functionPlugin function of class to instantiate with new player instances

<br /> <br />

ο»Ώ

Within the callback function assigned to `registerPlugin()`, the following three variables are also available:

  • **playerInstance**: Instance of the player API with which the plugin is being registered

  • **pluginConfig**: Config block passed in `player().setup()`

  • **pluginDiv**: DIV created in the DOM for this plugin<br />This DIV can be used or the DOM can be manipulated within the plugin code.

<br />

<!-- Removes the automatic page-to-page navigation at the bottom of the page -->

<style> .rm-Pagination { display: none; } </style>