OMID chapter navigation
AdEvents & MediaEvents
APIThe listings on this page are generated by scripts/gen-omid-spec.mjs from official IAB Tech Lab sources, with descriptions in the original English; see the page footer for the collection baseline.
On this page
Role & scope
Event registration is split in two: AdEvents carries the impression (impressionOccurred) and creative load completion (loaded, optionally with VastProperties); MediaEvents carries the 14 media playback events (start, the three quartiles, complete, pause, resume, bufferStart, bufferFinish, skipped, volumeChange, playerStateChange, adUserInteraction). The event type constants live in the AdEventType enum, and most map one-to-one onto VAST tracking events.
- Client
- Session client
- Library version
- 1.6.10
- Objects
- AdEvents · MediaEvents
- Public members
- 17
AdEvents (impression & creative load)
AdEventsjs · 3
Ad event API enabling the JS component to signal to all verification providers when key events have occurred. The OM SDK JS service will allow only one ad events instance to be associated with the ad session and any attempt to create multiple instances will result in an error.
| Name | Signature | Returns | Official description |
|---|---|---|---|
| AdEvents | new AdEvents(adSession) | void | (no official description provided)
|
| impressionOccurred | impressionOccurred() | void | Notifies all verification providers that an impression event should be recorded. |
| loaded | loaded(vastProperties) | void | Notifies all verification providers that a loaded event should be recorded. Video/audio creatives should supply non-null vastProperties. Display creatives should supply a null argument.
|
MediaEvents (playback events)
MediaEventsjs · 14
Provides a complete list of supported JS media events. Using this event API assumes the media player is fully responsible for communicating all media events at the appropriate times. Only one media events implementation can be associated with the ad session and any attempt to create multiple instances will result in an error. The same rules apply to both multiple JS media events and any attempt to register a JS media events instance when a native instance has already been registered via the native bridge.
| Name | Signature | Returns | Official description |
|---|---|---|---|
| MediaEvents | new MediaEvents(adSession) | void | (no official description provided)
|
| adUserInteraction | adUserInteraction(interactionType) | void | Notifies all media listeners that the user has performed an ad interaction.
|
| bufferFinish | bufferFinish() | void | Notifies all media listeners that buffering has finished and media playback has resumed. |
| bufferStart | bufferStart() | void | Notifies all media listeners that media playback has stopped and started buffering. |
| complete | complete() | void | Notifies all media listeners that media playback is complete. |
| firstQuartile | firstQuartile() | void | Notifies all media listeners that media playback has reached the first quartile. |
| midpoint | midpoint() | void | Notifies all media listeners that media playback has reached the midpoint. |
| pause | pause() | void | Notifies all media listeners that media playback has paused after a user interaction. |
| playerStateChange | playerStateChange(playerState) | void | Notifies all media listeners that media player state has changed.
|
| resume | resume() | void | Notifies all media listeners that media playback has resumed (after being paused) after a user interaction. |
| skipped | skipped() | void | Notifies all media listeners that media playback has stopped as a user skip interaction. Once skipped media it should not be possible for the media to resume playing content. |
| start | start(duration, mediaPlayerVolume) | void | Notifies all media listeners that media content has started playing.
|
| thirdQuartile | thirdQuartile() | void | Notifies all media listeners that media playback has reached the third quartile. |
| volumeChange | volumeChange(mediaPlayerVolume) | void | Notifies all media listeners that the media player has changed the volume.
|
Mapping onto VAST tracking events
| Constant | Literal value | Official description |
|---|---|---|
| IMPRESSION | impression | The OMID provider has recorded an impression for this ad. For video ads, this corresponds to the VAST <Impression> and should be fired simultaneously with that event. Constant has value 'impression'. |
| LOADED | loaded | The OM integration has loaded the display, video, or audio ad creative's assets. For video and audio ads, it has buffered the creative’s media to the extent that it is ready to play the media. Corresponds to the VAST 'loaded' event. Constant has value 'loaded'. |
| START | start | Media-only event. The player began playback of the video ad creative. Corresponds to the VAST 'start' event. Constant has value 'start'. |
| FIRST_QUARTILE | firstQuartile | Media-only event. The creative played continuously for at least 25% of the total duration. Corresponds to the VAST 'firstQuartile' event. Constant has value 'firstQuartile'. |
| MIDPOINT | midpoint | Media-only event. The creative played continuously for at least 50% of the total duration. Corresponds to the VAST midpoint event. Constant has value 'midpoint'. |
| THIRD_QUARTILE | thirdQuartile | Media-only event. The creative played continuously for at least 75% of the total duration. Corresponds to the VAST 'thirdQuartile' event. Constant has value 'thirdQuartile'. |
| COMPLETE | complete | Media-only event. The creative played to the end for 100% of the total duration. Corresponds to the VAST 'complete' event. Constant has value 'complete'. |
| PAUSE | pause | Media-only event. Playback was stopped in a way from which it may later be resumed, due to user interaction. Corresponds to the VAST 'pause' event. Constant has value 'pause'. |
| RESUME | resume | Media-only event. Playback resumed following a user-originated pause. Corresponds to the VAST 'resume' event. Constant has value 'resume'. |
| SKIPPED | skipped | Media-only event. The user activated a control which caused ad playback to terminate. Corresponds to the VAST 'skip' event. Constant has value 'skipped'. |
The table below is filtered to the AdEventType values whose official description explicitly names a VAST event; the correspondence is taken from the official text and not inferred by this site. Events whose description does not name a VAST event (bufferStart, bufferFinish, volumeChange, playerStateChange, adUserInteraction) are not listed.
Cross-platform naming
| Concept | JavaScript | iOS | Android |
|---|---|---|---|
| ad-events | AdEvents | OMIDAdEvents | AdEvents |
| media-events | MediaEvents | OMIDMediaEvents | MediaEvents |
| vast-properties | — | OMIDVASTProperties | VastProperties |
- vast-propertiesVastProperties on JS (src/common/vast-properties.js, marked @public and listed in jsdoc.json's include list) is not published on the official JSDoc site (VastProperties.html verified 404), so js is recorded as null; AdEvents.loaded(vastProperties) therefore references a type that is undocumented on the site.
Class names for the same concept on each of the three platforms; a blank cell means that platform provides no corresponding class. On the JS side session configuration is folded into Context and the constructor arguments, while iOS / Android split it into separate configuration and context classes.