@@ -112,59 +112,62 @@ export const sharethroughAdapterSpec = {
112112 const gpid = deepAccess ( bidReq , 'ortb2Imp.ext.gpid' ) || deepAccess ( bidReq , 'ortb2Imp.ext.data.pbadslot' ) ;
113113 if ( gpid ) impression . ext . gpid = gpid ;
114114
115- const videoRequest = deepAccess ( bidReq , 'mediaTypes.video' ) ;
115+ // Disabling Outstream request temporarily
116+ const bannerRequest = deepAccess ( bidReq , 'mediaTypes.banner' ) ;
117+ // const videoRequest = deepAccess(bidReq, 'mediaTypes.video');
116118
117119 if ( bidderRequest . paapi ?. enabled && bidReq . mediaTypes . banner ) {
118120 mergeDeep ( impression , { ext : { ae : 1 } } ) ; // ae = auction environment; if this is 1, ad server knows we have a fledge auction
119121 }
120122
121- if ( videoRequest ) {
122- // default playerSize, only change this if we know width and height are properly defined in the request
123- let [ w , h ] = [ 640 , 360 ] ;
124- if (
125- videoRequest . playerSize &&
126- videoRequest . playerSize [ 0 ] &&
127- videoRequest . playerSize [ 0 ] [ 0 ] &&
128- videoRequest . playerSize [ 0 ] [ 1 ]
129- ) {
130- [ w , h ] = videoRequest . playerSize [ 0 ] ;
131- }
132-
133- /**
134- * Applies a specified property to an impression object if it is present in the video request
135- * @param {string } prop A property to apply to the impression object
136- * @param {object } vidReq A video request object from which to extract the property
137- * @param {object } imp A video impression object to which to apply the property
138- */
139- const applyVideoProperty = ( prop , vidReq , imp ) => {
140- const propIsTypeArray = [ 'api' , 'battr' , 'mimes' , 'playbackmethod' , 'protocols' ] . includes ( prop ) ;
141- if ( propIsTypeArray ) {
142- const notAssignable = ( ! Array . isArray ( vidReq [ prop ] ) || vidReq [ prop ] . length === 0 ) && vidReq [ prop ] ;
143- if ( notAssignable ) {
144- logWarn ( `${ IDENTIFIER_PREFIX } Invalid video request property: "${ prop } " must be an array with at least 1 entry. Value supplied: "${ vidReq [ prop ] } ". This will not be added to the bid request.` ) ;
145- return ;
146- }
147- }
148- if ( vidReq [ prop ] ) {
149- imp . video [ prop ] = vidReq [ prop ] ;
150- }
151- } ;
152-
153- impression . video = {
154- pos : nullish ( videoRequest . pos , 0 ) ,
155- topframe : inIframe ( ) ? 0 : 1 ,
156- w,
157- h,
158- } ;
159-
160- const propertiesToConsider = [
161- 'api' , 'battr' , 'companionad' , 'companiontype' , 'delivery' , 'linearity' , 'maxduration' , 'mimes' , 'minduration' , 'placement' , 'playbackmethod' , 'plcmt' , 'protocols' , 'skip' , 'skipafter' , 'skipmin' , 'startdelay'
162- ]
163-
164- propertiesToConsider . forEach ( propertyToConsider => {
165- applyVideoProperty ( propertyToConsider , videoRequest , impression ) ;
166- } ) ;
167- } else {
123+ // if (videoRequest) {
124+ // // default playerSize, only change this if we know width and height are properly defined in the request
125+ // let [w, h] = [640, 360];
126+ // if (
127+ // videoRequest.playerSize &&
128+ // videoRequest.playerSize[0] &&
129+ // videoRequest.playerSize[0][0] &&
130+ // videoRequest.playerSize[0][1]
131+ // ) {
132+ // [w, h] = videoRequest.playerSize[0];
133+ // }
134+
135+ // /**
136+ // * Applies a specified property to an impression object if it is present in the video request
137+ // * @param {string } prop A property to apply to the impression object
138+ // * @param {object } vidReq A video request object from which to extract the property
139+ // * @param {object } imp A video impression object to which to apply the property
140+ // */
141+ // const applyVideoProperty = (prop, vidReq, imp) => {
142+ // const propIsTypeArray = ['api', 'battr', 'mimes', 'playbackmethod', 'protocols'].includes(prop);
143+ // if (propIsTypeArray) {
144+ // const notAssignable = (!Array.isArray(vidReq[prop]) || vidReq[prop].length === 0) && vidReq[prop];
145+ // if (notAssignable) {
146+ // logWarn(`${IDENTIFIER_PREFIX} Invalid video request property: "${prop}" must be an array with at least 1 entry. Value supplied: "${vidReq[prop]}". This will not be added to the bid request.`);
147+ // return;
148+ // }
149+ // }
150+ // if (vidReq[prop]) {
151+ // imp.video[prop] = vidReq[prop];
152+ // }
153+ // };
154+
155+ // impression.video = {
156+ // pos: nullish(videoRequest.pos, 0),
157+ // topframe: inIframe() ? 0 : 1,
158+ // w,
159+ // h,
160+ // };
161+
162+ // const propertiesToConsider = [
163+ // 'api', 'battr', 'companionad', 'companiontype', 'delivery', 'linearity', 'maxduration', 'mimes', 'minduration', 'placement', 'playbackmethod', 'plcmt', 'protocols', 'skip', 'skipafter', 'skipmin', 'startdelay'
164+ // ]
165+
166+ // propertiesToConsider.forEach(propertyToConsider => {
167+ // applyVideoProperty(propertyToConsider, videoRequest, impression);
168+ // });
169+ // } else {
170+ if ( bannerRequest ) {
168171 impression . banner = {
169172 pos : deepAccess ( bidReq , 'mediaTypes.banner.pos' , 0 ) ,
170173 topframe : inIframe ( ) ? 0 : 1 ,
0 commit comments