@@ -534,7 +534,7 @@ function _createBannerRequest(bid) {
534
534
535
535
export function checkVideoPlacement ( videoData , adUnitCode ) {
536
536
// Check for video.placement property. If property is missing display log message.
537
- if ( ! deepAccess ( videoData , 'placement' ) ) {
537
+ if ( FEATURES . VIDEO && ! deepAccess ( videoData , 'placement' ) ) {
538
538
logWarn ( MSG_VIDEO_PLACEMENT_MISSING + ' for ' + adUnitCode ) ;
539
539
} ;
540
540
}
@@ -543,7 +543,7 @@ function _createVideoRequest(bid) {
543
543
var videoData = mergeDeep ( deepAccess ( bid . mediaTypes , 'video' ) , bid . params . video ) ;
544
544
var videoObj ;
545
545
546
- if ( videoData !== UNDEFINED ) {
546
+ if ( FEATURES . VIDEO && videoData !== UNDEFINED ) {
547
547
videoObj = { } ;
548
548
checkVideoPlacement ( videoData , bid . adUnitCode ) ;
549
549
for ( var key in VIDEO_CUSTOM_PARAMS ) {
@@ -673,7 +673,7 @@ function _createImpressionObject(bid) {
673
673
isInvalidNativeRequest = false ;
674
674
}
675
675
break ;
676
- case VIDEO :
676
+ case FEATURES . VIDEO && VIDEO :
677
677
videoObj = _createVideoRequest ( bid ) ;
678
678
if ( videoObj !== UNDEFINED ) {
679
679
impObj . video = videoObj ;
@@ -709,7 +709,7 @@ function _createImpressionObject(bid) {
709
709
710
710
return impObj . hasOwnProperty ( BANNER ) ||
711
711
impObj . hasOwnProperty ( NATIVE ) ||
712
- impObj . hasOwnProperty ( VIDEO ) ? impObj : UNDEFINED ;
712
+ ( FEATURES . VIDEO && impObj . hasOwnProperty ( VIDEO ) ) ? impObj : UNDEFINED ;
713
713
}
714
714
715
715
function _addImpressionFPD ( imp , bid ) {
@@ -810,7 +810,7 @@ function _checkMediaType(bid, newBid) {
810
810
var videoRegex = new RegExp ( / V A S T \s + v e r s i o n / ) ;
811
811
if ( adm . indexOf ( 'span class="PubAPIAd"' ) >= 0 ) {
812
812
newBid . mediaType = BANNER ;
813
- } else if ( videoRegex . test ( adm ) ) {
813
+ } else if ( FEATURES . VIDEO && videoRegex . test ( adm ) ) {
814
814
newBid . mediaType = VIDEO ;
815
815
} else {
816
816
try {
@@ -896,7 +896,10 @@ function _assignRenderer(newBid, request) {
896
896
for ( let bidderRequestBidsIndex = 0 ; bidderRequestBidsIndex < request . bidderRequest . bids . length ; bidderRequestBidsIndex ++ ) {
897
897
if ( request . bidderRequest . bids [ bidderRequestBidsIndex ] . bidId === newBid . requestId ) {
898
898
bidParams = request . bidderRequest . bids [ bidderRequestBidsIndex ] . params ;
899
- context = request . bidderRequest . bids [ bidderRequestBidsIndex ] . mediaTypes [ VIDEO ] . context ;
899
+
900
+ if ( FEATURES . VIDEO ) {
901
+ context = request . bidderRequest . bids [ bidderRequestBidsIndex ] . mediaTypes [ VIDEO ] . context ;
902
+ }
900
903
adUnitCode = request . bidderRequest . bids [ bidderRequestBidsIndex ] . adUnitCode ;
901
904
}
902
905
}
@@ -916,7 +919,7 @@ function _assignRenderer(newBid, request) {
916
919
* @returns
917
920
*/
918
921
export function assignDealTier ( newBid , bid , request ) {
919
- if ( ! bid ?. ext ?. prebiddealpriority ) return ;
922
+ if ( ! bid ?. ext ?. prebiddealpriority || ! FEATURES . VIDEO ) return ;
920
923
const bidRequest = getBidRequest ( newBid . requestId , [ request . bidderRequest ] ) ;
921
924
const videoObj = deepAccess ( bidRequest , 'mediaTypes.video' ) ;
922
925
if ( videoObj ?. context != ADPOD ) return ;
@@ -999,7 +1002,7 @@ export const spec = {
999
1002
return false ;
1000
1003
}
1001
1004
// video ad validation
1002
- if ( bid . hasOwnProperty ( 'mediaTypes' ) && bid . mediaTypes . hasOwnProperty ( VIDEO ) ) {
1005
+ if ( FEATURES . VIDEO && bid . hasOwnProperty ( 'mediaTypes' ) && bid . mediaTypes . hasOwnProperty ( VIDEO ) ) {
1003
1006
// bid.mediaTypes.video.mimes OR bid.params.video.mimes should be present and must be a non-empty array
1004
1007
let mediaTypesVideoMimes = deepAccess ( bid . mediaTypes , 'video.mimes' ) ;
1005
1008
let paramsVideoMimes = deepAccess ( bid , 'params.video.mimes' ) ;
@@ -1284,7 +1287,7 @@ export const spec = {
1284
1287
switch ( newBid . mediaType ) {
1285
1288
case BANNER :
1286
1289
break ;
1287
- case VIDEO :
1290
+ case FEATURES . VIDEO && VIDEO :
1288
1291
newBid . width = bid . hasOwnProperty ( 'w' ) ? bid . w : req . video . w ;
1289
1292
newBid . height = bid . hasOwnProperty ( 'h' ) ? bid . h : req . video . h ;
1290
1293
newBid . vastXml = bid . adm ;
0 commit comments