Class POBVastPlayerConfig.ConfigBuilder

    • Constructor Detail

      • POBVastPlayerConfig.ConfigBuilder

        POBVastPlayerConfig.ConfigBuilder(int minDuration, int maxDuration)
        Builder class constructor with recommended params
        Parameters:
        minDuration - Minimum video ad duration in seconds
        maxDuration - Maximum video ad duration in seconds
    • Method Detail

      • createVastConfig

        @NonNull() static POBVastPlayerConfig createVastConfig(@Nullable() JSONObject rawBid, @NonNull() POBAdType adType)

        Builds the VastPlayer config from raw bid Json response or returns default VastPlayer config. The configuration is determined based on the ad type (rewarded, fullscreen, app open, etc.).

        Parameters:
        rawBid - the raw bid JSON object containing video configuration parameters
        adType - the ad type used to determine video player behavior including skip settings, mute state, and fullscreen properties
        Returns:

        configured POBVastPlayerConfig based on the video parameters from bid response, or default VastPlayerConfig if video config is not present in the bid

      • skipAfter

         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. Default value is 16

        Parameters:
        skipAfter - the skipAfter value in int
        Returns:

        ConfigBuilder for POBVastPlayerConfig

      • setSkipAfterCompletionEnabled

         POBVastPlayerConfig.ConfigBuilder setSkipAfterCompletionEnabled(boolean isSkipAfterCompletion)

        Optional setter to set skipAfterCompletion state. Indicate default skip is after completion

        Parameters:
        isSkipAfterCompletion - boolean value of state, false by default.
        Returns:

        ConfigBuilder for POBVastPlayerConfig

      • skipMin

         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. Default value is 0

        Parameters:
        skipMin - the skipMin value in int
        Returns:

        ConfigBuilder for POBVastPlayerConfig

      • skip

         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

        Parameters:
        skip - the skipable value 0 = no, 1 = yes
        Returns:

        ConfigBuilder for POBVastPlayerConfig

      • wrapperUriTimeout

         POBVastPlayerConfig.ConfigBuilder wrapperUriTimeout(int wrapperTagUriTimeout)

        Optional setter to set wrapper Uri timeout

        Parameters:
        wrapperTagUriTimeout - the wrapperUriTimeout in millisecond's
        Returns:

        configBuilder for POBVastPlayerConfig

      • mediaUriTimeout

         POBVastPlayerConfig.ConfigBuilder mediaUriTimeout(int mediaFileUriTimeout)

        Optional setter to set media file Uri timeout

        Parameters:
        mediaFileUriTimeout - the mediaUriTimeout in millisecond's
        Returns:

        configBuilder for POBVastPlayerConfig

      • build

         POBVastPlayerConfig build(boolean isSkipabilityEnabled)

        Build POBVastPlayerConfig with provided params

        Parameters:
        isSkipabilityEnabled - State of skip behavior
        Returns:

        instance of POBVastPlayerConfig

      • endCardSkipAfter

         POBVastPlayerConfig.ConfigBuilder endCardSkipAfter(int skipAfter)

        Optional setter to set Skip after for end card. Number of seconds a end card must be shown before skipping is enabled; only applicable if the ad is skippable. Default value is 5 minutes.

        Parameters:
        skipAfter - the skipAfter value in minutes
        Returns:

        ConfigBuilder for POBVastPlayerConfig

      • showEndCardNavigationControl

         POBVastPlayerConfig.ConfigBuilder showEndCardNavigationControl(boolean showEndCardNavigationControl)

        Method to set the set the showControlButtonOnEndCard value. This property helps to decides whether to show the control button on end card.

        Parameters:
        showEndCardNavigationControl - boolean value.
        Returns:

        ConfigBuilder for POBVastPlayerConfig

      • setCtaOverlayEnabled

         POBVastPlayerConfig.ConfigBuilder setCtaOverlayEnabled(boolean enabled)

        Enables or disables CTA overlay (from bid or VAST creative). When false, CTA overlay will not be shown (e.g. for native ad type).

        Parameters:
        enabled - true to allow CTA overlay, false to disable it
        Returns:

        this builder for chaining