Class VastProperties
java.lang.Object
com.iab.omid.library.adsession.media.VastProperties
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 Summary
Modifier and TypeMethodDescriptionstatic 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.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.Gets the player position indicated by these properties.Gets the skip offset (number of seconds after which media is skippable).boolean
Indicates if these properties are for an auto-play media or not.boolean
Indicates if these properties are for skippable or non-skippable media.JSONObject
toJSON()
For OM SDK internal use only.
-
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 presentedisAutoPlay
- whether the media will auto-play contentposition
- 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 contentposition
- 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
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
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.
-