Documentation

Create addon

Addons are used to extend the functionality of the player by providing new module types. You can find the source code for all addons under /addons folder.

Step 1: Create a folder for your addon

Lets say that you want to create an addon named MyAddon. First step is to create a directory: <icplayer>/addons/MyAddon

Then create the src subfolder.

Step 2: Create addon files

Addon consists of:

  • addon.xml an XML file which describes the addon model and its metadata
  • presenter.js a Javascript file which implements the addon functionality
  • view.html an HTML view used in the player
  • preview.html HTML preview used in the editor
  • style.css CSS styles used by the addon.
  • icon.png 64x64 icon representing this addon in the editor.
  • resources folder (optional) folder with media files referenced from style.css.

Step 3: Create addon files

Add addon ID to registered addons list.

Step 4: Set addon name

The translatable addon name should be added to a localization file: dictionary.js under key <addon_id>_name.

Step 5: Register addon in player

To register the addon in the player (and the editor), modify AddonDescriptorFactory:

    addDescriptor("MyAddonId", "Editor menu group")

Step 6: Add addon description

Addon description text should be added to localization file: dictionary.js under key <addon_id>_info.

Step 7: Build player

After building the player, the new addon will be added to the player distribution.