Skip to content

Commit

Permalink
Merge pull request googleads#184 from jgubman/bugfix/dont-call-resize…
Browse files Browse the repository at this point in the history
…-over-and-over

store currentWidth and currentHeight when checkForResize fires
  • Loading branch information
shawnbuso committed Mar 9, 2016
2 parents 6603dee + f37cb54 commit 6f73e1a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/videojs.ima.js
Original file line number Diff line number Diff line change
Expand Up @@ -816,8 +816,9 @@

if (adsManager && (currentWidth != adsManagerDimensions.width ||
currentHeight != adsManagerDimensions.height)) {
adsManager.resize(player.ima.getPlayerWidth(),
player.ima.getPlayerHeight(), google.ima.ViewMode.NORMAL);
adsManagerDimensions.width = currentWidth;
adsManagerDimensions.height = currentHeight;
adsManager.resize(currentWidth, currentHeight, google.ima.ViewMode.NORMAL);
}
}

Expand Down

0 comments on commit 6f73e1a

Please sign in to comment.