videojs-vast-vpaid
Version:
VAST plugin to use with video.js
27 lines (19 loc) • 497 B
JavaScript
const InLine = require('./InLine');
const Wrapper = require('./Wrapper');
function Ad (adJTree) {
if (!(this instanceof Ad)) {
return new Ad(adJTree);
}
this.initialize(adJTree);
}
Ad.prototype.initialize = function (adJTree) {
this.id = adJTree.attr('id');
this.sequence = adJTree.attr('sequence');
if (adJTree.inLine) {
this.inLine = new InLine(adJTree.inLine);
}
if (adJTree.wrapper) {
this.wrapper = new Wrapper(adJTree.wrapper);
}
};
module.exports = Ad;