Is there a way to not pause the player when Vast is empty?

Hello there,

We are trying to schedule midroll ads with an AdServer that takes some macros to create a Vast, but if the macros don’t match with the configuration (ie: hour, country, type of content…), the AdServer returns an empty Vast that is processed as an AdError, pausing the player for a second and then continues with the content without problem.

As the title says, is there a way to bypass this pause/play when the Vast is empty?

Hi @gledezma,
the Android Player pauses the main content in order to play back the ad. This behaviour is in place to guarantee that the ad is shown at the exact moment it was scheduled (i.e. at 25% or after some specific content).
If the ad evaluates to an error (PlayerEvent.AdError is emitted) as described in your use case, the main content is resumed. This is the pauseplay that you are experiencing.

The behaviour can be improved by preloading the ad manifest before reaching the actual ad position in the main content. This allows the advertising SDK to evaluate the error early on and avoid the extra pause.

In the Bitmovin Android Player, the ad manifest preloading offset can be configured here. A sensible value can be something between five and ten seconds depending on the performance of your ad server.

There is one major downside to increasing the preloading offset if your app supports background playback (documentation from AdItem):

If the ad view group is removed or set the first time (e.g. by passing null to Player.setAdViewGroup or by moving the hosting app to the background) after an IMA AdSource has been loaded, the according AdItem is discarded. The same holds true if the ad view group is removed or set during ad playback.

This will - without suitable counter measures - result in scheduled ads not being played when the app is moved to the background.

Hope that helps. :slight_smile:

Thank you very much for the quick answer

We will test this preload offset and let you know, we think is the solution we were looking for.

edit: it was the solution.

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.