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
| Parameter | Type | Required | Description |
|---|---|---|---|
partner_id | number | * | Your unique partner ID provided by Veedmo |
query_selector | string | * | CSS selector for the container element |
autoplay | number | 1 = autoplay enabled, 0 = disabled | |
muted | number | 1 = muted by default, 0 = unmuted | |
video_url | string | URL to the video content | |
video_poster | string | URL to the video poster image | |
tag_url_desktop | string | VAST tag URL for desktop devices | |
tag_url_mobile | string | VAST tag URL for mobile devices | |
responsive | number | 1 = 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.
| Macro | Description |
|---|---|
$$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. |