Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resize handler now resizes #555

Merged
merged 2 commits into from Mar 7, 2018
Merged

Conversation

steevee
Copy link
Contributor

@steevee steevee commented Mar 7, 2018

Fix for #554

@shawnbuso shawnbuso self-requested a review March 7, 2018 16:51
src/ad-ui.js Outdated
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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This call will still fail since AdUi doesn't own adsManager, sdkImpl does. I think to fix this we actually want to move this whole method to SdkImpl, and in controller.js instead of calling adUi.onPlayerResize() we want to call sdkImpl.onPlayerResize().

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, that's a blatant oversight on line 446 that should read:

this.controller.sdkImpl.adsManager.resize(width, height, google.ima.ViewMode.NORMAL);

However, point taken. Will refactor into sdkImpl.onPlayerResize()

steevee added 2 commits March 7, 2018 17:47
Fixes:
```
  1) Basic Tests chrome-local
       Displays skip ad button chrome-local:
     WebDriverError: unknown error: call function result missing 'value'

  2) Basic Tests chrome-local
       Nonlinear chrome-local:
     WebDriverError: unknown error: call function result missing 'value'
```
@steevee
Copy link
Contributor Author

steevee commented Mar 7, 2018

@shawnbuso is this what you had in mind?

@shawnbuso
Copy link
Contributor

Yea that's perfect, thanks!

@shawnbuso shawnbuso merged commit a10e82f into googleads:master Mar 7, 2018
@steevee steevee deleted the autoresize branch March 7, 2018 18:27
@steevee
Copy link
Contributor Author

steevee commented Mar 7, 2018

Nice - my first foray into this project post the v1.0 refactor, much neater to work with! 👍

@shawnbuso
Copy link
Contributor

Glad to hear! I also like the workflow a lot more post-v1 :)

bustbr pushed a commit to bustbr/videojs-ima that referenced this pull request Apr 24, 2018
* Resize handler now resizes - fix for googleads#554

* Fix failing tests due to outdated chromedriver.
Fixes:
```
  1) Basic Tests chrome-local
       Displays skip ad button chrome-local:
     WebDriverError: unknown error: call function result missing 'value'

  2) Basic Tests chrome-local
       Nonlinear chrome-local:
     WebDriverError: unknown error: call function result missing 'value'
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants