sud.createRewardedVideoAd
Creates a rewarded video ad component. Rewarded video ads are typically used in user-initiated reward scenarios, such as an extra life, revival, or obtaining additional items.
typescript
createRewardedVideoAd(params: {
adUnitId: string;
/** Whether to enable multiton mode (reserved parameter, not yet in effect) */
multiton?: boolean;
/** Whether to disable the fallback share page (reserved parameter, not yet in effect) */
disableFallbackSharePage?: boolean;
}): RewardedVideoAd;load() is rate-limited (currently triggered by repeated requests within 10 seconds). When the limit is hit, onError returns the error code (errCode) and message (errMsg).
Parameters
Object object
| Property | Type | Default | Required | Description |
|---|---|---|---|---|
| adUnitId | string | Yes | Ad unit ID configured in the SUD OpenPaaS console | |
| multiton | boolean | true | No | Whether to enable multiton mode (reserved parameter, not yet in effect) |
| disableFallbackSharePage | boolean | false | No | Whether to disable the fallback share page (reserved parameter, not yet in effect) |
Return Value
Rewarded video ad component.
Example Code
javascript
const rewardedVideoAd = sud.createRewardedVideoAd({
adUnitId: 'adunit-xxxxxxxx',
// Reserved parameters, not yet in effect
multiton: true,
disableFallbackSharePage: false,
});