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, boolean isSkipabilityEnabled, boolean skipAfterCompletion, boolean playOnMute, @NonNull() String placementType)

        Builds the VastPlayer config from raw bid Json response or returns default VastPlayer config

        Parameters:
        rawBid - the raw bid of JSONObject type
        isSkipabilityEnabled - State of skip behavior
        skipAfterCompletion - Parameter to indicate default skip is after completion
        playOnMute - Sound on/off value by default
        Returns:

        if Video is present and not empty in bid then method returns new VastPlayerConfig object else returns default VastPlayer config

      • 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