@Emits(events={"adBreakCompleted","adCompleted","adError","adPaused","adProgress","adResumed","adBreakStarted","adStarted","completed","error","pause","play","willInterruptContent","willResumeContent","registerPlugin","setCuePoints","adsManagerLoaded","adsRequestForVideo","didFailToPlayAd","showSeekControls","hideSeekControls"}) @ListensFor(events={"activityCreated","activityPaused","activityResumed","activitySaveInstanceState","activityStarted","completed","cuePoint","fragmentCreatedView","fragmentPaused","fragmentResumed","fragmentSaveInstanceState","fragmentStarted","play","progress","seekTo","willChangeVideo","adsManagerLoaded","didFailToPlayAd"}) public class GoogleIMAComponent extends AbstractComponent implements com.google.ads.interactivemedia.v3.api.AdErrorEvent.AdErrorListener, com.google.ads.interactivemedia.v3.api.AdsLoader.AdsLoadedListener, com.google.ads.interactivemedia.v3.api.AdEvent.AdEventListener, com.google.ads.interactivemedia.v3.api.player.ContentProgressProvider
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AD_EVENT |
static java.lang.String |
AD_PLAYHEAD_POSITION |
static java.lang.String |
AD_TAG_URL |
static java.lang.String |
AD_WAS_PLAYING |
static java.lang.String |
ADS_MANAGER |
static java.lang.String |
ADS_REQUESTS |
eventEmitter, listenerTokens
Constructor and Description |
---|
GoogleIMAComponent(BaseVideoView baseVideoView,
EventEmitter eventEmitter) |
GoogleIMAComponent(BaseVideoView baseVideoView,
EventEmitter eventEmitter,
boolean useAdRules) |
GoogleIMAComponent(BaseVideoView baseVideoView,
EventEmitter eventEmitter,
boolean useAdRules,
com.google.ads.interactivemedia.v3.api.AdsRenderingSettings adsRenderingSettings) |
GoogleIMAComponent(BaseVideoView baseVideoView,
EventEmitter eventEmitter,
boolean useAdRules,
com.google.ads.interactivemedia.v3.api.ImaSdkSettings imaSdkSettings) |
GoogleIMAComponent(BaseVideoView baseVideoView,
EventEmitter eventEmitter,
boolean useAdRules,
com.google.ads.interactivemedia.v3.api.ImaSdkSettings imaSdkSettings,
com.google.ads.interactivemedia.v3.api.AdsRenderingSettings adsRenderingSettings) |
GoogleIMAComponent(BaseVideoView baseVideoView,
EventEmitter eventEmitter,
com.google.ads.interactivemedia.v3.api.ImaSdkSettings imaSdkSettings) |
Modifier and Type | Method and Description |
---|---|
void |
addCallback(com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer.VideoAdPlayerCallback callback) |
int |
getAdPosition() |
int |
getContentPosition() |
com.google.ads.interactivemedia.v3.api.player.VideoProgressUpdate |
getContentProgress() |
int |
getCurrentAdIndex() |
java.util.List<com.google.ads.interactivemedia.v3.api.AdsRequest> |
getCurrentAdsRequests() |
com.google.ads.interactivemedia.v3.api.ImaSdkSettings |
getImaSdkSettings() |
GoogleIMAVideoAdPlayer |
getVideoAdPlayer() |
void |
initializeAdsRequests()
Deprecated.
It's no longer necessary to call this method. The
initialization of Ad Rules happens automatically now.
|
void |
onAdError(com.google.ads.interactivemedia.v3.api.AdErrorEvent event) |
void |
onAdEvent(com.google.ads.interactivemedia.v3.api.AdEvent event) |
void |
onAdsManagerLoaded(com.google.ads.interactivemedia.v3.api.AdsManagerLoadedEvent event) |
void |
onContentPauseRequested() |
void |
onContentResumeRequested() |
void |
reloadAdsRequest()
Creates a request to reload the Ads.
|
void |
removeCallback(com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer.VideoAdPlayerCallback callback) |
void |
setAdPosition(int adPosition) |
void |
setContentPosition(int position) |
void |
skipCurrentAd() |
void |
skipCurrentAds() |
void |
useAdRules(boolean useAdRules) |
addListener, addOnceListener, getEventEmitter, removeListener, removeListeners
public static final java.lang.String ADS_REQUESTS
public static final java.lang.String AD_EVENT
public static final java.lang.String AD_TAG_URL
public static final java.lang.String ADS_MANAGER
public static final java.lang.String AD_PLAYHEAD_POSITION
public static final java.lang.String AD_WAS_PLAYING
public GoogleIMAComponent(BaseVideoView baseVideoView, EventEmitter eventEmitter)
baseVideoView
- The Brightcove video view.eventEmitter
- The current event emitter.public GoogleIMAComponent(BaseVideoView baseVideoView, EventEmitter eventEmitter, boolean useAdRules, com.google.ads.interactivemedia.v3.api.ImaSdkSettings imaSdkSettings, com.google.ads.interactivemedia.v3.api.AdsRenderingSettings adsRenderingSettings)
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.public GoogleIMAComponent(BaseVideoView baseVideoView, EventEmitter eventEmitter, boolean useAdRules, com.google.ads.interactivemedia.v3.api.ImaSdkSettings imaSdkSettings)
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.public GoogleIMAComponent(BaseVideoView baseVideoView, EventEmitter eventEmitter, boolean useAdRules, com.google.ads.interactivemedia.v3.api.AdsRenderingSettings adsRenderingSettings)
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.public GoogleIMAComponent(BaseVideoView baseVideoView, EventEmitter eventEmitter, boolean useAdRules)
baseVideoView
- The Brightcove video view.eventEmitter
- The current event emitter.useAdRules
- Whether to use Ad Rules instead of cue points.public GoogleIMAComponent(BaseVideoView baseVideoView, EventEmitter eventEmitter, com.google.ads.interactivemedia.v3.api.ImaSdkSettings imaSdkSettings)
baseVideoView
- The Brightcove video view.eventEmitter
- The current event emitter.imaSdkSettings
- Application specified settings for the IMA SDK.public int getCurrentAdIndex()
public java.util.List<com.google.ads.interactivemedia.v3.api.AdsRequest> getCurrentAdsRequests()
public GoogleIMAVideoAdPlayer getVideoAdPlayer()
@Deprecated public void initializeAdsRequests()
public int getAdPosition()
public void setAdPosition(int adPosition)
public int getContentPosition()
public void setContentPosition(int position)
public void skipCurrentAd()
public void reloadAdsRequest()
public void skipCurrentAds()
public void onAdError(com.google.ads.interactivemedia.v3.api.AdErrorEvent event)
onAdError
in interface com.google.ads.interactivemedia.v3.api.AdErrorEvent.AdErrorListener
public void addCallback(com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer.VideoAdPlayerCallback callback)
public void removeCallback(com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer.VideoAdPlayerCallback callback)
public void onAdsManagerLoaded(com.google.ads.interactivemedia.v3.api.AdsManagerLoadedEvent event)
onAdsManagerLoaded
in interface com.google.ads.interactivemedia.v3.api.AdsLoader.AdsLoadedListener
public void onAdEvent(com.google.ads.interactivemedia.v3.api.AdEvent event)
onAdEvent
in interface com.google.ads.interactivemedia.v3.api.AdEvent.AdEventListener
public void onContentPauseRequested()
public void onContentResumeRequested()
public void useAdRules(boolean useAdRules)
public com.google.ads.interactivemedia.v3.api.ImaSdkSettings getImaSdkSettings()
public com.google.ads.interactivemedia.v3.api.player.VideoProgressUpdate getContentProgress()
getContentProgress
in interface com.google.ads.interactivemedia.v3.api.player.ContentProgressProvider