From b020195782f5f82e2635840f1019c0831c3f8b0c Mon Sep 17 00:00:00 2001 From: Nate Lapinski Date: Mon, 13 Jul 2020 13:31:35 +0900 Subject: [PATCH 1/2] Set ad_mute correctly. In the SpotX Prebid adapter, data-spotx_ad_mute was being set to '0' isntead of '1', in scenarios where the user passed in 'ad_mute'. --- modules/spotxBidAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/spotxBidAdapter.js b/modules/spotxBidAdapter.js index 1733a176eba..c5741e57db0 100644 --- a/modules/spotxBidAdapter.js +++ b/modules/spotxBidAdapter.js @@ -392,7 +392,7 @@ function createOutstreamScript(bid) { utils.logMessage('[SPOTX][renderer] Default beahavior'); if (utils.getBidIdParameter('ad_mute', bid.renderer.config.outstream_options)) { - dataSpotXParams['data-spotx_ad_mute'] = '0'; + dataSpotXParams['data-spotx_ad_mute'] = '1'; } dataSpotXParams['data-spotx_collapse'] = '0'; dataSpotXParams['data-spotx_autoplay'] = '1'; From 3f18a09255f244a244f9980ad145b5c6b79df98d Mon Sep 17 00:00:00 2001 From: Nate Lapinski Date: Tue, 11 Aug 2020 16:46:55 +0900 Subject: [PATCH 2/2] Updates unit test to ensure ad_mute is set correctly --- test/spec/modules/spotxBidAdapter_spec.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/spec/modules/spotxBidAdapter_spec.js b/test/spec/modules/spotxBidAdapter_spec.js index 78d17f35c69..e77795b0805 100644 --- a/test/spec/modules/spotxBidAdapter_spec.js +++ b/test/spec/modules/spotxBidAdapter_spec.js @@ -511,6 +511,7 @@ describe('the spotx adapter', function () { expect(scriptTag.getAttribute('data-spotx_digitrust_opt_out')).to.equal('1'); expect(scriptTag.getAttribute('data-spotx_content_width')).to.equal('400'); expect(scriptTag.getAttribute('data-spotx_content_height')).to.equal('300'); + expect(scriptTag.getAttribute('data-spotx_ad_mute')).to.equal('1'); window.document.getElementById.restore(); });