Package com.brightcove.pulse
Class PulseAdPlayer
- java.lang.Object
-
- com.brightcove.pulse.PulseAdPlayer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.brightcove.player.ads.AdPlayer
AdPlayer.AdPlayerSettings, AdPlayer.Listener<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(AdPlayer.Listener<com.ooyala.pulse.PulseVideoAd> listener)Adds aAdPlayer.Listener.static PulseAdPlayercreateWithExoplayer(BaseVideoView baseVideoView, com.ooyala.pulse.PulseAdBreak pulseAdBreak, AdPlayer.Listener<com.ooyala.pulse.PulseVideoAd> listener, com.brightcove.pulse.PulseAdPlayer.PulseOnClickListener pulseOnClickListener)Creates aPulseAdPlayerusing anExoAdPlayerto delegate playback commands.voidloadAd(com.ooyala.pulse.PulseVideoAd pulseVideoAd)Loads an ad of type T.voidpauseAd()Pauses an ad.voidplayAd()Plays an ad.voidrelease()Releases theAdPlayer.voidremoveListener(AdPlayer.Listener<com.ooyala.pulse.PulseVideoAd> listener)Removes aAdPlayer.Listener.voidseekTo(long position)Seeks to the specified position.voidskipAd()Skips the current ad.
-
-
-
Method Detail
-
createWithExoplayer
@NonNull public static PulseAdPlayer createWithExoplayer(@NonNull BaseVideoView baseVideoView, @NonNull com.ooyala.pulse.PulseAdBreak pulseAdBreak, @NonNull AdPlayer.Listener<com.ooyala.pulse.PulseVideoAd> listener, @NonNull com.brightcove.pulse.PulseAdPlayer.PulseOnClickListener pulseOnClickListener)
Creates aPulseAdPlayerusing anExoAdPlayerto delegate playback commands.- Parameters:
baseVideoView- the video view where the content video is displayed.pulseAdBreak- the current pulse ad break.listener- a listener to receive playback events.pulseOnClickListener- the listener to receive UI/click events.- Returns:
- a new instance of a
PulseAdPlayer.
-
addListener
public void addListener(@NonNull AdPlayer.Listener<com.ooyala.pulse.PulseVideoAd> listener)Description copied from interface:AdPlayerAdds aAdPlayer.Listener.- Specified by:
addListenerin interfaceAdPlayer<com.ooyala.pulse.PulseVideoAd>- Parameters:
listener- listener to be added.
-
removeListener
public void removeListener(@NonNull AdPlayer.Listener<com.ooyala.pulse.PulseVideoAd> listener)Description copied from interface:AdPlayerRemoves aAdPlayer.Listener.- Specified by:
removeListenerin interfaceAdPlayer<com.ooyala.pulse.PulseVideoAd>- Parameters:
listener- listener to be removed.
-
loadAd
public void loadAd(@NonNull com.ooyala.pulse.PulseVideoAd pulseVideoAd)Description copied from interface:AdPlayerLoads an ad of type T.
-
playAd
public void playAd()
Description copied from interface:AdPlayerPlays an ad.
-
pauseAd
public void pauseAd()
Description copied from interface:AdPlayerPauses an ad.
-
seekTo
public void seekTo(long position)
Description copied from interface:AdPlayerSeeks to the specified position.
-
-