@videts/vide / vast / playWaterfall
Function: playWaterfall()
playWaterfall(
player,ads,options):Promise<SingleAdResult|null>
Defined in: vast/pod.ts:150
Try ads in waterfall order. Play the first one that loads successfully. Returns the result of the first successful ad, or null if all fail.
Parameters
| Parameter | Type | Description |
|---|---|---|
player | PluginPlayer | - |
ads | PlayableAd[] | - |
options | { adPlugins?: (ad) => AdPlugin[]; onFinish?: (result) => void; source: "vast" | "vmap"; } | - |
options.adPlugins? | (ad) => AdPlugin[] | - |
options.onFinish? | (result) => void | Called synchronously when the winning ad finishes (or last failure). |
options.source | "vast" | "vmap" | - |
Returns
Promise<SingleAdResult | null>