Skip to content

Commit

Permalink
Freewheel: add video dur and cat (prebid#3640)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwang-sticky authored and mefjush committed Jul 19, 2024
1 parent 46fac01 commit a406808
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 11 deletions.
17 changes: 13 additions & 4 deletions adapters/freewheelssp/freewheelssp.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,20 @@ func (a *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest

for _, seatBid := range bidResp.SeatBid {
for i := range seatBid.Bid {
b := &adapters.TypedBid{
Bid: &seatBid.Bid[i],
BidType: bidType,
bid := seatBid.Bid[i]
bidVideo := openrtb_ext.ExtBidPrebidVideo{}
if len(bid.Cat) > 0 {
bidVideo.PrimaryCategory = bid.Cat[0]
}
bidResponse.Bids = append(bidResponse.Bids, b)
if bid.Dur > 0 {
bidVideo.Duration = int(bid.Dur)
}
adTypeBid := &adapters.TypedBid{
Bid: &bid,
BidType: bidType,
BidVideo: &bidVideo,
}
bidResponse.Bids = append(bidResponse.Bids, adTypeBid)
}
}
return bidResponse, nil
Expand Down
29 changes: 23 additions & 6 deletions adapters/freewheelssp/freewheelssptest/exemplary/multi-imp.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@
"adid": "7857",
"adm": "<?xml version='1.0' encoding='UTF-8'?><VAST version='2.0'></VAST>",
"cid": "4001",
"crid": "7857"
"crid": "7857",
"adomain":["freewheel.com"],
"cat": ["IAB10"],
"dur": 14
},
{
"id": "12346_freewheelssp-test_2",
Expand All @@ -98,7 +101,9 @@
"adid": "7933",
"adm": "<?xml version='1.0' encoding='UTF-8'?><VAST version='2.0'></VAST>",
"cid": "3476",
"crid": "7933"
"crid": "7933",
"adomain":["freewheel.com"],
"dur":10
}
],
"seat": "freewheelsspTv"
Expand All @@ -123,9 +128,16 @@
"adid": "7857",
"adm": "<?xml version='1.0' encoding='UTF-8'?><VAST version='2.0'></VAST>",
"cid": "4001",
"crid": "7857"
"crid": "7857",
"adomain":["freewheel.com"],
"cat": ["IAB10"],
"dur": 14
},
"type": "video"
"type": "video",
"video" : {
"duration" : 14,
"primary_category": "IAB10"
}
},
{
"bid": {
Expand All @@ -135,9 +147,14 @@
"adid": "7933",
"adm": "<?xml version='1.0' encoding='UTF-8'?><VAST version='2.0'></VAST>",
"cid": "3476",
"crid": "7933"
"crid": "7933",
"adomain":["freewheel.com"],
"dur":10
},
"type": "video"
"type": "video",
"video" : {
"duration" : 10
}
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion static/bidder-info/freewheelssp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ capabilities:
userSync:
iframe:
url: "https://ads.stickyadstv.com/pbs-user-sync?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&r={{.RedirectURL}}"
userMacro: "{viewerid}"
userMacro: "{viewerid}"

0 comments on commit a406808

Please sign in to comment.