Skip to content

SIMID

SIMID 1.2 (Secure Interactive Media Interface Definition) for interactive ad creatives. Renders creative content in a sandboxed iframe with MessageChannel-based communication.

Usage

SIMID is used as an AdPlugin within VAST:

html
<style>
  #player-container { position: relative; }
  #ad-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 3;
    pointer-events: none;
  }
  #ad-container > * { pointer-events: auto; }
</style>

<div id="player-container">
  <video src="video.mp4"></video>
  <div id="ad-container"></div>
</div>
ts
import { createPlayer } from "@videts/vide";
import { vast } from "@videts/vide/vast";
import { simid } from "@videts/vide/simid";

const player = createPlayer(document.querySelector("video")!);
player.use(vast({
  tagUrl: "https://example.com/vast.xml",
  adPlugins: () => [
    simid({ container: document.getElementById("ad-container")! }),
  ],
}));

Ad Container Setup

The container element is where the SIMID creative iframe is rendered. It must overlay the player area with the following CSS requirements:

PropertyValueWhy
position: absoluteCover the player areaCreative iframe renders inside this container
z-index: 3Above UI click overlayThe UI plugin's click-to-play overlay uses z-index: 2 during ad states — the container must be higher
pointer-events: noneOn the containerNon-ad clicks pass through to the player/UI below
pointer-events: autoOn children (> *)The creative's interactive elements receive clicks

The parent element (#player-container) must have position: relative to establish the positioning context.

Without the UI plugin

If you're not using the UI plugin (no click-to-play overlay), z-index is not required — only position: absolute and the pointer-events setup matter.

Options

OptionTypeDefaultDescription
containerHTMLElementContainer for the SIMID iframe (required)
policyPartial<SimidRequestPolicy>see belowRequest policy overrides
handshakeTimeoutnumber5000Handshake timeout in ms

SimidRequestPolicy

FieldTypeDefaultDescription
allowPausebooleantrueAllow creative to pause media
allowPlaybooleantrueAllow creative to resume media
allowResizebooleanfalseAllow creative to resize ad slot
navigation"new-tab" | "deny""new-tab"How to handle requestNavigation

Events

SIMID creatives communicate through the MessageChannel. The plugin bridges media events from the player to the creative and handles creative requests (pause, play, resize, navigation).

Standard ad events (ad:start, ad:end, ad:click) are fired by the parent VAST plugin.

Notes

  • The VAST parser automatically extracts InteractiveCreativeFile elements from the VAST response.
  • Creative iframes are sandboxed with allow-scripts allow-same-origin.
  • The plugin implements the full SIMID handshake sequence (init → ready → start → stop).
  • Size: 2.4 KB gzip.