I cannot find any example of how to add a vmap to a live stream at the receiver adBreaks docs (https://developers.google.com/cast/docs/web_receiver/ad_breaks?hl=en). I would like to play an ad before the video starts and then request new ads each 5 minutes.
For the pre-roll I have tried with
const adUrl = 'https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sample_ar%3Dpreonly&ciu_szs=300x250%2C728x90&gdfp_req=1&ad_rule=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&correlator=';
const vastTemplate = new cast.framework.messages.VastAdsRequest();
vastTemplate.adTagUrl = adUrl;
const clipVast = new cast.framework.messages.BreakClip('bc_vast');
clipVast.vastAdsRequest = vastTemplate;
const breakPreRoll = new cast.framework.messages.Break('break_preroll', ['bc_vast'], this.receiver.currentPosition);
loadRequestData.breakClips = [clipVast];
loadRequestData.breaks = [breakPreRoll];