dist/vast-client-node.js
function VASTTracker(client, ad, creative) {
    var variation = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
    classCallCheck(this, VASTTracker);

    var _this = possibleConstructorReturn(this, (VASTTracker.__proto__ || Object.getPrototypeOf(VASTTracker)).call(this));

    _this.ad = ad;
    _this.creative = creative;
    _this.variation = variation;
    _this.muted = false;
    _this.impressed = false;
    _this.skippable = false;
    _this.trackingEvents = {};
    // We need to save the already triggered quartiles, in order to not trigger them again
    _this._alreadyTriggeredQuartiles = {};
    // Tracker listeners should be notified with some events
    // no matter if there is a tracking URL or not
    _this.emitAlwaysEvents = ['creativeView', 'start', 'firstQuartile', 'midpoint', 'thirdQuartile', 'complete', 'resume', 'pause', 'rewind', 'skip', 'closeLinear', 'close'];

    // Duplicate the creative's trackingEvents property so we can alter it
    for (var eventName in _this.creative.trackingEvents) {
      var events$$1 = _this.creative.trackingEvents[eventName];
      _this.trackingEvents[eventName] = events$$1.slice(0);
    }

    // Nonlinear and companion creatives provide some tracking information at a variation level
    // While linear creatives provided that at a creative level. That's why we need to
    // differentiate how we retrieve some tracking information.
    if (_this.creative instanceof CreativeLinear) {
      _this._initLinearTracking();
    } else {
      _this._initVariationTracking();
    }

    // If the tracker is associated with a client we add a listener to the start event
    // to update the lastSuccessfulAd property.
    if (client) {
      _this.on('start', function () {
        client.lastSuccessfulAd = Date.now();
      });
    }
    return _this;
  }
function VASTTracker(client, ad, creative) {
    var variation = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
    classCallCheck(this, VASTTracker);

    var _this = possibleConstructorReturn(this, (VASTTracker.__proto__ || Object.getPrototypeOf(VASTTracker)).call(this));

    _this.ad = ad;
    _this.creative = creative;
    _this.variation = variation;
    _this.muted = false;
    _this.impressed = false;
    _this.skippable = false;
    _this.trackingEvents = {};
    // We need to save the already triggered quartiles, in order to not trigger them again
    _this._alreadyTriggeredQuartiles = {};
    // Tracker listeners should be notified with some events
    // no matter if there is a tracking URL or not
    _this.emitAlwaysEvents = ['creativeView', 'start', 'firstQuartile', 'midpoint', 'thirdQuartile', 'complete', 'resume', 'pause', 'rewind', 'skip', 'closeLinear', 'close'];

    // Duplicate the creative's trackingEvents property so we can alter it
    for (var eventName in _this.creative.trackingEvents) {
      var events$$1 = _this.creative.trackingEvents[eventName];
      _this.trackingEvents[eventName] = events$$1.slice(0);
    }

    // Nonlinear and companion creatives provide some tracking information at a variation level
    // While linear creatives provided that at a creative level. That's why we need to
    // differentiate how we retrieve some tracking information.
    if (_this.creative instanceof CreativeLinear) {
      _this._initLinearTracking();
    } else {
      _this._initVariationTracking();
    }

    // If the tracker is associated with a client we add a listener to the start event
    // to update the lastSuccessfulAd property.
    if (client) {
      _this.on('start', function () {
        client.lastSuccessfulAd = Date.now();
      });
    }
    return _this;
  }
function VASTTracker ( client , ad , creative ) { var variation = arguments . length > 3 && arguments [ 3 ] !== undefined ? arguments [ 3 ] : null ; classCallCheck ( this , VASTTracker ) ; var _this = possibleConstructorReturn ( this , ( VASTTracker . __proto__ || Object . getPrototypeOf ( VASTTracker ) ) . call ( this ) ) ; _this . ad = ad ; _this . creative = creative ; _this . variation = variation ; _this . muted = false ; _this . impressed = false ; _this . skippable = false ; _this . trackingEvents = { } ; // We need to save the already triggered quartiles, in order to not trigger them again _this . _alreadyTriggeredQuartiles = { } ; // Tracker listeners should be notified with some events // no matter if there is a tracking URL or not _this . emitAlwaysEvents = [ 'creativeView' , 'start' , 'firstQuartile' , 'midpoint' , 'thirdQuartile' , 'complete' , 'resume' , 'pause' , 'rewind' , 'skip' , 'closeLinear' , 'close' ] ; // Duplicate the creative's trackingEvents property so we can alter it for ( var eventName in _this . creative . trackingEvents ) { var events$$1 = _this . creative . trackingEvents [ eventName ] ; _this . trackingEvents [ eventName ] = events$$1 . slice ( 0 ) ; } // Nonlinear and companion creatives provide some tracking information at a variation level // While linear creatives provided that at a creative level. That's why we need to // differentiate how we retrieve some tracking information. if ( _this . creative instanceof CreativeLinear ) { _this . _initLinearTracking ( ) ; } else { _this . _initVariationTracking ( ) ; } // If the tracker is associated with a client we add a listener to the start event // to update the lastSuccessfulAd property. if ( client ) { _this . on ( 'start' , function ( ) { client . lastSuccessfulAd = Date . now ( ) ; } ) ; } return _this ; }
Creates an instance of VASTTracker.

@param {VASTClient} client - An instance of VASTClient that can be updated by the tracker. [optional]
@param {Ad} ad - The ad to track.
@param {Creative} creative - The creative to track.
@param {CompanionAd|NonLinearAd} [variation=null] - An optional variation of the creative.
@constructor
Creates an instance of VASTTracker .