File tree Expand file tree Collapse file tree 1 file changed +23
-4
lines changed Expand file tree Collapse file tree 1 file changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -35,17 +35,36 @@ function VertamediaAdapter() {
35
35
}
36
36
37
37
bidRequest = bid ;
38
- bidRequest . width = parseInt ( bid . sizes [ 0 ] , 10 ) || undefined ;
39
- bidRequest . height = parseInt ( bid . sizes [ 1 ] , 10 ) || undefined ;
38
+
39
+ let size = getSize ( bid . sizes ) ;
40
+
41
+ bidRequest . width = size . width ;
42
+ bidRequest . height = size . height ;
40
43
41
44
return {
42
45
aid : bid . params . aid ,
43
- w : parseInt ( bid . sizes [ 0 ] , 10 ) || undefined ,
44
- h : parseInt ( bid . sizes [ 1 ] , 10 ) || undefined ,
46
+ w : size . width ,
47
+ h : size . height ,
45
48
domain : document . location . hostname
46
49
} ;
47
50
}
48
51
52
+ function getSize ( requestSizes ) {
53
+ var parsed = { } ,
54
+ size = utils . parseSizesInput ( requestSizes ) [ 0 ] ;
55
+
56
+ if ( typeof size !== 'string' ) {
57
+ return parsed ;
58
+ }
59
+
60
+ let parsedSize = size . toUpperCase ( ) . split ( 'X' ) ;
61
+
62
+ return {
63
+ width : parseInt ( parsedSize [ 0 ] , 10 ) || undefined ,
64
+ height : parseInt ( parsedSize [ 1 ] , 10 ) || undefined
65
+ } ;
66
+ }
67
+
49
68
/* Notify Prebid of bid responses so bids can get in the auction */
50
69
function handleResponse ( response ) {
51
70
var parsed ;
You can’t perform that action at this time.
0 commit comments