Class PulseAdPlayer

java.lang.Object
com.brightcove.pulse.PulseAdPlayer
All Implemented Interfaces:
AdPlayer<com.ooyala.pulse.PulseVideoAd>

public final class PulseAdPlayer extends Object implements AdPlayer<com.ooyala.pulse.PulseVideoAd>
Represents an AdPlayer capable of handling a PulseVideoAd.
  • 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 a PulseAdPlayer using an ExoAdPlayer 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
      Specified by:
      addListener in interface AdPlayer<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
      Specified by:
      removeListener in interface AdPlayer<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.
      Specified by:
      loadAd in interface AdPlayer<com.ooyala.pulse.PulseVideoAd>
      Parameters:
      pulseVideoAd - ad to be loaded.
    • playAd

      public void playAd()
      Description copied from interface: AdPlayer
      Plays an ad.
      Specified by:
      playAd in interface AdPlayer<com.ooyala.pulse.PulseVideoAd>
    • pauseAd

      public void pauseAd()
      Description copied from interface: AdPlayer
      Pauses an ad.
      Specified by:
      pauseAd in interface AdPlayer<com.ooyala.pulse.PulseVideoAd>
    • seekTo

      public void seekTo(long position)
      Description copied from interface: AdPlayer
      Seeks to the specified position.
      Specified by:
      seekTo in interface AdPlayer<com.ooyala.pulse.PulseVideoAd>
    • release

      public void release()
      Description copied from interface: AdPlayer
      Releases the AdPlayer.
      Specified by:
      release in interface AdPlayer<com.ooyala.pulse.PulseVideoAd>
    • skipAd

      public void skipAd()
      Description copied from interface: AdPlayer
      Skips the current ad.
      Specified by:
      skipAd in interface AdPlayer<com.ooyala.pulse.PulseVideoAd>