Skip to content

Commit

Permalink
ShareThrough Bid Adapter : fix playerSize (prebid#10011)
Browse files Browse the repository at this point in the history
* fix sharethrough playersize

* fix unit test

---------

Co-authored-by: Reinout Stevens <[email protected]>
  • Loading branch information
2 people authored and Michele Nasti committed Aug 25, 2023
1 parent f37087b commit e1e70e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/sharethroughBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ export const sharethroughAdapterSpec = {
if (videoRequest) {
// default playerSize, only change this if we know width and height are properly defined in the request
let [w, h] = [640, 360];
if (videoRequest.playerSize && videoRequest.playerSize[0] && videoRequest.playerSize[1]) {
[w, h] = videoRequest.playerSize;
if (videoRequest.playerSize && videoRequest.playerSize[0] && videoRequest.playerSize[0][0] && videoRequest.playerSize[0][1]) {
[w, h] = videoRequest.playerSize[0];
}

impression.video = {
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/sharethroughBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ describe('sharethrough adapter spec', function () {
api: [3],
mimes: ['video/3gpp'],
protocols: [2, 3],
playerSize: [640, 480],
playerSize: [[640, 480]],
startdelay: 42,
skipmin: 10,
skipafter: 20,
Expand Down

0 comments on commit e1e70e6

Please sign in to comment.