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:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
#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.
@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.