BaseInStreamAdManager

abstract class BaseInStreamAdManager(    context: Context,     adParamArg: AdParam,     adVideoPlayer: AdVideoPlayer,     adContainer: FrameLayout?,     linearAdType: LinearAdType = LinearAdType.PRE_ROLL,     playTimeOffsetMillis: Long = 0) : GfpVideoAd

Base class for managing in-stream video ads. Handles the lifecycle and events of video ads, including loading, playing, and tracking.

Constructors

Link copied to clipboard
constructor(    context: Context,     adParamArg: AdParam,     adVideoPlayer: AdVideoPlayer,     adContainer: FrameLayout?,     linearAdType: LinearAdType = LinearAdType.PRE_ROLL,     playTimeOffsetMillis: Long = 0)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
fun interface OnStartListener

Interface for handling ad start events.

Properties

Link copied to clipboard

Timeout duration for ad operations in milliseconds

Functions

Link copied to clipboard
fun adClicked()

Called when the video ad is clicked.

Link copied to clipboard

Called when video ad playback completes.

Link copied to clipboard
fun adError(error: GfpError)

Called when an error occurs after video ad is loaded.

Link copied to clipboard
fun adPaused()

Called when video ad playback is paused.

Link copied to clipboard
fun adResumed()

Called when video ad playback is resumed.

Link copied to clipboard
fun adSkipped()

Called when video ad is skipped.

Link copied to clipboard
fun adStarted()

Called when video ad playback starts.

Link copied to clipboard
fun changedState(stateLog: StateLogCreator.StateLog?)

Called when state changes occur.

Link copied to clipboard
open override fun clickVideoAd()

Clicks on the button

Link copied to clipboard
fun destroy()

Destroys the ad manager and releases all resources.

Link copied to clipboard

Called when video ad fails to load.

Link copied to clipboard
fun failedToLog(url: String?, errorMessage: String?)

Called when event logging fails.

Link copied to clipboard
open override fun getAdParam(): AdParam

Returns a AdParam used to request advertising

Link copied to clipboard
open override fun getAdProviderName(): String?

Returns the ad provider's name for the loaded ad. Returns null until the ad successfully loads.

Link copied to clipboard
open override fun getAdQoeInfo(): GfpVideoAdQoeInfo?

Returns the quality of experience.

Link copied to clipboard
open override fun getLoudnessInfo(): String?

Returns the loudness information

Link copied to clipboard
abstract fun getMutableParam(): VideoAdMutableParam

Gets the mutable parameters for video ad. Must be implemented by subclasses.

Link copied to clipboard
open override fun getNonLinearAdInfo(): NonLinearAdInfo?

Returns the information of the non linear ad.

Link copied to clipboard
open override fun getNoticeDurationMillis(): Long

Return the reminder phrase time offset of the mid term ad

Link copied to clipboard
open override fun getResponseInfo(): GfpResponseInfo?

Returns the GfpResponseInfo object for the loaded ad. Returns null until the ad successfully loads.

Link copied to clipboard
open override fun getTimeOffsetMillis(): Long

Returns the current time of linear video ad in milliseconds

Link copied to clipboard

Gets the current video ad options. Creates default options if none are set.

Link copied to clipboard
open override fun getVideoMediaInfo(): VideoMediaInfo?

Returns the media information of the linear ad.

Link copied to clipboard
open override fun hideOverlayUi()

Hides the overlay ui of the video ad.

Link copied to clipboard
open fun loadAd()

Loads a instream video ad.

Link copied to clipboard
open override fun pause()

Pauses the video ad.

Link copied to clipboard
open override fun resume()

Resumes the video ad.

Link copied to clipboard
fun setAdContainer(adContainer: FrameLayout?)

Changes the ad container (e.g., PIP, END, AUDIO).

Link copied to clipboard

Sets the video ad listener.

Link copied to clipboard
fun setEventUrlLogListener(eventUrlLogListener: EventUrlLogListener?)

Sets the event URL log listener.

Link copied to clipboard
abstract fun setGfpVideoProperties(gfpVideoProperties: <Error class: unknown class>?)

Sets the video properties. Must be implemented by subclasses.

Link copied to clipboard
fun setNoticeDurationMillis(noticeDurationMillis: Long)

Sets the duration for notice display.

Link copied to clipboard

Sets the start listener.

Link copied to clipboard

Sets the QoE listener for video ad events.

Link copied to clipboard
fun setStateLogListener(stateLogListener: StateLogListener?)

Sets the state log listener.

Link copied to clipboard
fun setVideoAdOptions(videoAdOptions: GfpVideoAdOptions?)

Sets the video ad rendering options.

Link copied to clipboard
open override fun showNonLinearAd(containerType: GfpNonLinearAdView.ContainerType?)

Shows the non linear ad.

Link copied to clipboard
open override fun showOverlayUi()

Shows the overlay ui of the video ad.

Link copied to clipboard
open override fun skip()

Skips the video ad.

Link copied to clipboard
open override fun start(enabled: Boolean)

Starts playing the video ad.

Link copied to clipboard

Called when video ad is successfully loaded.

Link copied to clipboard
fun successToLog(url: String?)

Called when event logging is successful.