Wrong call to vpaid properties
JudithDu opened this issue · comments
Hi!
I've seen a problem in your VPAIDAdUnit.js file. In the methods getAdLinear, getAdWidth, getAdHeight, getAdExpanded, getAdSkippableState, getAdRemainingTime, getAdCompanions and getAdIcons. The corresponding vpaid properties are written without the "get" prefix.
And the same in your VPAIDWrapper.as file. You want to call properties and not methods so you have to remove the parenthesis when you call it (eg: public function get adWidth():Number{return ad.adWidth;})
Thank's
Hello @JudithDu yes you are right, but because we want that the VPAIDFlash and VPAIDHTML5 to have almost the same API, so we decided to follow the javascript implementation instead the the flash implementation see spec page 51 (implementation of vpaid js) the getter's and setters are prefix with get and set.
example copied from the pdf
VPAIDWrapper.prototype.getAdExpanded = function() {
console.log("getAdExpanded");
return this._creative.getAdExpanded();
};
they probably implemented like this because getters and setters is only supported in new browsers
even if they are prefixed with get/set, in the flash side they are mapped to use the getter and setter without the prefix
There was some issues with the mapping I fixed with the commit bced6d3.
Let me know if you find any other issue.
Cheers