How to Embed an Auto Playlist


Auto Playlist Configuration

Auto Playlist (MAXi) consists of 2 components:

  1. Publisher’s specific configuration
  2. Execution script reference

Both should be added to publisher’s site template in <head> section

It is strongly recommended to transpile inner javascript section in order to support older browsers online babel transpiler


/** JSDoc:

* @param {Object} maxConfig - main config object, must defined on `window` object
* @param {Object} - A global object that control on player and defines customer requirements
* @param {Object} - player object, this object will setup a new player for this customer
* @param {String} - player id
* @param {String} - player buyer company id
* @param {Number} [] - on load timeout delay in milliseconds
* @param {Number} - customer's template to insert / wrap the player when strategy is passed
* @typedef {Object} Strategy
* @param {Array<Strategy>} maxConfig.strategies
* @property {String} Strategy.type - INSERT | REPLACE
* @property {String} Strategy.position - beforebegin | afterbegin | beforeend | afterend . (ReadMore)[]
* @property {Boolean} Strategy.injectIfPlayerAlreadyExists - when true, will inject MAXi when there is already player (any) in this page.
* @property {String} Strategy.cssSelector - Where should inject MAXi in this page. (must compatible with real selector)
* @property {Function} Strategy.conditionFunc - when this function will return true, this strategy will work.


Example (also in attached JS file):




Have more questions? Submit a request