Defining the plugin capabilities
<name>.plugin.package.json file contains metadata that is used to render a
plugin within the Pexip webapp2 application. This file contains information such
as the target platforms, the roles that use the plugin, and the toolbar
locations. This page will give an example file and explore what the settings are
for and options for their use.
"description": "Allow for controlling conference layouts",
"platforms": ["web", "electron", "ios", "android"],
"label": "Change conference layout",
In the above example, the plugin is named layoutControl and has a toolbar icon at the bottom of the webapp2 application. An explanation of each setting is below. Please note that these settings are shown in their correct case, lower case values are not a grammatical error and should be utilized exactly as written here.
Valid Package Keys
This is a unique identifier for this plugin, it will be used later in the settings of the webapp2 application to instantiate the plugin.
This is a friendly name of the plugin and is used to name the plugin in a friendly way to the user thus allowing them to know which plugin they are interacting with, this is especially useful if a user needs to unload or reload a plugin as they can easily identify what it is used for. In the above example, the name is in camel case but this may be in any format the plugin developer deems appropriate.
This is a description of the plugin.
This is the version of the plugin, it is used to track the version that is installed inside of the webapp2 application in case it is required to roll the plugin back or forward. It is essential that the plugin developer use this version to ensure that the appropriate version can be identified by the user.
This is the filename of the actual plugin logic. This file will be explored later in this documentation. It is important that this name is exactly the same name as the plugin code file. In the above example, it is referencing the layoutControl.plugin.js file that is located in the same folder as the plugin.package.json file.
This setting allows or disallows the unloading of the plugin. This is important as it may mean that a plugin is unloaded and not run. This would be set to false for critical plugins that should always run.
This specifies the platforms that the plugin should run on. Valid platforms are listed below.
web - run in web versions of webapp2
electron - run in electron-based apps, such as the infinity application
ios - run on iOS-based devices
android - run on Android-based devices
This determines the user role that the plugin will run for. An example of this might be a layout control plugin that should only be used by a host. Valid roles are listed below.
host - the host of the meeting, that has successfully authenticated with a PIN (if PIN's are enabled)
guest - a guest of a meeting that has joined a host-based meeting
This is used to specify where access to the plugin should be kept, if a plugin requires user interaction to perform an action the code for the button to allow user interaction will go here. There are 2 valid placements of menuItems for a webapp2 application. These are listed below.
This is located at the bottom of the webapp2 application where the call controls are located. By placing an item here it will show at the end of this call control bar.
An example of adding an item to the toolbar location is below.
"label": "Change conference layout",
This menu item is shown when a user clicks on a participant in the roster list. When the participant is clicked, a menu opens and the plugin will be shown at the bottom of this list.
An example of adding an item to the participants location is below.
"label": "Send fault report",
Menu Item Keys
The menu item contains 3 different key/value pairs. Each of these are listed below with a short explanation of each.
icon - the icon for the button, this is an absolute path to the file in relation to the plugin.package.json file
label - the label to display on hover of the icon
action - the action, or function name, that is called from the plugin.js file when the button is pushed