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.
--
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.