Method | Description | Parameter | Return Value |
|---|---|---|---|
load() | Loads an ad. | - | - |
setRequestConfig(object) | Sets ad request parameters. | - | |
onLoad(callback) | Called when an ad is loaded successfully. | callback: callback for ad loading success. | - |
isLoading() | Checks whether an ad is being loaded. | - |
|
isLoaded() | Checks whether an ad has been loaded. | - |
|
offLoad(); | Removes the listener for ad loading success. | - | - |
show(object) | Shows an interstitial ad after it is successfully loaded. | - | |
onShow(callback) | Called when an ad is successfully displayed. | callback: callback for successful ad display. | - |
offShow() | Removes the listener for ad display. | - | - |
onClose(callback) | Called when an ad is closed. | callback: callback for ad closure. | - |
offClose() | Removes the listener for ad closure. | - | - |
onError(callback) | Called when an ad fails to be loaded. | callback: callback for ad loading failure, which carries the error code. Parameter in callback: errorcode | - |
offError() | Removes the listener for an ad loading failure. | - | - |
destroy() | Destroys an ad component. | - | - |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
customData | No | String | Custom data. |
userId | No | String | User ID. |
muted | No | Boolean | Indicates whether to mute a video. |
interstitialDataAlerts | No | Boolean | Indicates whether to send a reminder when mobile data is used. |