Class VastProperties

java.lang.Object
com.iab.omid.library.adsession.media.VastProperties

public final class VastProperties extends Object
This object is used to capture key VAST properties so this can be shared with all registered verification providers.

Created by Natasha Garner on 09/09/2017.

  • Method Details

    • createVastPropertiesForSkippableMedia

      public static VastProperties createVastPropertiesForSkippableMedia(float skipOffset, boolean isAutoPlay, Position position)
      This method enables the media player to create a new VAST properties instance for skippable media ad placement.
      Parameters:
      skipOffset - number of seconds before the skip button is presented
      isAutoPlay - whether the media will auto-play content
      position - of the media in relation to other content
      Returns:
      new instance of VAST properties
      Throws:
      IllegalArgumentException - if the supplied Position is null.
    • createVastPropertiesForNonSkippableMedia

      public static VastProperties createVastPropertiesForNonSkippableMedia(boolean isAutoPlay, Position position)
      This method enables the media player to create a new VAST properties instance for non-skippable media ad placement.
      Parameters:
      isAutoPlay - whether the media will auto-play content
      position - of the media in relation to other content
      Returns:
      new instance of VAST properties
      Throws:
      IllegalArgumentException - if the supplied Position is null.
    • isSkippable

      public boolean isSkippable()
      Indicates if these properties are for skippable or non-skippable media.
      Returns:
      whether media is skippable or non-skippable
    • getSkipOffset

      public Float getSkipOffset()
      Gets the skip offset (number of seconds after which media is skippable).
      Returns:
      number of seconds before the skip button is presented
    • isAutoPlay

      public boolean isAutoPlay()
      Indicates if these properties are for an auto-play media or not.
      Returns:
      whether the media will auto-play content
    • getPosition

      public Position getPosition()
      Gets the player position indicated by these properties.
      Returns:
      position of the media in relation to other content
    • toJSON

      public JSONObject toJSON()
      For OM SDK internal use only.