From 4fa832724c1b7818a1bbdc42212d9a854d2d4256 Mon Sep 17 00:00:00 2001 From: fhedma Date: Fri, 7 Jun 2024 15:24:18 +0200 Subject: [PATCH] skipoffset in AttachPodAds Added a attribute to the attachLinear method in AttachPodAds. Right now we set it as 5 seconds but it could be changed to another value or a percentage. We could also make it so that we look for a sent in skipoffset value from the sent in params. --- utils/vast-maker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/vast-maker.js b/utils/vast-maker.js index 4c7d330..224af6d 100644 --- a/utils/vast-maker.js +++ b/utils/vast-maker.js @@ -209,7 +209,7 @@ function AttachPodAds(vast, podAds, params) { ); } mediaNode = mediaNode - .attachLinear() + .attachLinear({ skipoffset: "00:00:05" }) // skipoffset does not seem to exist on VAST 2.0 and lower, you could also have skipoffset in percentage .attachTrackingEvents() .addTracking(`http://${params.adserverHostname}/api/v1/sessions/${params.sessionId}/tracking?${adId}=${podAds[i].id}_${i + 1}&progress=0`, { event: "start" }) .addTracking(`http://${params.adserverHostname}/api/v1/sessions/${params.sessionId}/tracking?${adId}=${podAds[i].id}_${i + 1}&progress=25`, { event: "firstQuartile" })