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 void
addListener(AdPlayer.Listener<com.ooyala.pulse.PulseVideoAd> listener)
Adds aAdPlayer.Listener
.static PulseAdPlayer
createWithExoplayer(BaseVideoView baseVideoView, com.ooyala.pulse.PulseAdBreak pulseAdBreak, AdPlayer.Listener<com.ooyala.pulse.PulseVideoAd> listener, com.brightcove.pulse.PulseAdPlayer.PulseOnClickListener pulseOnClickListener)
Creates aPulseAdPlayer
using anExoAdPlayer
to delegate playback commands.void
loadAd(com.ooyala.pulse.PulseVideoAd pulseVideoAd)
Loads an ad of type T.void
pauseAd()
Pauses an ad.void
playAd()
Plays an ad.void
release()
Releases theAdPlayer
.void
removeListener(AdPlayer.Listener<com.ooyala.pulse.PulseVideoAd> listener)
Removes aAdPlayer.Listener
.void
seekTo(long position)
Seeks to the specified position.void
skipAd()
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 aPulseAdPlayer
using anExoAdPlayer
to 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:AdPlayer
Adds aAdPlayer.Listener
.- Specified by:
addListener
in 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:AdPlayer
Removes aAdPlayer.Listener
.- Specified by:
removeListener
in 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:AdPlayer
Loads an ad of type T.
-
playAd
public void playAd()
Description copied from interface:AdPlayer
Plays an ad.
-
pauseAd
public void pauseAd()
Description copied from interface:AdPlayer
Pauses an ad.
-
seekTo
public void seekTo(long position)
Description copied from interface:AdPlayer
Seeks to the specified position.
-
-