Appearance
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
- In Studio, open a scene and click the + button in the layer panel.
- Choose VAST from the layer type list.
- Resize and position the layer on the canvas.
- 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.
| Setting | Type | Default | Description |
|---|---|---|---|
| URL | String | (empty) | The VAST ad tag URL to fetch the ad from. |
| Autoplay | Boolean | true | When 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. |
| Mute | Boolean | false | Mutes the audio of the ad video. Useful for silent autoplay contexts. |
| Mute stream | Boolean | false | Mutes 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.
| Action | Description | Parameters |
|---|---|---|
| vastPlay | Starts or resumes playback. | Target layer (required) |
| vastPause | Pauses playback. | Target layer (required) |
| vastMute | Mutes or unmutes the ad audio. | Target layer (required), muted: true / false |
| vastSetVolume | Sets the playback volume. | Target layer (required), volume: 0 – 100 |
| vastSkip | Skips 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
| Trigger | When it fires | Properties |
|---|---|---|
| vastAdReady | The 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. |
| vastAdCompleted | The ad has finished playing. | — |
| vastError | An error occurred. See Error reporting for details. | error (object) — error details. |
Video playback
| Trigger | When it fires | Properties |
|---|---|---|
| videoPlaying | The video starts or resumes playing. | — |
| videoPaused | The video is paused. | — |
| videoEnded | The video reaches the end. | — |
| videoBuffering | The video is waiting for data to load. | — |
| videoProgress | Fires 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.type | What it means |
|---|---|
no-url | No VAST URL was configured on the layer. |
vast-error | The VAST response could not be fetched or parsed. This can be caused by network issues, a malformed VAST response, or CORS restrictions. |
no-ad | The VAST response was valid but contained no ads. |
no-creative | An ad was found but it has no usable creative (no linear video). |
no-media-file | The creative has no compatible media file. The layer supports MP4 and WebM. |
error | The 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:
| Event | When |
|---|---|
| Impression | When the video is ready to play (canplay). |
| creativeView | Together with the impression. |
| start | At the beginning of playback. |
| firstQuartile | At 25% of the video duration. |
| midpoint | At 50% of the video duration. |
| thirdQuartile | At 75% of the video duration. |
| complete | When the video finishes playing. |
| pause / resume | When the video is paused or resumed. |
| mute / unmute | When the mute state changes. |
| skip | When the ad is skipped via the vastSkip action. |
| click | When the viewer clicks the ad. Opens the clickthrough URL in a new tab. |
| error | When 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.