Ads dont play in Exoplayer with ImaAdsLoader on Android

1,197 views
Skip to first unread message

Олексій Дундар

unread,
Oct 8, 2018, 10:32:26 AM10/8/18
to Interactive Media Ads SDK

I`m trying to play ads in my video. I have url (I obtain it from backend) for obtaining vast xml file. And i put it to adsLoader in my code:

private MediaSource buildMediaSourceWithAds(Uri uri) {
    ImaSdkSettings imaSdkSettings = ImaSdkFactory.getInstance().createImaSdkSettings();
    imaSdkSettings.setAutoPlayAdBreaks(true);
    imaSdkSettings.setDebugMode(true);
    
    adsLoader = new ImaAdsLoader.Builder(this)
            .setImaSdkSettings(imaSdkSettings)
            .setMediaLoadTimeoutMs(30 * 1000)
            .setVastLoadTimeoutMs(30 * 1000)
            .buildForAdTag(Uri.parse(videoAdsUrl)); // here is url for vast xml file


    return new AdsMediaSource(
            buildMediaSource(uri),
            this,
            adsLoader,
            simpleExoPlayerView.getOverlayFrameLayout());
}

But when I start my app there is no ads in my exo video player. Prerolls are just skipped, midrolls and postrolls freeze video (when their time has come) and I must to move timebar of player.
Sometimes I see error "1009, The response does not contain any valid ads", sometimes another (with enabed debug mode).
I attached file with example vast xml, that doesnt play ads in exoplayer.

How to fix this problem, help please. Thanks.

Not working Ad.txt

ima-sdk-adv...@google.com

unread,
Oct 8, 2018, 3:13:08 PM10/8/18
to ima...@googlegroups.com
Hi there,

Thank you for reaching out to support. The IMA SDK team does not support the ExoPlayer & IMA integration that is being used here. That repository is managed by the ExoPlayer team and they provide support on their Github Issue Tracker.

Regards,
Deepika Uragayala
IMA SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--
You received this message because you are subscribed to the Google Groups "Interactive Media Ads SDK" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ima-sdk+unsubscribe@googlegroups.com.
To post to this group, send email to ima...@googlegroups.com.
Visit this group at https://groups.google.com/group/ima-sdk.
For more options, visit https://groups.google.com/d/optout.

Олексій Дундар

unread,
Oct 10, 2018, 3:55:55 AM10/10/18
to Interactive Media Ads SDK
I just wanted to know,  if IMA SDK should handle the errors (or incorrect ads types) herself on Android. Or should I add a handler in code for errors and which one?
Reply all
Reply to author
Forward
0 new messages