-
- All Implemented Interfaces:
-
com.brightcove.player.event.Component
,com.google.ads.interactivemedia.v3.api.AdErrorEvent.AdErrorListener
,com.google.ads.interactivemedia.v3.api.AdEvent.AdEventListener
,com.google.ads.interactivemedia.v3.api.AdsLoader.AdsLoadedListener
,com.google.ads.interactivemedia.v3.api.player.ContentProgressProvider
@Emits(events = {EventType.AD_BREAK_COMPLETED, EventType.AD_COMPLETED, EventType.AD_ERROR, EventType.AD_PAUSED, EventType.AD_PROGRESS, EventType.AD_RESUMED, EventType.AD_BREAK_STARTED, EventType.AD_STARTED, EventType.COMPLETED, EventType.ERROR, EventType.PAUSE, EventType.PLAY, EventType.WILL_INTERRUPT_CONTENT, EventType.WILL_RESUME_CONTENT, EventType.REGISTER_PLUGIN, EventType.SET_CUE_POINTS, GoogleIMAEventType.ADS_MANAGER_LOADED, GoogleIMAEventType.ADS_REQUEST_FOR_VIDEO, GoogleIMAEventType.DID_FAIL_TO_PLAY_AD, EventType.SHOW_SEEK_CONTROLS, EventType.HIDE_SEEK_CONTROLS})@ListensFor(events = {EventType.ACTIVITY_CREATED, EventType.ACTIVITY_PAUSED, EventType.ACTIVITY_RESUMED, EventType.ACTIVITY_SAVE_INSTANCE_STATE, EventType.ACTIVITY_STARTED, EventType.ACTIVITY_DESTROYED, EventType.COMPLETED, EventType.CUE_POINT, EventType.FRAGMENT_CREATED_VIEW, EventType.FRAGMENT_PAUSED, EventType.FRAGMENT_RESUMED, EventType.FRAGMENT_SAVE_INSTANCE_STATE, EventType.FRAGMENT_STARTED, EventType.FRAGMENT_DESTROYED, EventType.PLAY, EventType.PROGRESS, EventType.SEEK_TO, EventType.WILL_CHANGE_VIDEO, EventType.VIDEO_DURATION_CHANGED, GoogleIMAEventType.ADS_MANAGER_LOADED, GoogleIMAEventType.DID_FAIL_TO_PLAY_AD, ShowHideController.SHOW_MEDIA_CONTROLS}) public abstract class BaseIMAComponent extends AbstractComponent implements AdErrorEvent.AdErrorListener, AdsLoader.AdsLoadedListener, AdEvent.AdEventListener, ContentProgressProvider
-
-
Field Summary
Fields Modifier and Type Field Description public final static String
ADS_REQUESTS
public final static String
AD_EVENT
public final static String
AD_TAG_URL
public final static String
ADS_MANAGER
public final static String
AD_PLAYHEAD_POSITION
public final static String
AD_WAS_PLAYING
public final static String
TAG_NON_PERSONALIZED_ADS
public final static String
TAG_FOR_USERS_UNDER_AGE
public final static String
TAG_GOOGLE_RDP_SIGNAL
public final static String
TAG_IAB_RDP_SIGNAL
public final static String
TAG_LIMITED_ADS
protected AdsRenderingSettings
adsRenderingSettings
protected List<AdsRequest>
currentAdsRequests
protected int
currentAdIndex
-
Constructor Summary
Constructors Constructor Description BaseIMAComponent(EventEmitter eventEmitter)
-
Method Summary
Modifier and Type Method Description AdsRenderingSettings
getAdsRenderingSettings()
List<AdsRequest>
getCurrentAdsRequests()
int
getCurrentAdIndex()
void
updateAdTargetingValues(@NonNull() Map<String, String> adTargetingValues)
Updates the key/value pairs used for audience segment targeting.These values will be appended to the Ad Tag Url as part of the "cust_param" query parameter.The "cust_param" values will be encoded. static List<String>
getSupportedProgressiveMimeTypes()
int
getAdPosition()
Deprecated. long
getAdPositionLong()
long
getContentPositionLong()
void
setContentPosition(long position)
abstract void
skipCurrentAd()
boolean
isPlayingAd()
void
skipCurrentAds()
void
useAdRules(boolean useAdRules)
ImaSdkSettings
getImaSdkSettings()
VideoProgressUpdate
getContentProgress()
void
clean()
Releases the resources created in this component.This method is responsible for cleaning up various resources associated with the component,including the AdsLoader, AdPlayer, AdsManager, and other internal collections. -
Methods inherited from class com.brightcove.player.event.AbstractComponent
addListener, addOnceListener, getEventEmitter, removeListener, removeListeners
-
Methods inherited from class com.google.ads.interactivemedia.v3.api.AdErrorEvent.AdErrorListener
onAdError
-
Methods inherited from class com.google.ads.interactivemedia.v3.api.AdsLoader.AdsLoadedListener
onAdsManagerLoaded
-
Methods inherited from class com.google.ads.interactivemedia.v3.api.AdEvent.AdEventListener
onAdEvent
-
Methods inherited from class com.google.ads.interactivemedia.v3.api.player.ContentProgressProvider
getContentProgress
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getAdsRenderingSettings
AdsRenderingSettings getAdsRenderingSettings()
-
getCurrentAdsRequests
@NonNull() List<AdsRequest> getCurrentAdsRequests()
-
getCurrentAdIndex
int getCurrentAdIndex()
-
updateAdTargetingValues
void updateAdTargetingValues(@NonNull() Map<String, String> adTargetingValues)
Updates the key/value pairs used for audience segment targeting.These values will be appended to the Ad Tag Url as part of the "cust_param" query parameter.The "cust_param" values will be encoded.For example, if you provide the following map:
The following string will be appended to the provided Ad Tag Url:{@code * MapaudienceSegmentTargetingValues = new HashMap<>(); * audienceSegmentTargetingValues.put("section", "sports"); * audienceSegmentTargetingValues.put("multi", "baseball,tennis"); * }
"&cust_params=section%3Dsports%26multi%3Dbaseball%2Ctennis"
-
getSupportedProgressiveMimeTypes
static List<String> getSupportedProgressiveMimeTypes()
-
getAdPosition
@Deprecated() int getAdPosition()
Deprecated. Use {getAdPositionLong} instead
-
getAdPositionLong
long getAdPositionLong()
-
getContentPositionLong
long getContentPositionLong()
-
setContentPosition
void setContentPosition(long position)
-
skipCurrentAd
abstract void skipCurrentAd()
-
isPlayingAd
boolean isPlayingAd()
-
skipCurrentAds
void skipCurrentAds()
-
useAdRules
void useAdRules(boolean useAdRules)
-
getImaSdkSettings
ImaSdkSettings getImaSdkSettings()
-
getContentProgress
VideoProgressUpdate getContentProgress()
-
clean
void clean()
Releases the resources created in this component.This method is responsible for cleaning up various resources associated with the component,including the AdsLoader, AdPlayer, AdsManager, and other internal collections.
-
-
-
-