Skip to content

Commit

Permalink
Publishing latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Yury Pavlotsky committed Mar 16, 2018
1 parent 1be7059 commit e19c03a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions vpaid/VpaidVideoAd.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ var VpaidVideoPlayer = function() {
* @private
*/
this.quartileEvents_ = [
{event: 'AdImpression', value: 0},
{event: 'AdVideoStart', value: 0},
{event: 'AdVideoFirstQuartile', value: 25},
{event: 'AdVideoMidpoint', value: 50},
Expand Down Expand Up @@ -137,9 +138,24 @@ VpaidVideoPlayer.prototype.initAd = function(
'ended',
this.stopAd.bind(this),
false);
this.slot_.addEventListener(
'click',
this.clickAd_.bind(this),
false);
this.callEvent_('AdLoaded');
};

/**
* Called when the ad is clicked.
* @private
*/
VpaidVideoPlayer.prototype.clickAd_ = function() {
if ('AdClickThru' in this.eventsCallbacks_) {
this.eventsCallbacks_['AdClickThru']('','0', true);
}
};



/**
* Called by the video element when video metadata is loaded.
Expand Down

0 comments on commit e19c03a

Please sign in to comment.