How to use the clappr.$.isPlainObject function in clappr

To help you get started, we’ve selected a few clappr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kslimani / clappr-google-ima-html5-preroll / src / index.js View on Github external
_configure() {
    this._tag = this.cfg.tag || false
    this._autostart = this.cfg.autostart === false ? false : true // Default is true
    this._events = $.isPlainObject(this.cfg.events) ? this.cfg.events : {}
    this._vpaid = this.cfg.hasOwnProperty('vpaid') ? this.cfg.vpaid : 0 // Default VpaidMode is DISABLED
    this._nonLinearDuration = this.cfg.nonLinearDuration > 0 ? this.cfg.nonLinearDuration : 15000 // Default is 15 seconds
    this._imaLoadtimeout = this.cfg.imaLoadTimeout > 0 ? this.cfg.imaLoadTimeout : 6000 // Default is 6 seconds
    this._usePosterIcon = !!this.cfg.usePosterIcon
    this._maxDuration = this.cfg.maxDuration > 0 ? this.cfg.maxDuration : false // Default is disabled
    this._locale = this.cfg.locale ? this.cfg.locale : false // Default is to not set custom locale
    this._disableLoader = this.cfg.disableLoader ? this.cfg.disableLoader : false // Default is false (Loader is enabled)
    // TODO: Add an option which is an array of plugin name to disable
  }