Skip to content

Commit

Permalink
SpotX: Add hide_skin parameter (prebid#3760)
Browse files Browse the repository at this point in the history
  • Loading branch information
spotxslagle authored and jacekburys-quantcast committed May 15, 2019
1 parent 2f0726b commit 014add1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions modules/spotxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ export const spec = {
versionOrtb: ORTB_VERSION
};

if (utils.getBidIdParameter('hide_skin', bid.params) != '') {
ext.hide_skin = +!!utils.getBidIdParameter('hide_skin', bid.params);
}

if (utils.getBidIdParameter('ad_volume', bid.params) != '') {
ext.ad_volume = utils.getBidIdParameter('ad_volume', bid.params);
}
Expand Down
4 changes: 3 additions & 1 deletion modules/spotxBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ This adapter requires setup and approval from the SpotX team.
click_to_replay: '1',
continue_out_of_view: '1',
ad_volume: '100',
content_container_id: 'video1'
content_container_id: 'video1',
hide_skin: '1'
}
}
}
Expand Down Expand Up @@ -121,6 +122,7 @@ function myOutstreamFunction(bid) {
script.setAttribute('data-spotx_click_to_replay', '1');
script.setAttribute('data-spotx_continue_out_of_view', '1');
script.setAttribute('data-spotx_ad_volume', '100');
script.setAttribute('data-spotx_hide_skin', '1');
if (bid.renderer.config.inIframe && window.document.getElementById(bid.renderer.config.inIframe).nodeName == 'IFRAME') {
let rawframe = window.document.getElementById(bid.renderer.config.inIframe);
let framedoc = rawframe.contentDocument;
Expand Down
1 change: 1 addition & 0 deletions test/spec/modules/spotxBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ describe('the spotx adapter', function () {
expect(request.data.imp.video.ext).to.deep.equal({
ad_volume: 1,
ad_unit: 'incontent',
hide_skin: 1,
outstream_options: {foo: 'bar'},
outstream_function: '987',
custom: {bar: 'foo'},
Expand Down

0 comments on commit 014add1

Please sign in to comment.