Class ImaMedia3AdPlayer

java.lang.Object
com.appscend.media.events.ima.ImaMedia3AdPlayer
All Implemented Interfaces:
com.google.ads.interactivemedia.v3.api.player.AdProgressProvider, com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer, com.google.ads.interactivemedia.v3.api.player.VolumeProvider

public final class ImaMedia3AdPlayer extends Object implements com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer
IMA's VideoAdPlayer: one Media3 player per break plays its preloaded ads as a playlist keyed by AdMediaInfo, into a media-overlay SurfaceView.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer

    com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer.VideoAdPlayerCallback
  • Constructor Summary

    Constructors
    Constructor
    Description
    ImaMedia3AdPlayer(android.content.Context context, android.view.ViewGroup container, boolean secureSurface)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addCallback(com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer.VideoAdPlayerCallback callback)
     
    com.google.ads.interactivemedia.v3.api.player.VideoProgressUpdate
     
    int
     
    boolean
    True while the current ad item is started and has neither ended nor failed.
    void
    loadAd(com.google.ads.interactivemedia.v3.api.player.AdMediaInfo info, com.google.ads.interactivemedia.v3.api.AdPodInfo adPodInfo)
     
    void
    pauseAd(com.google.ads.interactivemedia.v3.api.player.AdMediaInfo info)
     
    void
    playAd(com.google.ads.interactivemedia.v3.api.player.AdMediaInfo info)
     
    void
     
    void
    removeCallback(com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer.VideoAdPlayerCallback callback)
     
    void
    stopAd(com.google.ads.interactivemedia.v3.api.player.AdMediaInfo info)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ImaMedia3AdPlayer

      public ImaMedia3AdPlayer(@NonNull android.content.Context context, @Nullable android.view.ViewGroup container, boolean secureSurface)
  • Method Details

    • loadAd

      public void loadAd(@NonNull com.google.ads.interactivemedia.v3.api.player.AdMediaInfo info, @NonNull com.google.ads.interactivemedia.v3.api.AdPodInfo adPodInfo)
      Specified by:
      loadAd in interface com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer
    • playAd

      public void playAd(@NonNull com.google.ads.interactivemedia.v3.api.player.AdMediaInfo info)
      Specified by:
      playAd in interface com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer
    • pauseAd

      public void pauseAd(@NonNull com.google.ads.interactivemedia.v3.api.player.AdMediaInfo info)
      Specified by:
      pauseAd in interface com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer
    • stopAd

      public void stopAd(@NonNull com.google.ads.interactivemedia.v3.api.player.AdMediaInfo info)
      Specified by:
      stopAd in interface com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer
    • release

      public void release()
      Specified by:
      release in interface com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer
    • addCallback

      public void addCallback(@NonNull com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer.VideoAdPlayerCallback callback)
      Specified by:
      addCallback in interface com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer
    • removeCallback

      public void removeCallback(@NonNull com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer.VideoAdPlayerCallback callback)
      Specified by:
      removeCallback in interface com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer
    • getAdProgress

      @NonNull public com.google.ads.interactivemedia.v3.api.player.VideoProgressUpdate getAdProgress()
      Specified by:
      getAdProgress in interface com.google.ads.interactivemedia.v3.api.player.AdProgressProvider
    • getVolume

      public int getVolume()
      Specified by:
      getVolume in interface com.google.ads.interactivemedia.v3.api.player.VolumeProvider
    • isPlayingAnAd

      public boolean isPlayingAnAd()
      True while the current ad item is started and has neither ended nor failed.