How to Reference an Extension using the Dynamic Player API Tag

Important: If you are unfamiliar with the Dynamic Player API Tag, please refer to the following article first How to embed a Dynamic Player API Tag.

After you have created your extension (either on the same page or as a separate JavaScript file), you will now turn to your Dynamic Player API tag that is placed into your HTML page.

In your Dynamic Tag you will need to pass an new property array known as: 'extensions': []. This array can be used to reference multiple extensions by this player as each each extension is defined as a separate object.

 

The following example is a simple dynamic player API tag:

var player = vidible.player('target_div_ID_for_embedding').setup({
pid: '570f610fe4b028965ddd20cf', //Your Player ID
bcid: '56d5921ce4b0f5991ad44713', //Your Company ID
extensions: [{
name: 'yourExtension', //Your extension's name
url: 'http://on.aol.com/myExtensionsPack.js', //Your Extension location
config: {
//Your extension configuration object

yourConfigSetting1: 'My custom text',
yourConfigSetting2: 150,
yourConfigSetting3: 'http://on.aol.com/Aol.png'
}
}]
}).load();

 

In the example above the 'extensions' property (highlighted in blue), is an array that holds separate objects for each extension. Each extension object should include the following:

  • name - Mandatory: The name of your extension as it has been declared in the JavaScript file/tag. 
  • url - Optional: The URL address of your extensions if it is located outside the scope of the Dynamic Player API tag or on another location (either long/short formats). 
  • config - Optional: This is a configuration object that will be passed to your extension to define any type of custom setting. In the example above we have given several properties to the 'config' object that can be used to control the extension.

 

To view a live example of how Player Extensions work, please click here.

Have more questions? Submit a request