Hi Jakub,
Thank you for reaching out to us.
The scenario that you're describing is an intended behavior, as per the SDK architecture documentation, the SDK requests a VAST Response for the specific Ad Unit on the ad server after the IMA SDK has been loaded.
Also, the LOADED ad event fires when the ad data (Ad object in JavaScript) are first available, hence, regardless of the ad types (pre-roll, mid-roll or post-roll), this event will fire before the ad break start while the content starts or resumes playing. There should be no issues with ad tracking as the IMPRESSION ad event only fires when the first frame of the ad is displayed.
This scenario is not the same when using Preloading feature of the SDK for requesting of ad creative. When preloading is set to TRUE, the first ad creative in the ad break will be requested right after the LOADED ad event, and when set to FALSE, the first ad creative will be requested at the start of the ad break.
With regard to ALL_ADS_COMPLETED event fire when there's no ads or an empty VAST response was returned. I'm going to share this with the rest of the team to check further and I'll get back to this thread once I have the information.
Regards,
Sherwin Diesta
IMA SDK Team
Hi Jakub,
Hope you are well.
Just to give you an update with regard to the ALL_ADS_COMPLETED event firing even when there's no valid ad returned. The team confirmed that this is an intended behavior. The objective of this event is to notify the users that there's no more ad exists to be played and to inform users that the Ads Manager can be destroyed for necessary cleanup.
Let me know if you have further questions or clarifications.
Regards,
Sherwin Diesta
IMA SDK Team