Skip to content

Commit

Permalink
Relaido Bid Adapter : add placementId to renderAd parameters (#11769)
Browse files Browse the repository at this point in the history
* add relaido adapter

* remove event listener

* fixed UserSyncs and e.data

* fix conflicts

* Add placementId to renderAd parameters

---------

Co-authored-by: ishigami_shingo <[email protected]>
Co-authored-by: cmertv-sishigami <[email protected]>
Co-authored-by: t_bun <[email protected]>
Co-authored-by: n.maeura <[email protected]>
  • Loading branch information
5 people committed Jun 12, 2024
1 parent f61da87 commit df57b81
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/relaidoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { isSlotMatchingAdUnitCode } from '../libraries/gptUtils/gptUtils.js';

const BIDDER_CODE = 'relaido';
const BIDDER_DOMAIN = 'api.relaido.jp';
const ADAPTER_VERSION = '1.2.0';
const ADAPTER_VERSION = '1.2.1';
const DEFAULT_TTL = 300;
const UUID_KEY = 'relaido_uuid';

Expand Down Expand Up @@ -270,6 +270,7 @@ function outstreamRender(bid) {
height: bid.height,
vastXml: bid.vastXml,
mediaType: bid.mediaType,
placementId: bid.placementId,
});
});
}
Expand Down
21 changes: 21 additions & 0 deletions test/spec/modules/relaidoBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ describe('RelaidoAdapter', function () {
}]
}
};
window.RelaidoPlayer = {
renderAd: function() {
return null;
}
};
});

afterEach(() => {
Expand Down Expand Up @@ -569,4 +574,20 @@ describe('RelaidoAdapter', function () {
expect(query.ref).to.include(window.location.href);
});
});

describe('spec.outstreamRender', function () {
it('Should to pass a Bid to renderAd', function () {
const bidResponses = spec.interpretResponse(serverResponse, serverRequest);
const response = bidResponses[0];
sinon.spy(window.RelaidoPlayer, 'renderAd');
response.renderer.render(response);
const renderCall = window.RelaidoPlayer.renderAd.getCall(0);
const arg = renderCall.args[0];
expect(arg.width).to.equal(640);
expect(arg.height).to.equal(360);
expect(arg.vastXml).to.equal('<VAST version="3.0"><Ad><InLine></InLine></Ad></VAST>');
expect(arg.mediaType).to.equal(VIDEO);
expect(arg.placementId).to.equal(100000);
});
});
});

0 comments on commit df57b81

Please sign in to comment.