question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Changing ad source in runtime (Exoplayer IMA extension)

See original GitHub issue

[REQUIRED] Searched documentation and issues

Yes

[REQUIRED] Question

is There a way to change Ad source XML while the ad is running? For eg, if i created an ad source before the actual playback (using Uri adXMLUri =Uri.parse(AD_XML_URL), imaAdsLoader = new ImaAdsLoader(this,adXMLUri ) and AdsMediaSource adsMediaSource = new AdsMediaSource( mediaSource, dataSourceFactory, imaAdsLoader,adViewProvider) ), is there a way i could run them all again and change this AD_XML_URL everytime the ad runs completely?will exoplayer be able to catch this change and update its ads/video stream and player ui accordingly? I also know there is some way to add adEventListener , as discussed in #3322 , but i am unable to figure out how. would be great to get some insights for that too.

A full bug report captured from the device

Not Applicable.

Link to test content

Not Applicable.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
andrewlewiscommented, Jun 23, 2020

#4680 will likely solve this request once we get round to it (and even if it doesn’t, it will likely provide a good starting point for doing what’s described here), so I will close this.

0reactions
andrewlewiscommented, Mar 13, 2020

@root-ansh Sorry for the delayed response. My understanding is that in the VMAP specification your top level ad tag can point to other ad tags which are loaded just before playback reaches the corresponding cue point.

It sounds like you may be trying to implement this on the client rather than having an ad server that provides a VMAP ad tag as described. In that case you probably need to implement a custom AdsLoader, but I’m afraid we don’t have detailed documentation on how to do that yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ad insertion - ExoPlayer
The ExoPlayer IMA extension provides ImaServerSideAdInsertionMediaSource , making it easy to integrate with IMA's server-side inserted ad streams in your app.
Read more >
android exoplayer with ima extension can't automatically show ...
I use this solution : React Native custom component doesn't set component's size dynamically, to solve the problem.
Read more >
Get started | IMA SDK for Android - Google Developers
This guide demonstrates how to integrate the IMA SDK into an empty Android Studio project using the Android VideoView to display content and...
Read more >
Media3 - Android Developers
ExoPlayer, an application-level media player for Android that is easy to customize and extend. Media session functionality, for exposing and controlling ...
Read more >
Source Code for ImaAdsLoader.java - AndroidX Tech
package androidx.media3.exoplayer.ima; import static androidx.media3.common.util.Assertions. ... AdsLoader; import androidx.media3.exoplayer.source.ads.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found