Skip to content

Commit

Permalink
Version 1.2.2
Browse files Browse the repository at this point in the history
 - Update vast-client.js to the latest master
 - Bump version numbers to 1.2.2
  • Loading branch information
dharFr committed Jul 11, 2014
1 parent 2124f98 commit aac9afa
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vast-client-js",
"author": ["Olivier Poitrey <[email protected]>"],
"version": "1.2.1",
"version": "1.2.2",
"main": "vast-client.js",
"licenses": [{"type": "MIT", "url": "https://github.com/rs/vast-client-js/raw/master/LICENSE"}],
"ignore": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vast-client-js",
"author": "Olivier Poitrey <[email protected]>",
"version": "1.2.1",
"version": "1.2.2",
"description": "Javascript VAST Client",
"keywords": ["vast", "ad", "advertising", "iab", "in-stream", "video"],
"repository": {"type": "git", "url": "https://github.com/rs/vast-client-js"},
Expand Down
29 changes: 18 additions & 11 deletions vast-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,7 @@ EventEmitter.prototype.addListener = function(type, listener) {
'leak detected. %d listeners added. ' +
'Use emitter.setMaxListeners() to increase limit.',
this._events[type].length);
if (typeof console.trace === 'function') {
// not supported in IE 10
console.trace();
}
console.trace();
}
}

Expand Down Expand Up @@ -661,11 +658,13 @@ VASTParser = (function() {
_ref4 = wrappedAd.creatives;
for (_m = 0, _len4 = _ref4.length; _m < _len4; _m++) {
creative = _ref4[_m];
_ref5 = Object.keys(ad.trackingEvents);
for (_n = 0, _len5 = _ref5.length; _n < _len5; _n++) {
eventName = _ref5[_n];
(_base = creative.trackingEvents)[eventName] || (_base[eventName] = []);
creative.trackingEvents[eventName] = creative.trackingEvents[eventName].concat(ad.trackingEvents[eventName]);
if (creative.type === 'linear') {
_ref5 = Object.keys(ad.trackingEvents);
for (_n = 0, _len5 = _ref5.length; _n < _len5; _n++) {
eventName = _ref5[_n];
(_base = creative.trackingEvents)[eventName] || (_base[eventName] = []);
creative.trackingEvents[eventName] = creative.trackingEvents[eventName].concat(ad.trackingEvents[eventName]);
}
}
}
}
Expand Down Expand Up @@ -720,13 +719,21 @@ VASTParser = (function() {
};

VASTParser.parseWrapperElement = function(wrapperElement) {
var ad, wrapperCreativeElement, wrapperURLElement;
var ad, creative, wrapperCreativeElement, wrapperURLElement, _i, _len, _ref;
ad = this.parseInLineElement(wrapperElement);
wrapperURLElement = this.childByName(wrapperElement, "VASTAdTagURI");
if (wrapperURLElement != null) {
ad.nextWrapperURL = this.parseNodeText(wrapperURLElement);
}
wrapperCreativeElement = ad.creatives[0];
wrapperCreativeElement = null;
_ref = ad.creatives;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
creative = _ref[_i];
if (creative.type === 'linear') {
wrapperCreativeElement = creative;
break;
}
}
if ((wrapperCreativeElement != null) && (wrapperCreativeElement.trackingEvents != null)) {
ad.trackingEvents = wrapperCreativeElement.trackingEvents;
}
Expand Down

0 comments on commit aac9afa

Please sign in to comment.