Embed Video Player using JS code snippet

Sample code

The following code will put a video player in the element with the ID veedmo-video-player-placeholder:

<script src="https://cdn.veedmo-static.com/cdn/player/v2/current.js"></script>
<script>
veedmoPlayer({
  partner_id: 1234,
  query_selector: '#veedmo-video-player-placeholder',
  autoplay: 1,
  muted: 1,
  ad_type: 1,
  video_url: 'https://example.com/video.mp4',
  video_poster: 'https://example.com/poster.jpg',
  tag_url_desktop: '[YOUR_VAST_TAG]',
  tag_url_mobile: '[YOUR_VAST_TAG]',
  responsive: 1,
})
</script>

Configuration Parameters

ParameterTypeRequiredDescription
partner_idnumber*Your unique partner ID provided by Veedmo
query_selectorstring*CSS selector for the container element
autoplaynumber1 = autoplay enabled, 0 = disabled
mutednumber1 = muted by default, 0 = unmuted
video_urlstringURL to the video content
video_posterstringURL to the video poster image
tag_url_desktopstringVAST tag URL for desktop devices
tag_url_mobilestringVAST tag URL for mobile devices
responsivenumber1 = responsive sizing, 0 = fixed dimensions

For the complete list of configuration parameters, please contact us at ....

Macros

You can use the following macros in your ad tag URLs. They will be replaced with actual values at runtime.

MacroDescription
$$WIDTH$$Returns player width in pixels
$$HEIGHT$$Returns player height in pixels
$$REFERER$$Returns hostname + path (e.g. domain.com/news/article)
$$REFERER_DOMAIN$$Returns hostname only (e.g. domain.com)
$$GDPR$$GDPR status: 0 = not required, 1 = required. Requires IAB's GDPR Transparency & Consent Framework to be implemented.
$$GDPR_CONSENT$$GDPR consent string (only when GDPR is required). Requires IAB's GDPR Transparency & Consent Framework to be implemented.

Live example

Instream player example

Outstream player example