Add support for setting companion ad slots
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=205373398
This commit is contained in:
parent
ce62934861
commit
b654806996
@ -79,8 +79,10 @@
|
|||||||
be directly made with the `Player.EventListener` interface.
|
be directly made with the `Player.EventListener` interface.
|
||||||
* Deprecate `DefaultAnalyticsListener` as selective listener overrides can be
|
* Deprecate `DefaultAnalyticsListener` as selective listener overrides can be
|
||||||
directly made with the `AnalyticsListener` interface.
|
directly made with the `AnalyticsListener` interface.
|
||||||
* IMA: Fix behavior when creating/releasing the player then releasing
|
* IMA:
|
||||||
`ImaAdsLoader` ([#3879](https://github.com/google/ExoPlayer/issues/3879)).
|
* Fix behavior when creating/releasing the player then releasing
|
||||||
|
`ImaAdsLoader` ([#3879](https://github.com/google/ExoPlayer/issues/3879)).
|
||||||
|
* Add support for setting slots for companion ads.
|
||||||
* Fix issue playing DRM protected streams on Asus Zenfone 2
|
* Fix issue playing DRM protected streams on Asus Zenfone 2
|
||||||
([#4403](https://github.com/google/ExoPlayer/issues/4413)).
|
([#4403](https://github.com/google/ExoPlayer/issues/4413)).
|
||||||
* Add support for multiple audio and video tracks in MPEG-PS streams
|
* Add support for multiple audio and video tracks in MPEG-PS streams
|
||||||
|
@ -38,6 +38,7 @@ import com.google.ads.interactivemedia.v3.api.AdsManager;
|
|||||||
import com.google.ads.interactivemedia.v3.api.AdsManagerLoadedEvent;
|
import com.google.ads.interactivemedia.v3.api.AdsManagerLoadedEvent;
|
||||||
import com.google.ads.interactivemedia.v3.api.AdsRenderingSettings;
|
import com.google.ads.interactivemedia.v3.api.AdsRenderingSettings;
|
||||||
import com.google.ads.interactivemedia.v3.api.AdsRequest;
|
import com.google.ads.interactivemedia.v3.api.AdsRequest;
|
||||||
|
import com.google.ads.interactivemedia.v3.api.CompanionAdSlot;
|
||||||
import com.google.ads.interactivemedia.v3.api.ImaSdkFactory;
|
import com.google.ads.interactivemedia.v3.api.ImaSdkFactory;
|
||||||
import com.google.ads.interactivemedia.v3.api.ImaSdkSettings;
|
import com.google.ads.interactivemedia.v3.api.ImaSdkSettings;
|
||||||
import com.google.ads.interactivemedia.v3.api.player.ContentProgressProvider;
|
import com.google.ads.interactivemedia.v3.api.player.ContentProgressProvider;
|
||||||
@ -63,6 +64,7 @@ import java.lang.annotation.Retention;
|
|||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -414,6 +416,17 @@ public final class ImaAdsLoader
|
|||||||
return adsLoader;
|
return adsLoader;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the slots for displaying companion ads. Individual slots can be created using {@link
|
||||||
|
* ImaSdkFactory#createCompanionAdSlot()}.
|
||||||
|
*
|
||||||
|
* @param companionSlots Slots for displaying companion ads.
|
||||||
|
* @see AdDisplayContainer#setCompanionSlots(Collection)
|
||||||
|
*/
|
||||||
|
public void setCompanionSlots(Collection<CompanionAdSlot> companionSlots) {
|
||||||
|
adDisplayContainer.setCompanionSlots(companionSlots);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests ads, if they have not already been requested. Must be called on the main thread.
|
* Requests ads, if they have not already been requested. Must be called on the main thread.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user