Ads & monetisation
Ads run through Google IMA on the native <video> path - MP4/HLS/DASH, plus Brightcove and JW Player. Not supported on YouTube, Vimeo, or Dailymotion, which play their own ads inside their iframe.
VAST / VMAP
Pass an ad tag as adTagUrl; the IMA SDK loads on demand, nothing else to configure:
<VideoCard
src="https://archive.org/download/BigBuckBunny_124/Content/big_buck_bunny_720p_surround.mp4"
ad-tag-url="https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dlinear&gdfp_req=1&output=vast&env=vp&impl=s&correlator="
/>
<ml-video-card
src="https://archive.org/download/BigBuckBunny_124/Content/big_buck_bunny_720p_surround.mp4"
ad-tag-url="https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dlinear&gdfp_req=1&output=vast&env=vp&impl=s&correlator="
></ml-video-card>
Ad tags are query-string heavy - escape the & as & in HTML, or the browser will eat the parameters.
Loading player…
The same endpoint serves VMAP (output=vmap) for pre/mid/post-roll schedules, including multi-ad pods and bumpers. Confirm playback via adstart/adend on state-change.
While an ad plays, an overlay shows an "Ad" badge with a countdown, a pause/resume button, and a mute button for the ad creative's own audio - independent of the content video's volume, in both directions.
Ad macros & auto-discovered tags
A Brightcove source auto-discovers its own ad tag when you don't pass adTagUrl, and those tags are usually macro templates (...&iu={adUnit}&vid={referenceId}). adMacroParams fills {macro} tokens in whichever tag ends up in use, prop-supplied or discovered:
<VideoCard src="https://players.brightcove.net/..." :ad-macro-params="{ adUnit: 'network/section', referenceId: videoId }" />
Name each key after the macro it fills (vid={referenceId} → key referenceId, not vid). A key with no matching macro is a no-op.