Class POBVastPlayerConfig
-
- All Implemented Interfaces:
public class POBVastPlayerConfig
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classPOBVastPlayerConfig.ConfigBuilderAn internal builder class for video config
public classPOBVastPlayerConfig.POBVastPlayerUIConfigImmutable configuration class to control visibility of video player UI controls. This allows fine-grained control over which player controls are shown or hidden for different ad placement types (e.g., Native Ads).
Use Builder to create instances of this class.
Example:
POBVastPlayerUIConfig config = new POBVastPlayerUIConfig.Builder() .showProgressBar(false) .showMuteButton(true) .setMuteButtonLayout(R.layout.pob_video_mute_button_compact) .build();
-
Field Summary
Fields Modifier and Type Field Description public intminDurationpublic intmaxDurationpublic intskippublic intskipMinpublic intskipAfterpublic intwrapperUriTimeoutpublic intmediaUriTimeoutpublic final intendCardSkipAfter
-
Method Summary
Modifier and Type Method Description intgetMinDuration()Minimum video ad duration in seconds intgetMaxDuration()Maximum video ad duration in seconds intgetSkip()Indicates if the player will allow the video to be skipped, where 0 = no, 1 = yes intgetSkipMin()Videos of total duration greater than this number of seconds can be skippable; only applicable if the ad is skippable. intgetSkipAfter()Number of seconds a video must play before skipping is enabled; only applicable if the ad is skippable. intgetWrapperUriTimeout()Wrapper Uri request timeout intgetMediaUriTimeout()Media Uri loading timeout intgetEndCardSkipAfter()Number of seconds a end card must be shown before skipping is enabled. booleanisPlayOnMute()Returns the player behavior to play video creative with sound On/Off. booleanisBackButtonEnabled()Returns if hardware back button should be enabled or not booleanisSkipAfterCompletionEnabled()Return true if default skip is after completion. booleanshouldShowEndCardNavigationControl()Helps to decide whether to show controller button on end card. booleanisCtaOverlayEnabled()Returns whether CTA overlay is enabled (from bid or VAST creative). voidsetVastPlayerUIConfig(@Nullable() POBVastPlayerConfig.POBVastPlayerUIConfig config)Sets the player controls visibility configuration. POBVastPlayerConfig.POBVastPlayerUIConfiggetVastPlayerUIConfig()Gets the player controls visibility configuration. -
-
Method Detail
-
getMinDuration
int getMinDuration()
Minimum video ad duration in seconds
- Returns:
minDuration in seconds
-
getMaxDuration
int getMaxDuration()
Maximum video ad duration in seconds
- Returns:
maxDuration in seconds
-
getSkip
int getSkip()
Indicates if the player will allow the video to be skipped, where 0 = no, 1 = yes
- Returns:
skipValue either 0 or 1
-
getSkipMin
int getSkipMin()
Videos of total duration greater than this number of seconds can be skippable; only applicable if the ad is skippable.
- Returns:
skipMin in seconds
-
getSkipAfter
int getSkipAfter()
Number of seconds a video must play before skipping is enabled; only applicable if the ad is skippable.
- Returns:
skipAfter in seconds
-
getWrapperUriTimeout
int getWrapperUriTimeout()
Wrapper Uri request timeout
- Returns:
the wrapperUriTimeout in millisecond's
-
getMediaUriTimeout
int getMediaUriTimeout()
Media Uri loading timeout
- Returns:
the mediaUriTimeout in millisecond's
-
getEndCardSkipAfter
int getEndCardSkipAfter()
Number of seconds a end card must be shown before skipping is enabled.
- Returns:
skipAfter in seconds
-
isPlayOnMute
boolean isPlayOnMute()
Returns the player behavior to play video creative with sound On/Off.
- Returns:
player state. true indicates video should be layed with sound OFF else ON.
-
isBackButtonEnabled
boolean isBackButtonEnabled()
Returns if hardware back button should be enabled or not
- Returns:
back button state. true indicates button should be enabled, false by default
-
isSkipAfterCompletionEnabled
boolean isSkipAfterCompletionEnabled()
Return true if default skip is after completion.
- Returns:
skipAfterCompletion state, true means default skip is after completion, false by default.
-
shouldShowEndCardNavigationControl
boolean shouldShowEndCardNavigationControl()
Helps to decide whether to show controller button on end card. Note: Default value is true.
- Returns:
showControlButtonOnEndCard state.
-
isCtaOverlayEnabled
boolean isCtaOverlayEnabled()
Returns whether CTA overlay is enabled (from bid or VAST creative). When false, CTA overlay will not be shown (e.g. for native ad type).
- Returns:
true if CTA overlay is enabled, false otherwise
-
setVastPlayerUIConfig
void setVastPlayerUIConfig(@Nullable() POBVastPlayerConfig.POBVastPlayerUIConfig config)
Sets the player controls visibility configuration.
- Parameters:
config- PlayerControlsVisibilityConfig instance to control visibility of video player UI controls
-
getVastPlayerUIConfig
@Nullable() POBVastPlayerConfig.POBVastPlayerUIConfig getVastPlayerUIConfig()
Gets the player controls visibility configuration.
- Returns:
PlayerControlsVisibilityConfig instance if set, null otherwise
-
-
-
-