-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
Description
I work on an audio application (no videos), and we use ExoPlayer with Ads and a VAST server. We work in a library, used by many applications. We don't have access to the player view - or any android view - when we create the AdsMediaSource. We use a trick like this for the moment :
final AdsMediaSource adsMediaSource = new AdsMediaSource(mediaSource, dataSourceFactory, adsLoader, new AdsLoader.AdViewProvider() {
@Override
public ViewGroup getAdViewGroup() {
return new FrameLayout(context.getApplicationContext());
}
@Override
public View[] getAdOverlayViews() {
return new ArrayList<View>().toArray(new View[0]);
}
});
It works like a charm, but it's not very clean. Can you make the AdsLoader.AdViewProvider optional ? We just need the SkipAd information in this case, to display manually the Skip button and also the skip value to knon when display it. Can we have a getter to retrieve this two fields ?
Thanks in advance,
RadioFranceTeam