vast-vmap
vast-vmap copied to clipboard
Handling error tags for <InLine> and <Wrapper>
According to IAB documentation: "<Error> contains a URI to a tracking resource that the video player should request if for some reason the InLine ad could not be served"
As I saw, VASTAd object implementation (inside the constructor) doesn't extract these errors from the given <Ad>.
Yes, I intentionally did not implement these as getting the main part of the VAST parsing in place was more important. It's certainly a useful feature though, so a PR would be welcome. I think the script loading ads should be notified of the error as well (possibly by providing another callback) instead of just masking the error. Maybe the return value of the callback could be used to determine whether to show the fallback ad or not.