-
Notifications
You must be signed in to change notification settings - Fork 731
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added option to return nurl vs. AdM video. (#1048)
This is on top of the changes from #993, which has not been merged, and this pretty much wraps up the major changes that we are doing for now. In addition to giving the titular choice, this makes a simple guess at device type and security.
- Loading branch information
1 parent
bdcf0a4
commit c2d0f5f
Showing
21 changed files
with
1,416 additions
and
810 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
152 changes: 152 additions & 0 deletions
152
adapters/beachfront/beachfronttest/exemplary/simple-adm-video.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
{ | ||
"mockBidRequest": | ||
{ | ||
"id":"61b87329-8790-47b7-90dd-c53ae7ce1723", | ||
"tmax":1000, | ||
"source":{ | ||
"tid":"61b87329-8790-47b7-90dd-c53ae7ce1723" | ||
}, | ||
"imp":[ | ||
{ | ||
"id":"video1", | ||
"ext":{ | ||
"bidder":{ | ||
"videoResponseType" : "adm", | ||
"bidfloor":0.01, | ||
"appId":"11bc5dd5-7421-4dd8-c926-40fa653bec76" | ||
} | ||
}, | ||
"video":{ | ||
"mimes":[ | ||
"video/mp4" | ||
], | ||
"context":"instream", | ||
"w":300, | ||
"h":250 | ||
} | ||
} | ||
], | ||
"site":{ | ||
"publisher":{ | ||
"id":"publisher1" | ||
}, | ||
"page": "http://example.com/whatever/something.html" | ||
}, | ||
"user": { | ||
"id": "some-user", | ||
"buyeruid": "some-buyer" | ||
}, | ||
"device": { | ||
"devicetype": 2, | ||
"ip": "127.0.0.1", | ||
"ua": "Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16" | ||
} | ||
}, | ||
|
||
"httpCalls": [ | ||
{ | ||
"expectedRequest": { | ||
"uri": "https://reachms.bfmio.com/bid.json?exchange_id=11bc5dd5-7421-4dd8-c926-40fa653bec76", | ||
"body": { | ||
"id": "61b87329-8790-47b7-90dd-c53ae7ce1723", | ||
"imp": [ | ||
{ | ||
"video": { | ||
"w": 300, | ||
"h": 250, | ||
"mimes": [ | ||
"video/mp4" | ||
] | ||
}, | ||
"id": "video1", | ||
"secure": 0 | ||
} | ||
], | ||
"site": { | ||
"publisher":{ | ||
"id":"publisher1" | ||
}, | ||
"page": "http://example.com/whatever/something.html", | ||
"domain": "example.com" | ||
}, | ||
"device": { | ||
"devicetype": 2, | ||
"ua": "Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16", | ||
"ip": "192.168.255.255" | ||
}, | ||
"source": { | ||
"tid": "61b87329-8790-47b7-90dd-c53ae7ce1723" | ||
}, | ||
"tmax": 1000, | ||
|
||
"cur": [ | ||
"USD" | ||
], | ||
"user": { | ||
"id": "some-user", | ||
"buyeruid": "some-buyer" | ||
} | ||
} | ||
}, | ||
"mockResponse": { | ||
"status" : 200, | ||
"body": { | ||
"id":"61b87329-8790-47b7-90dd-c53ae7ce1723", | ||
"seatBid":[ | ||
{ | ||
"bid": [ | ||
{ | ||
"id": "video1AdmVideo", | ||
"impid": "video1", | ||
"price": 20, | ||
"adm": "<?xml version=\"1.0\" encoding=\"utf-8\"?><VAST version=\"2.0\"><Ad id=\"VPAID\"><InLine><AdSystem version=\"2.0\">IO</AdSystem><AdTitle>Neptune</AdTitle><Impression></Impression><Creatives><Creative sequence=\"1\"><Linear><Duration>00:00:15</Duration><MediaFiles><MediaFile delivery=\"progressive\" width=\"640\" height=\"480\" scalable=\"1\" type=\"application/javascript\" apiFramework=\"VPAID\"><![CDATA[http://player-cdn.beachfrontmedia.com/players/neptune/3/17/5/neptune-player.js]]></MediaFile></MediaFiles><AdParameters><![CDATA[{\"dsp\":\"5d8393417cbc8e5aa4fe2202,0.01\",\"inventory_id\":\"bid:95d219a2-6025-44ba-bff8-1dca987beaae:11bc5dd5-7421-4dd8-c926-40fa653bec76:${AUCTION_PRICE}:20.0\",\"request_endpoint\":\"//useast.bfmio.com/getmu\",\"inventory_type\":\"pre\"}]]></AdParameters></Linear></Creative></Creatives></InLine></Ad></VAST>", | ||
"adid": "1088", | ||
"adomain": [ | ||
"beachfront.io" | ||
], | ||
"cid": "277", | ||
"crid": "532", | ||
"w": 300, | ||
"h": 250, | ||
"ext": { | ||
"prebid": { | ||
"type": "video" | ||
} | ||
} | ||
} | ||
], | ||
"seat": "beachfront" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
|
||
"expectedBids": [ | ||
{ | ||
|
||
"bid":[ | ||
{ | ||
"id": "video1AdmVideo", | ||
"impid": "video1", | ||
"price": 20, | ||
"adm": "<?xml version=\"1.0\" encoding=\"utf-8\"?><VAST version=\"2.0\"><Ad id=\"VPAID\"><InLine><AdSystem version=\"2.0\">IO</AdSystem><AdTitle>Neptune</AdTitle><Impression></Impression><Creatives><Creative sequence=\"1\"><Linear><Duration>00:00:15</Duration><MediaFiles><MediaFile delivery=\"progressive\" width=\"640\" height=\"480\" scalable=\"1\" type=\"application/javascript\" apiFramework=\"VPAID\"><![CDATA[http://player-cdn.beachfrontmedia.com/players/neptune/3/17/5/neptune-player.js]]></MediaFile></MediaFiles><AdParameters><![CDATA[{\"dsp\":\"5d8393417cbc8e5aa4fe2202,0.01\",\"inventory_id\":\"bid:95d219a2-6025-44ba-bff8-1dca987beaae:11bc5dd5-7421-4dd8-c926-40fa653bec76:${AUCTION_PRICE}:20.0\",\"request_endpoint\":\"//useast.bfmio.com/getmu\",\"inventory_type\":\"pre\"}]]></AdParameters></Linear></Creative></Creatives></InLine></Ad></VAST>", | ||
"adid": "1088", | ||
"adomain": [ | ||
"beachfront.io" | ||
], | ||
"cid": "277", | ||
"crid": "532", | ||
"w": 300, | ||
"h": 250, | ||
"ext": { | ||
"prebid": { | ||
"type": "video" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
220 changes: 220 additions & 0 deletions
220
adapters/beachfront/beachfronttest/exemplary/simple-mix.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,220 @@ | ||
{ | ||
"mockBidRequest": | ||
{ | ||
"id":"61b87329-8790-47b7-90dd-c53ae7ce1723", | ||
"tmax":1000, | ||
"source":{ | ||
"tid":"61b87329-8790-47b7-90dd-c53ae7ce1723" | ||
}, | ||
"imp":[ | ||
{ | ||
"id":"mix1", | ||
"ext":{ | ||
"bidder":{ | ||
"videoResponseType" : "adm", | ||
"bidfloor":0.41, | ||
"appIds": { | ||
"banner": "487cf244-5e95-43cb-e7b9-bb540873ca7e", | ||
"video": "11bc5dd5-7421-4dd8-c926-40fa653bec76" | ||
} | ||
} | ||
}, | ||
|
||
"banner": { | ||
"format": [ | ||
{ | ||
"w": 300, | ||
"h": 250 | ||
} | ||
] | ||
}, | ||
|
||
"video":{ | ||
"mimes":[ | ||
"video/mp4" | ||
], | ||
"context":"instream", | ||
"w":300, | ||
"h":250 | ||
} | ||
} | ||
], | ||
"site":{ | ||
"page": "http://example.com/somepage.html" | ||
}, | ||
"user": { | ||
"id": "some-user", | ||
"buyeruid": "some-buyer" | ||
}, | ||
"device": { | ||
"ip": "192.168.255.255", | ||
"ua": "Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16" | ||
} | ||
}, | ||
|
||
"httpCalls": [ | ||
{ | ||
"expectedRequest": { | ||
"uri": "https://display.bfmio.com/prebid_display", | ||
"body": { | ||
"slots": [ | ||
{ | ||
"slot": "mix1", | ||
"id": "487cf244-5e95-43cb-e7b9-bb540873ca7e", | ||
"bidfloor": 0.41, | ||
"sizes": [ | ||
{ | ||
"w": 300, | ||
"h": 250 | ||
} | ||
] | ||
} | ||
], | ||
"domain": "example.com", | ||
"page": "http://example.com/somepage.html", | ||
"referrer": "", | ||
"search": "", | ||
"secure": 0, | ||
"deviceOs": "", | ||
"deviceModel": "", | ||
"isMobile": 0, | ||
"ua": "Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16", | ||
"dnt": 0, | ||
"user": { | ||
"id": "some-user", | ||
"buyeruid": "some-buyer" | ||
}, | ||
"adapterName": "BF_PREBID_S2S", | ||
"adapterVersion": "0.8.0", | ||
"ip": "192.168.255.255", | ||
"requestId": "61b87329-8790-47b7-90dd-c53ae7ce1723" | ||
} | ||
} , | ||
"mockResponse": { | ||
"status" : 200, | ||
"body" : | ||
[ | ||
{ | ||
"crid":"crid_1", | ||
"price":9.5019655, | ||
"w":300, | ||
"h":250, | ||
"slot":"mix1", | ||
"adm":"<div id=\"44861168\"><script>!function(){console.log\"Hello, ad.\";}();<\/script><\/div>" | ||
} | ||
] | ||
} | ||
|
||
|
||
}, { | ||
"expectedRequest": { | ||
"uri": "https://reachms.bfmio.com/bid.json?exchange_id=11bc5dd5-7421-4dd8-c926-40fa653bec76", | ||
"body": { | ||
"id": "61b87329-8790-47b7-90dd-c53ae7ce1723", | ||
"imp": [ | ||
{ | ||
"video": { | ||
"w": 300, | ||
"h": 250, | ||
"mimes": [ | ||
"video/mp4" | ||
] | ||
|
||
}, | ||
"bidfloor": 0.41, | ||
"secure": 0, | ||
"id": "mix1" | ||
} | ||
], | ||
"site": { | ||
"page": "http://example.com/somepage.html", | ||
"domain": "example.com" | ||
}, | ||
"source": { | ||
"tid": "61b87329-8790-47b7-90dd-c53ae7ce1723" | ||
}, | ||
"device": { | ||
"devicetype": 2, | ||
"ua": "Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16", | ||
"ip": "192.168.255.255" | ||
}, | ||
"cur": [ | ||
"USD" | ||
], | ||
"tmax": 1000, | ||
"user": { | ||
"id": "some-user", | ||
"buyeruid": "some-buyer" | ||
} | ||
} | ||
}, | ||
"mockResponse": { | ||
"status" : 200, | ||
"body": { | ||
"id": "61b87329-8790-47b7-90dd-c53ae7ce1723", | ||
"seatbid": [ | ||
{ | ||
"bid": [ | ||
{ | ||
"id": "5d839458f73decdc1572b7f6", | ||
"impid": "mix1", | ||
"price": 20, | ||
"adm": "<?xml version=\"1.0\" encoding=\"utf-8\"?><VAST version=\"2.0\"><Ad id=\"VPAID\"><InLine><AdSystem version=\"2.0\">IO</AdSystem><AdTitle>Neptune</AdTitle><Impression></Impression><Creatives><Creative sequence=\"1\"><Linear><Duration>00:00:15</Duration><MediaFiles><MediaFile delivery=\"progressive\" width=\"640\" height=\"480\" scalable=\"1\" type=\"application/javascript\" apiFramework=\"VPAID\"><![CDATA[http://player-cdn.beachfrontmedia.com/players/neptune/3/17/5/neptune-player.js]]></MediaFile></MediaFiles><AdParameters><![CDATA[{\"dsp\":\"5d839458f73decdc1572b7f6,0.41\",\"inventory_id\":\"bid:26826cf7-f8bb-4e47-a636-769d83dd9b4f:11bc5dd5-7421-4dd8-c926-40fa653bec76:${AUCTION_PRICE}:20.0\",\"request_endpoint\":\"//useast.bfmio.com/getmu\",\"inventory_type\":\"pre\"}]]></AdParameters></Linear></Creative></Creatives></InLine></Ad></VAST>", | ||
"adid": "1088", | ||
"adomain": [ | ||
"beachfront.io" | ||
], | ||
"cid": "277", | ||
"crid": "532", | ||
"w": 300, | ||
"h": 250 | ||
} | ||
], | ||
"seat": "bfb-io-s1" | ||
} | ||
], | ||
"bidid": "5d839458f73decdc1572b7f6", | ||
"cur": "USD" | ||
} | ||
} | ||
} | ||
], | ||
|
||
"expectedBids": [ | ||
{ | ||
|
||
"bid":[ | ||
{ | ||
"id":"61b87329-8790-47b7-90dd-c53ae7ce1723", | ||
"impid":"video1", | ||
"price":9.605201, | ||
"nurl":"https://evt.bfmio.com/getmu?aid=bid:0d32aea6-d199-4803-a188-bd7cf7be1e12:11bc5dd5-7421-4dd8-c926-40fa653bec76:0.01:0.01&v=1&dsp=5afda03c7c2d2bfaee55a3f0,0.01&i_type=pre", | ||
"crid":"0d32aea6-d199-4803-a188-bd7cf7be1e12", | ||
"w":1500, | ||
"h":1280, | ||
"ext":{ | ||
"prebid":{ | ||
"type":"video" | ||
}, | ||
"bidder":{ | ||
|
||
} | ||
} | ||
}, { | ||
"id": "61b87329-8790-47b7-90dd-c53ae7ce1723", | ||
"impid": "mix1", | ||
"price": 9.5019655, | ||
"adm": "<div id=\"44861168\"><script>!function(){console.log\"Hello, ad.\";}();<\/script><\/div>", | ||
"crid": "crid_1", | ||
"w": 300, | ||
"h": 250, | ||
"ext": { | ||
"prebid": { | ||
"type": "banner" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.