Skip to content

Commit

Permalink
set video.plcmt to 3 for placement msp-android-immersive-flow-video-p…
Browse files Browse the repository at this point in the history
…rod (prebid#235)
  • Loading branch information
shunj-nb authored Feb 14, 2024
1 parent b81364a commit fb57718
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions pkg/modules/update_bundle/module/hook_raw_auction.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"encoding/json"

"github.com/ParticleMedia/msp/pkg/extract"
"github.com/prebid/openrtb/v19/adcom1"
"github.com/prebid/openrtb/v19/openrtb2"
"github.com/prebid/prebid-server/hooks/hookstage"
"github.com/prebid/prebid-server/openrtb_ext"
Expand Down Expand Up @@ -51,18 +52,15 @@ func handleRawAuctionHook(
}
}

// placementId, err := extract.PlacementId(req.BidRequest)
// if err == nil && placementId == "msp-android-immersive-flow-video-prod" {
// for _, imp := range req.GetImp() {
// imp.Instl = 0
// if imp.Video != nil {
// imp.Video.W = 300
// imp.Video.H = 250
// imp.Video.Plcmt = adcom1.VideoPlcmtSubtype(imp.Video.Placement)
// }
// imp.RebuildImp()
// }
// }
placementId, err := extract.PlacementId(req.BidRequest)
if err == nil && placementId == "msp-android-immersive-flow-video-prod" {
for _, imp := range req.GetImp() {
if imp.Video != nil {
imp.Video.Plcmt = adcom1.VideoPlcmtInterstitial
}
imp.RebuildImp()
}
}

req.RebuildRequest()
resolvedBidReq, err := json.Marshal(req.BidRequest)
Expand Down

0 comments on commit fb57718

Please sign in to comment.