Skip to content

Synacormedia: Added video support to adapter.#3695

Merged
idettman merged 3 commits intoprebid:masterfrom
amuraco:synacormedia-video
Apr 22, 2019
Merged

Synacormedia: Added video support to adapter.#3695
idettman merged 3 commits intoprebid:masterfrom
amuraco:synacormedia-video

Conversation

@amuraco
Copy link
Contributor

@amuraco amuraco commented Mar 29, 2019

Type of change

  • Feature - Video support to synacormedia
  • Other - Added playerSize to video test page.

Description of change

Added playerSize to video test page.
@amuraco amuraco force-pushed the synacormedia-video branch 3 times, most recently from f113a35 to 856a15a Compare March 31, 2019 02:13
Copy link
Contributor

@idettman idettman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, just a few comments/questions

let size0 = size[0];
let size1 = size[1];
let imp = {
id: videoOrBannerKey.substring(0, 1) + bid.bidId + '-' + size0 + 'x' + size1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use template strings if possible in Prebid, so line 68 is changed to something like:
id: `${videoOrBannerKey.substring(0,1)}${bid.bidId}-${size0}x${size1}`

},
interpretResponse: function(serverResponse) {
var updateMacros = (bid, r) => {
return r ? r.replace(/\${AUCTION_PRICE}/g, parseFloat(bid.price)) : r;
Copy link
Contributor

@idettman idettman Apr 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since replace expects a string type for the replacement argument, the parseFloat will be converted back to a string. Could you remove parseFloat or is it used to format the price?
return r ? r.replace(/\${AUCTION_PRICE}/g, bid.price) : r;

width: parseInt(width, 10),
height: parseInt(height, 10),
creativeId: seatbid.seat + '~' + bid.crid,
creativeId: seatbid.seat + '_' + bid.crid,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A template string could be used here:
creativeId: `${seatbid.seat}_${bid.crid}`,

currency: 'USD',
netRevenue: true,
mediaType: BANNER,
mediaType: (isVideo ? VIDEO : BANNER),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a recommendation, but you could simplify by removing the parens here:
mediaType: isVideo ? VIDEO : BANNER,

@amuraco
Copy link
Contributor Author

amuraco commented Apr 8, 2019

I have updated the PR and addressed the comments.

@amuraco
Copy link
Contributor Author

amuraco commented Apr 10, 2019

Just bumping this to see if it can be re-reviewed with the recommended changes.

Copy link
Contributor

@idettman idettman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@idettman idettman merged commit 1ef6197 into prebid:master Apr 22, 2019
VideoReach pushed a commit to VideoReach/Prebid.js that referenced this pull request Aug 1, 2019
* Synacormedia: Added video support to adapter.
Added playerSize to video test page.

* Synacormedia: Updated test case for IE/Edge

* Synacormedia: Updates based on PR review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments