-
- 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
public class GoogleIMAComponent extends BaseIMAComponent
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
GoogleIMAComponent.Builder
-
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 IMAAnalytics
imaAnalytics
-
Constructor Summary
Constructors Constructor Description GoogleIMAComponent(BaseVideoView baseVideoView, EventEmitter eventEmitter)
GoogleIMAComponent(BaseVideoView baseVideoView, EventEmitter eventEmitter, boolean useAdRules, ImaSdkSettings imaSdkSettings, AdsRenderingSettings adsRenderingSettings)
GoogleIMAComponent(BaseVideoView baseVideoView, EventEmitter eventEmitter, boolean useAdRules, ImaSdkSettings imaSdkSettings)
GoogleIMAComponent(BaseVideoView baseVideoView, EventEmitter eventEmitter, boolean useAdRules, AdsRenderingSettings adsRenderingSettings)
GoogleIMAComponent(BaseVideoView baseVideoView, EventEmitter eventEmitter, boolean useAdRules)
GoogleIMAComponent(BaseVideoView baseVideoView, EventEmitter eventEmitter, ImaSdkSettings imaSdkSettings)
-
Method Summary
Modifier and Type Method Description void
initializeAdsRequests()
void
onAdsManagerLoaded(AdsManagerLoadedEvent event)
void
setAdPosition(long adPosition)
int
getContentPosition()
void
reloadAdsRequest()
Creates a request to reload the Ads. void
addCallback(VideoAdPlayer.VideoAdPlayerCallback callback)
void
removeCallback(VideoAdPlayer.VideoAdPlayerCallback callback)
GoogleIMAVideoAdPlayer
getVideoAdPlayer()
Returns the current GoogleIMAVideoAdPlayer, or null if it has not been created yet. AdDisplayContainer
getAdDisplayContainer()
Returns the current AdDisplayContainer, or null if it has not been created yet. void
onAdError(AdErrorEvent event)
void
skipCurrentAd()
void
setSpringServeMacrosMap(HashMap<String, Object> springServeMacros)
void
onAdEvent(AdEvent event)
void
onContentPauseRequested()
void
onContentResumeRequested()
-
Methods inherited from class com.brightcove.ima.BaseIMAComponent
clean, getAdPosition, getAdPositionLong, getAdsRenderingSettings, getContentPositionLong, getContentProgress, getCurrentAdIndex, getCurrentAdsRequests, getImaSdkSettings, getSupportedProgressiveMimeTypes, isPlayingAd, setContentPosition, skipCurrentAds, updateAdTargetingValues, useAdRules
-
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
-
-
Constructor Detail
-
GoogleIMAComponent
GoogleIMAComponent(BaseVideoView baseVideoView, EventEmitter eventEmitter)
- Parameters:
baseVideoView
- The Brightcove video view.eventEmitter
- The current event emitter.
-
GoogleIMAComponent
GoogleIMAComponent(BaseVideoView baseVideoView, EventEmitter eventEmitter, boolean useAdRules, ImaSdkSettings imaSdkSettings, AdsRenderingSettings adsRenderingSettings)
- Parameters:
baseVideoView
- The Brightcove video view.eventEmitter
- The current event emitter.useAdRules
- Whether to use Ad Rules instead of cue points.imaSdkSettings
- Application specified settings for the IMA SDK.adsRenderingSettings
- AdsRenderingSettings used when initializing AdsManager.
-
GoogleIMAComponent
GoogleIMAComponent(BaseVideoView baseVideoView, EventEmitter eventEmitter, boolean useAdRules, ImaSdkSettings imaSdkSettings)
- Parameters:
baseVideoView
- The Brightcove video view.eventEmitter
- The current event emitter.useAdRules
- Whether to use Ad Rules instead of cue points.imaSdkSettings
- Application specified settings for the IMA SDK.
-
GoogleIMAComponent
GoogleIMAComponent(BaseVideoView baseVideoView, EventEmitter eventEmitter, boolean useAdRules, AdsRenderingSettings adsRenderingSettings)
- Parameters:
baseVideoView
- The Brightcove video view.eventEmitter
- The current event emitter.useAdRules
- Whether to use Ad Rules instead of cue points.adsRenderingSettings
- AdsRenderingSettings used when initializing AdsManager.
-
GoogleIMAComponent
GoogleIMAComponent(BaseVideoView baseVideoView, EventEmitter eventEmitter, boolean useAdRules)
- Parameters:
baseVideoView
- The Brightcove video view.eventEmitter
- The current event emitter.useAdRules
- Whether to use Ad Rules instead of cue points.
-
GoogleIMAComponent
GoogleIMAComponent(BaseVideoView baseVideoView, EventEmitter eventEmitter, ImaSdkSettings imaSdkSettings)
- Parameters:
baseVideoView
- The Brightcove video view.eventEmitter
- The current event emitter.imaSdkSettings
- Application specified settings for the IMA SDK.
-
-
Method Detail
-
initializeAdsRequests
@Deprecated() void initializeAdsRequests()
-
onAdsManagerLoaded
void onAdsManagerLoaded(AdsManagerLoadedEvent event)
-
setAdPosition
void setAdPosition(long adPosition)
-
getContentPosition
@Deprecated() int getContentPosition()
-
reloadAdsRequest
void reloadAdsRequest()
Creates a request to reload the Ads.
This method will re-initialize the Ads Manager and will emitthe GoogleIMAEventType.ADS_MANAGER_LOADED event again.
NOTE: This method works only when the GoogleIMAComponentis NOT using Google Ad Rules.
-
addCallback
void addCallback(VideoAdPlayer.VideoAdPlayerCallback callback)
-
removeCallback
void removeCallback(VideoAdPlayer.VideoAdPlayerCallback callback)
-
getVideoAdPlayer
@Nullable() GoogleIMAVideoAdPlayer getVideoAdPlayer()
Returns the current GoogleIMAVideoAdPlayer, or null if it has not been created yet.
-
getAdDisplayContainer
@Nullable() AdDisplayContainer getAdDisplayContainer()
Returns the current AdDisplayContainer, or null if it has not been created yet.
-
onAdError
void onAdError(AdErrorEvent event)
-
skipCurrentAd
void skipCurrentAd()
-
setSpringServeMacrosMap
void setSpringServeMacrosMap(HashMap<String, Object> springServeMacros)
-
onAdEvent
void onAdEvent(AdEvent event)
-
onContentPauseRequested
void onContentPauseRequested()
-
onContentResumeRequested
void onContentResumeRequested()
-
-
-
-