-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IMA-extension only plays 1 pre-roll from VMAP file #5006
Comments
This looks like another issue to do with handling empty ads: at least some of the ads in the preroll are empty, and our current behavior is to skip the whole ad group when this happens. Empty ad groups are difficult to handle in the IMA extension because we get very little information from the IMA SDK. Is it possible to set up the ad serving so that the ad slots are not empty? |
If I've understood everything correct, the vmap file is set up with a rule of max number of pre-rolls for example and the slots that are sold will be filled and the other ones will be empty. So I don't think it is possible to eliminate empty ads. Currently when the whole group is skipped and content is resumed we do not get the correct adEvents from the AdEventListener either. 'CONTENT_RESUME_REQUESTED' is received 1 min later than when the content starts playing which causes some trouble for us. Is this expected behaviour? |
The reason this is tricky is that our implementation preloads ads to avoid buffering when reaching an ad cue point, but when an ad is empty we get an event from IMA that doesn't tell us which particular ad index in which ad group fails to load. I think the next step towards fixing this is to try replacing the code that marks the ad group as unplayable so it just marks the next ad as unplayable here like this:
If you want to try to fix this yourself you could depend on ExoPlayer via sources (see instructions here) and patch that change in. I'm not sure whether we can distinguish individual ads failing to load from whole ad groups failing to load, so it will take more investigation to know whether this is a robust fix. |
Thanks for the suggestion. I've also tried a similar approach: for (int i = 0; i < adGroup.count; i++) {
if (adGroup.states[i] == AdPlaybackState.AD_STATE_UNAVAILABLE) {
if (DEBUG) {
Log.d(TAG, "Removing ad " + i + " in ad group " + adGroupIndex);
}
adPlaybackState = adPlaybackState.withAdLoadError(adGroupIndex, i);
+ break;
}
} This works sometimes, all pre-rolls and bumper is loaded and played. Post-rolls also works as expected. However it also sometimes fails and gets stuck either at the last working pre-roll or the bumper and never continues to content. I think it it's more likely to happen when using a slower connection. I've been trying to wrap my head around all the stuff going on in ImaAdsLoader but haven't figured out why it sometimes freezes. Could this reseting affect getContentProgress() so the ImaSdk doesn't understand when the ads have been played? |
This is proving difficult to diagnose as there is a current issue with late event delivery when using the IMA SDK which reliably reproduces only when using debug mode and causes the player to get stuck [internal issue: b/117991305]. Using the potential fix above, so far I haven't been able to get the IMA SDK to 'acknowledge' playback of the non-empty ad after the first ad in the preroll ad group: no overlay shows and it doesn't poll the ad progress, yet our interactions with the API seem to match those from a correct playback. However, I don't see ad playback getting stuck as you describe, unless I put the IMA SDK in debug mode. Apart from that, I think the best options at the moment are removing the empty ads (e.g., using an optimized ad pod), or discarding the whole ad break when one ad fails to load ( |
@andrewlewis The referenced internal bug is already fixed. Can this issue be closed? |
The internal reference in my previous comment relates to a bug with debug mode that was making this difficult to diagnose. The IMA SDK team is actively working on improving preloading support which should address this once and for all. We don't yet have an ETA for that though I'm afraid. I am going to leave this open for now and will close it once we've verified that empty ad groups can be handled properly after those improvements are in. |
Any updates on this? We are running into this problem for bumper ad tags before our midroll that are not always filled, which is causing the entire midroll to be skipped. Maybe there's a specific workaround that we can apply? We'd rather not turn off the bumper since other platforms do serve this correctly. |
An upcoming IMA SDK version makes preloading (used by the ExoPlayer IMA extension) more robust, and based on my testing it will fix this issue. I can't give any guarantees about when this will be available I'm afraid (it is mostly out of our control), but I expect it will be during the next couple of months. |
Hi, we had a similar issue with our app. The Ad Manager Publisher Support suggested the use of the "vpi=1" parameter within the Video Publisher Tag. In this case the VMAP response will be "monolithic", all the VAST tag are expanded in the VMAP response. For example, using this tag; https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/ad_rule_samples&ciu_szs=300x250&ad_rule=1&impl=s&gdfp_req=1&env=vp&output=vmap&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ar%3Dpremidpostpod&cmsid=496&vid=short_onecue&correlator=&vpi=1
In this case too, when we have 2 preroll slots where:
|
|
Halo, I'm experiencing the same issue using exo version : |
@magnusvs I've verified that both prerolls play after migrating to the new IMA SDK preloading APIs in fa7d26d. That change should be in a release soon. Sorry for the long wait! @tech-advdigital With the ads response provided the preroll plays (it is not skipped) so I think this is probably fixed too. @shasapo Please could you try to reproduce the behavior you are seen on the |
Issue description
We're trying to implement IMA for our app with the Exoplayer IMA-extension.
Simple ads are working as expected but the extension does seem to have some trouble loading multiple pre-rolls and post-rolls.
Our VMAP contains 5 pre-rolls and 1 bumper before to play before the content. 3 of the pre-rolls are broken. Similarly there are 5 post-rolls where 3 are broken.
This ad tag url has been emailed to dev.exoplayer@gmail.com
We expect the player to play 2 pre-rolls and 1 bumper for before the video content and skip the pre-rolls that are broken. Post-rolls is expected to behave similarly.
This works as expected in Ima SDK advanced and simple example app. (https://github.com/googleads/googleads-ima-android)
However not in the Exoplayer ima-demo app and our implementation with the exoplayer where it only shows 1 pre-roll before content.
Any idea if there could be something wrong in the extension?
Reproduction steps
Switch out the ad_tag_url to our custom url provided in the email in the demo-ima app.
Link to test content
Sent by email
Version of ExoPlayer being used
Tested on v2.9.0 and the dev-v2 branch today.
Device(s) and version(s) of Android being used
Google pixel 2 XL
A full bug report captured from the device
Not provided
The text was updated successfully, but these errors were encountered: