Skip to content

Commit

Permalink
skipoffset in AttachPodAds
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JinHedman committed Jun 7, 2024
1 parent 878d75b commit 4fa8327
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/vast-maker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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" })
Expand Down

0 comments on commit 4fa8327

Please sign in to comment.