dailymotion / vast-client-js

VAST (up to 6) parsing library for JavaScript
https://iabtechlab.com/wp-content/uploads/2022/09/VAST_4.3.pdf
MIT License
367 stars 215 forks source link

fix bug where fallback was not working if first ad element return empty #466

Closed Rapha0511 closed 5 months ago

Rapha0511 commented 10 months ago

Description

https://github.com/dailymotion/vast-client-js/blob/master/src/parser/vast_parser.js#L461C25-L461C25

The condition will never be reach since !resolvedAds will always be false. So in case the first Ad element of a VAST is empty or it fails, it will never fallback to the next Ad element.

Issue

If any Ad element (going from top to bottom) fails to fetch xml or return empty vast, it will not fallback to next Ad Element.

Issue Link

Type

shubham-si commented 6 months ago

@ZacharieTFR @Rapha0511 when we are planning to release this fix