Package com.brightcove.pulse
Class PulseAdPlayer
java.lang.Object
com.brightcove.pulse.PulseAdPlayer
- All Implemented Interfaces:
AdPlayer<com.ooyala.pulse.PulseVideoAd>
Represents an
AdPlayer
capable of handling a PulseVideoAd.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.brightcove.player.ads.AdPlayer
AdPlayer.AdPlayerSettings, AdPlayer.Listener<T>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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 Details
-
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
Description copied from interface:AdPlayer
Adds aAdPlayer.Listener
.- Specified by:
addListener
in interfaceAdPlayer<com.ooyala.pulse.PulseVideoAd>
- Parameters:
listener
- listener to be added.
-
removeListener
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. -
release
public void release()Description copied from interface:AdPlayer
Releases theAdPlayer
. -
skipAd
public void skipAd()Description copied from interface:AdPlayer
Skips the current ad.
-