-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add vastUrl + media type for video bids Prebid Server #1739
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,7 +111,9 @@ function PrebidServer() { | |
if (videoMediaType) { | ||
// pbs expects a ad_unit.video attribute if the imp is video | ||
adUnit.video = Object.assign({}, videoMediaType); | ||
delete adUnit.mediaTypes.video; | ||
delete adUnit.mediaTypes; | ||
// default is assumed to be 'banner' so if there is a video type we assume video only until PBS can support multi format auction. | ||
adUnit.media_types = ['video']; | ||
} | ||
}) | ||
convertTypes(adUnits); | ||
|
@@ -196,10 +198,15 @@ function PrebidServer() { | |
bidObject.creative_id = bidObj.creative_id; | ||
bidObject.bidderCode = bidObj.bidder; | ||
bidObject.cpm = cpm; | ||
bidObject.ad = bidObj.adm; | ||
if (bidObj.nurl) { | ||
bidObject.ad += utils.createTrackPixelHtml(decodeURIComponent(bidObj.nurl)); | ||
if (bidObj.media_type === 'video') { | ||
bidObject.vastUrl = bidObj.nurl; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is a In section |
||
} else { | ||
bidObject.ad = bidObj.adm; | ||
if (bidObj.nurl) { | ||
bidObject.ad += utils.createTrackPixelHtml(decodeURIComponent(bidObj.nurl)); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like these should be the other way around. From the spec,
(see section 4.2.3) |
||
} | ||
|
||
bidObject.width = bidObj.width; | ||
bidObject.height = bidObj.height; | ||
bidObject.adserverTargeting = bidObj.ad_server_targeting; | ||
|
@@ -223,7 +230,6 @@ function PrebidServer() { | |
bidObject.source = TYPE; | ||
bidObject.adUnitCode = bidRequest.placementCode; | ||
bidObject.bidderCode = bidRequest.bidder; | ||
|
||
bidmanager.addBidResponse(bidObject.adUnitCode, bidObject); | ||
}); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to use the
VIDEO
constant here too?