Skip to content

VAST Layer

The VAST layer lets you display video advertisements inside your Ease Live scenes using the IAB VAST standard (Video Ad Serving Template). Point it at any VAST-compliant ad tag URL, and it will fetch, parse, and play the ad — while automatically firing all required IAB tracking events on your behalf.

You can use the VAST layer like any other layer: position it, animate it, show or hide it based on triggers, and wire up actions to control playback.


Adding a VAST layer

  1. In Studio, open a scene and click the + button in the layer panel.
  2. Choose VAST from the layer type list.
  3. Resize and position the layer on the canvas.
  4. Enter your ad tag URL in the URL field in the inspector.

Layer settings

These settings are available in the layer inspector when a VAST layer is selected.

SettingTypeDefaultDescription
URLString(empty)The VAST ad tag URL to fetch the ad from.
AutoplayBooleantrueWhen enabled, the ad starts playing as soon as the scene becomes visible. Disable this if you want to trigger playback manually using the vastPlay action.
MuteBooleanfalseMutes the audio of the ad video. Useful for silent autoplay contexts.
Mute streamBooleanfalseMutes the main video player before the ad starts, then restores it when the ad ends. Use this on platforms where the main player competes with the ad audio.

Multiple ads: If the VAST response contains a sequence of ads (an ad pod), the layer will play them one after another automatically. Each ad fires the relevant triggers independently.


Actions

Use these actions to control VAST playback from triggers or logic in your scene.

ActionDescriptionParameters
vastPlayStarts or resumes playback.Target layer (required)
vastPausePauses playback.Target layer (required)
vastMuteMutes or unmutes the ad audio.Target layer (required), muted: true / false
vastSetVolumeSets the playback volume.Target layer (required), volume: 0100
vastSkipSkips the current ad and loads the next one (if available). Only effective once the skip delay has elapsed.Target layer (required)

Triggers

The VAST layer fires the following triggers, which you can use to drive logic, animations, or other actions in your scene.

Ad lifecycle

TriggerWhen it firesProperties
vastAdReadyThe ad has loaded and is ready to play.currentAdNumber (number) — position of this ad in the sequence. totalAds (number) — total number of ads in the sequence. skippable (boolean) — whether this ad can be skipped. skipDelay (number) — seconds before the skip button becomes active.
vastAdCompletedThe ad has finished playing.
vastErrorAn error occurred. See Error reporting for details.error (object) — error details.

Video playback

TriggerWhen it firesProperties
videoPlayingThe video starts or resumes playing.
videoPausedThe video is paused.
videoEndedThe video reaches the end.
videoBufferingThe video is waiting for data to load.
videoProgressFires repeatedly as the video plays.elapsed (number) — current playback position in seconds. duration (number) — total video duration in seconds.

Standard layer triggers

The VAST layer also supports the standard triggers available on all layers:

click, show, hide, resize, pointerEnter, pointerExit, pointerPress, pointerRelease


Error reporting

When something goes wrong, the VAST layer fires a vastError trigger. The trigger carries an error object with a type field you can inspect to understand what happened.

error.typeWhat it means
no-urlNo VAST URL was configured on the layer.
vast-errorThe VAST response could not be fetched or parsed. This can be caused by network issues, a malformed VAST response, or CORS restrictions.
no-adThe VAST response was valid but contained no ads.
no-creativeAn ad was found but it has no usable creative (no linear video).
no-media-fileThe creative has no compatible media file. The layer supports MP4 and WebM.
errorThe HTML5 video element itself reported an error during playback.

When a playback error occurs (types error, no-creative, no-media-file), the layer automatically advances to the next ad in the sequence if one is available.

Example use: Wire vastError to display a fallback image or hide the VAST layer entirely when an ad fails to load.


IAB VAST tracking

All standard IAB VAST tracking events are fired automatically — you do not need to configure anything. The following events are tracked:

EventWhen
ImpressionWhen the video is ready to play (canplay).
creativeViewTogether with the impression.
startAt the beginning of playback.
firstQuartileAt 25% of the video duration.
midpointAt 50% of the video duration.
thirdQuartileAt 75% of the video duration.
completeWhen the video finishes playing.
pause / resumeWhen the video is paused or resumed.
mute / unmuteWhen the mute state changes.
skipWhen the ad is skipped via the vastSkip action.
clickWhen the viewer clicks the ad. Opens the clickthrough URL in a new tab.
errorWhen a playback error occurs. Sends the appropriate VAST error code.

Tracking requests are made by the @dailymotion/vast-client library against the tracking URLs declared in the VAST response. No additional setup is required.