Google Ima, resize

508 views
Skip to first unread message

sung....@admaru.com

unread,
Aug 11, 2017, 4:59:24 PM8/11/17
to Interactive Media Ads SDK
Hi.

I'm using video ads successfully til now.
But I have some issue with 
adsManager.resize.

What I did is:

<div id='admaru_videos' style='width:550px; display=none;'></div>
<video id='video' style='width=550px; height=412px; display=none; opacity=0' autoplay playsinline muted></video>

videoContent = document.getElementById('video');
adDisplayContainer =
      new google.ima.AdDisplayContainer(
          document.getElementById('videos'), videoContent);

requestAds ...
onAdsManagerLoaded ...

and at some point, I try to resize it.
adsManager.resize(300,250,google.ima.ViewMode.NORMAL);
and
adsManager.resize(550,412,google.ima.ViewMode.NORMALL);


550x412 -> 300x250 might be fine.
but 300x250 to 550x412  case have some problem.
The video is just stopped for some reasons.

Is there some solution about this problem?
and does resize process take few seconds ? bcs resize process take some time when I implement it.

Joshua Lagonera (IMA SDK Team)

unread,
Aug 14, 2017, 3:22:57 AM8/14/17
to Interactive Media Ads SDK
Hi there,

This sounds like an implementation issue on your side. I tried using the same sizes you mentioned on our Simple Sample app and I was not able to reproduce the issue when resizing up or down. Would you be able to provide us the following information?
  • A sample snippet showing your implementation where the issue can be replicated.
  • Any affected Ad Tags
  • Any warning/error logs printed on the console.
Regards,
Joshua Lagonera
IMA SDK Team

Joshua Lagonera (IMA SDK Team)

unread,
Aug 21, 2017, 6:32:44 AM8/21/17
to Interactive Media Ads SDK
Hi there,

Are you still experiencing the issue? Kindly let us know if you still need assistance from us and provide us the aforementioned information.

Regards,
Joshua Lagonera
IMA SDK Team

On Saturday, August 12, 2017 at 4:59:24 AM UTC+8, sung....@admaru.com wrote:

sung....@admaru.com

unread,
Aug 21, 2017, 5:00:42 PM8/21/17
to Interactive Media Ads SDK
Hi.

I solved problem, and it works well.

Thank you.

Sincerely,

SungHoon Chung

dh...@gamezop.co

unread,
Nov 16, 2018, 3:29:43 AM11/16/18
to Interactive Media Ads SDK
Hi Joshua

I am experiencing a different case here.
 
When i am calling adManager.resize on window event listener resize, it reloads the ad. This is happening on Safari and some other browsers. It works well on chrome.


Any solution for this 

Thanks

dh...@gamezop.co

unread,
Nov 16, 2018, 4:28:04 AM11/16/18
to Interactive Media Ads SDK
Hi Josh

I found a solution for this. This was happening due to safari fullscreen implementation. When safari goes fullscreen it reduces the size of window and then makes it full. adManager.resize when called with dimensions which do not match with safari dimensions, adManager throws adError NONLINEAR_DIMENSIONS_ERROR. For all these types of error, we were requesting ads again. Which in turn refreshes the ad on every fullscreen request on safari.

Now, the ad closes as adManager.resize throws an error. Any other solution would be appreciated.

Thanks
Dhruv

Bharani Cherukuri (IMA SDK Team)

unread,
Nov 16, 2018, 5:14:38 PM11/16/18
to Interactive Media Ads SDK
Hi Dhruv,

Thank you for reaching out to us. It seems the error is being caused by your non-linear ads dimensions. A solution would be to handle the error so that it doesn't cause the ads to be requested again. To handle this error you should register to the AD_ERROR event and implement the onAdError function as such:

function onAdError(adErrorEvent) {
if (adErrorEvent.getError().getType() == google.ima.AdError.Type.NONLINEAR_DIMENSIONS_ERROR) {
/*Handle error here */
}
}

Regards,
Bharani Cherukuri
IMA SDK Team
Reply all
Reply to author
Forward
0 new messages