public static class POBVastPlayerConfig.ConfigBuilder
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MEDIA_URI_TIMEOUT |
static boolean |
DEFAULT_PLAY_ON_MUTE |
static int |
DEFAULT_SKIP |
static int |
DEFAULT_SKIP_AFTER |
static int |
DEFAULT_WRAPPER_URI_TIMEOUT |
| Constructor and Description |
|---|
ConfigBuilder(int minDuration,
int maxDuration)
Builder class constructor with recommended params
|
| Modifier and Type | Method and Description |
|---|---|
POBVastPlayerConfig |
build(boolean isSkipabilityEnabled)
Build POBVastPlayerConfig with provided params
|
static POBVastPlayerConfig |
createVastConfig(org.json.JSONObject rawBid,
boolean isSkipabilityEnabled,
boolean skipAfterCompletion,
boolean playOnMute,
java.lang.String placementType)
Builds the VastPlayer config from raw bid Json response or returns default VastPlayer config
|
POBVastPlayerConfig.ConfigBuilder |
mediaUriTimeout(int mediaFileUriTimeout)
Optional setter to set media file Uri timeout
|
POBVastPlayerConfig.ConfigBuilder |
setPlayOnMute(boolean playOnMute)
Setter method to play media with sound On/Off.
|
POBVastPlayerConfig.ConfigBuilder |
skip(int skip)
Value indicates if the ad is skippable ('skip' = 1)
Setter which indicates if the player will allow the video to be skipped,
where 0 = no, 1 = yes
|
POBVastPlayerConfig.ConfigBuilder |
skipAfter(int skipAfter)
Optional setter to set Skip after config
Number of seconds a video must play before skipping is
enabled; only applicable if the ad is skippable.
|
POBVastPlayerConfig.ConfigBuilder |
skipMin(int skipMin)
Optional setter to set Skip min config
Videos of total duration greater than this number of seconds
can be skippable; only applicable if the ad is skippable.
|
POBVastPlayerConfig.ConfigBuilder |
wrapperUriTimeout(int wrapperTagUriTimeout)
Optional setter to set wrapper Uri timeout
|
public static final int DEFAULT_WRAPPER_URI_TIMEOUT
public static final int DEFAULT_MEDIA_URI_TIMEOUT
public static final int DEFAULT_SKIP_AFTER
public static final int DEFAULT_SKIP
public static final boolean DEFAULT_PLAY_ON_MUTE
public ConfigBuilder(int minDuration,
int maxDuration)
minDuration - Minimum video ad duration in secondsmaxDuration - Maximum video ad duration in seconds@NonNull public static POBVastPlayerConfig createVastConfig(@Nullable org.json.JSONObject rawBid, boolean isSkipabilityEnabled, boolean skipAfterCompletion, boolean playOnMute, @NonNull java.lang.String placementType)
rawBid - the raw bid of JSONObject typeisSkipabilityEnabled - State of skip behaviorskipAfterCompletion - Parameter to indicate default skip is after completionplayOnMute - Sound on/off value by defaultpublic POBVastPlayerConfig.ConfigBuilder skipAfter(int skipAfter)
skipAfter - the skipAfter value in intpublic POBVastPlayerConfig.ConfigBuilder skipMin(int skipMin)
skipMin - the skipMin value in intpublic POBVastPlayerConfig.ConfigBuilder skip(int skip)
skip - the skipable value 0 = no, 1 = yespublic POBVastPlayerConfig.ConfigBuilder setPlayOnMute(boolean playOnMute)
playOnMute - should play on mutepublic POBVastPlayerConfig.ConfigBuilder wrapperUriTimeout(int wrapperTagUriTimeout)
wrapperTagUriTimeout - the wrapperUriTimeout in millisecond'spublic POBVastPlayerConfig.ConfigBuilder mediaUriTimeout(int mediaFileUriTimeout)
mediaFileUriTimeout - the mediaUriTimeout in millisecond'spublic POBVastPlayerConfig build(boolean isSkipabilityEnabled)
isSkipabilityEnabled - State of skip behavior