kidoz.load()

Type Function
Return value none
Revision Release 2022.3683
Keywords ads, advertising, KIDOZ, load
See also kidoz.show()
kidoz.*

Overview

Preloads a KIDOZ ad. Once loaded, You can call kidoz.show() to show it.

Before calling this function, you must call kidoz.init() and wait for the "init" event phase.

Syntax

kidoz.load( adType, options )
adType (required)

String. The ad type to load — see the following sections for details.

options (required)

Table. Options for the ad type — see the following sections for details.

Panel View

This is a special customized view which can slide in/out of the screen (both in horizontal and vertical layout) with minimal interference to the user experience. For this ad type, adType should be "panelView" and the options table accepts these key-value pairs:

adPosition (required)

String. The position of the panel. Valid values include "top" and "bottom". Default is "bottom".

handlePosition (optional)

String. The position of the handle. Valid values are "left", "right", "center", or "none". Default is "center". If handlePosition is set to "none", the user will not have a UI-based handle to slide the view in and out.

Interstitial

This is a full-screen single ad unit. For this ad type, adType should be "interstitial" and the options table should be omitted.

Rewarded Video

This is a full-screen single ad unit. For this ad type, adType should be "rewardedVideo" and the options table should be omitted.

Examples

Panel View
kidoz.load( "panelView",
    {
        adPosition = "bottom",
        handlePosition = "left"
    }
)
Interstitial
kidoz.load( "interstitial" )
Rewarded Video
kidoz.load( "rewardedVideo" )