Skip to content

Commit

Permalink
Resize handler now resizes - fix for googleads#554
Browse files Browse the repository at this point in the history
  • Loading branch information
steevee committed Mar 7, 2018
1 parent 6ff9f96 commit bb6a74c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/ad-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,9 +438,9 @@ AdUi.prototype.onNonLinearAdLoad = function() {
* @param {number} height The post-resize height of the player.
*/
AdUi.prototype.onPlayerResize = function(width, height) {
if (this.adsManager) {
this.adsManagerDimensions.width = width;
this.adsManagerDimensions.height = height;
if (this.controller.sdkImpl.adsManager) {
this.controller.sdkImpl.adsManagerDimensions.width = width;
this.controller.sdkImpl.adsManagerDimensions.height = height;
/* global google */
/* eslint no-undef: 'error' */
this.adsManager.resize(width, height, google.ima.ViewMode.NORMAL);
Expand Down
2 changes: 1 addition & 1 deletion src/player-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ PlayerWrapper.prototype.checkForResize = function() {
currentHeight != this.vjsPlayerDimensions.height) {
this.vjsPlayerDimensions.width = currentWidth;
this.vjsPlayerDimensions.height = currentHeight;
this.controller.onPlayerResize();
this.controller.onPlayerResize(currentWidth, currentHeight);
}
};

Expand Down

0 comments on commit bb6a74c

Please sign in to comment.