Skip to content

Commit

Permalink
Grid Bid Adapter: Added video protocols to the ad request (prebid#6299)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMediaGrid authored Feb 11, 2021
1 parent a037c54 commit c9e8869
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion modules/gridBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ function _addBidResponse(serverBid, bidRequest, bidResponses) {
}

function createVideoRequest(bid, mediaType) {
const {playerSize, mimes, durationRangeSec} = mediaType;
const {playerSize, mimes, durationRangeSec, protocols} = mediaType;
const size = (playerSize || bid.sizes || [])[0];
if (!size) return;

Expand All @@ -380,6 +380,10 @@ function createVideoRequest(bid, mediaType) {
result.maxduration = durationRangeSec[1];
}

if (protocols && protocols.length) {
result.protocols = protocols;
}

return result;
}

Expand Down
6 changes: 4 additions & 2 deletions test/spec/modules/gridBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ describe('TheMediaGrid Adapter', function () {
'sizes': [[728, 90]],
'mediaTypes': {
'video': {
'playerSize': [[400, 600]]
'playerSize': [[400, 600]],
'protocols': [1, 2, 3]
},
'banner': {
'sizes': [[728, 90]]
Expand Down Expand Up @@ -281,7 +282,8 @@ describe('TheMediaGrid Adapter', function () {
},
'video': {
'w': 400,
'h': 600
'h': 600,
'protocols': [1, 2, 3]
}
}]
});
Expand Down

0 comments on commit c9e8869

Please sign in to comment.