Closed marcodeltorob closed 3 years ago
I don not believe this error should cause the the ad to fail. It is common for VMAP wrapper ads to return 1009, empty vast when one or more wrappers returns without a matching ad. This triggers the VMAP to look at the next wrapper, and so on. Killing the ad when the first 1009 occurs would be problematic as the ad would stop and not proceed to the next wrapper candidate.
I'm suspecting an issue in the IMA SDK or Chrome as there are 3-4 threads about weird behavior with 1009 on the IMA SDK Google Group, like this one for example: https://groups.google.com/g/ima-sdk/c/nqWj9IZBJzk/m/76cy8255AAAJ
Discussed offline. Since this looks like it's related to the IMA SDK, we probably don't want to work around it in the contrib-ads plugin (it should be agnostic as pertains to the ad provider).
But these changes can inform what we might do in our internal IMA-specific implementation!
After doing some investigation on this myself, it looks like what happens sometimes is that the playing
event occurs while the player is still in ad mode. When we go to resume from the Preroll
state, the code that triggers playback doesn't do anything because the player is already playing.
I think we should detect this condition and, instead, trigger the playing
event so that it doesn't get swallowed and content mode resumes properly.
Problem Description
When the Ads plugin throws an
adserror (Preroll)
dueAdError 1009: The VAST response document is empty
is getting stuck in thePreroll
state and not switching toContentPlayback
because of this behavior the Ads plugin is dispatchingtimeupdate
ascontenttimeupdate
. So, in andadserror
we want to transition toContentPlayback
with acontentresumed
if the player is actually playing content.