Problem displaying video ads on Iphone - IMA-SDK

1,515 views
Skip to first unread message

Kigso Games

unread,
Oct 23, 2020, 12:16:19 PM10/23/20
to Interactive Media Ads SDK
Hello,

We are using the IMA-SDK with our own modified JS.

Everything is working well, aside from one problem. If we set it to show video only ads, they won't show on iPhone, they show on everything else, including iPad and Desktop.

As an example, when you hit the PLAY button on this game, it will trigger the ad, and you should see a video

We read we need some iOS related code in there which we do have, but it did not seem to help
    adsLoader.getSettings().setDisableCustomPlaybackForIOS10Plus(true);

Can anybody help?





IMA SDK

unread,
Oct 25, 2020, 10:53:08 PM10/25/20
to kigso...@gmail.com, ima...@googlegroups.com

Hi there,

Thank you for reaching out to us. 

Could you please confirm if you are using skippable ads? If not, setting the setDisableCustomPlaybackForIOS10Plus() to TRUE is not necessary. Infact, disabling "custom playback", however, will break your fullscreen implementation for iPhone web (more information here).

That being said, kindly set the setDisableCustomPlaybackForIOS10Plus value to FALSE (default value) or try not to use it at all, and see if that would solve the issue on your end.

Regards,


Google Logo
Sherwin Diesta
IMA SDK Team
 


ref:_00D1U1174p._5004Q26Bf3d:ref

Kigso Games

unread,
Oct 26, 2020, 6:11:37 AM10/26/20
to Interactive Media Ads SDK
I've tried using
ad_type=skippablevideo
ad_type=standardvideo
and also
ad_type=video

With TRUE and also FALSE with the same result on Iphone.

I actually just ran into an issue where with ad_type=skippablevideo it was having further issues as it's triggering our code which detects a lack of internet or ad blocker. Yet it's working absolutely fine on Android.

IMA SDK

unread,
Oct 26, 2020, 10:34:02 AM10/26/20
to kigso...@gmail.com, ima...@googlegroups.com
Hi there,

I work with Sherwin and will assist you. I tested the extracted ad tag in our Visual Suite Inspector. In Android Chrome and iOS Safari non skippable ads didn't show when ad_type=video or ad_type=skippablevideo. No ads showed when ad_type=standardvideo. On a Mac with Chrome non skippable ads showed when ad_type=standardvideo and only skippable ads showed when ad_type=video or ad_type=skippablevideo. This may occur because there's no non skippable inventory for iOS and Android. Could you add non skippable guaranteed delivery and see if the issue presents itself?

Regards,

Google Logo
Aryeh Baker
IMA SDK Team
 


ref:_00D1U1174p._5004Q26Bf3d:ref

Kigso Games

unread,
Oct 26, 2020, 2:44:15 PM10/26/20
to Interactive Media Ads SDK
Hi  Aryeh,

I'm not sure what you mean by "non skippable guaranteed delivery

Mark

IMA SDK

unread,
Oct 26, 2020, 3:24:52 PM10/26/20
to kigso...@gmail.com, ima...@googlegroups.com
Hi Mark,

I meant adding inventory such as House Line Items or any other deal you can make with advertisers to add inventory that doesn't skip on Android and iOS. This is to see if this is an ad inventory issue.

Kigso Games

unread,
Oct 27, 2020, 3:07:53 AM10/27/20
to Interactive Media Ads SDK
We don't have any advertisers that work with us, we rely on Google to provide those :) . I'm not sure how we would add these items and ensure they only appear on our site.

Kigso Games

unread,
Oct 27, 2020, 4:59:37 AM10/27/20
to Interactive Media Ads SDK
I've added 12 different versions of the integration, with a combination of TRUE and FALSE of the iOS setting in the JS, the three different settings for the adtype - standardvideo, skippablevideo and video, and a production version, and a version with adtest=on

I see video ads on iPad, Win Desktop, Android for all of these links, but in iPhone, nothing. (A few - 1,2,7 and 8 trip our detection of no internet/ad blocker which is incorrect so that needs to be looked at), not a single video ad on iphone.

Surely at a minimum we should see ads with adtest=on which would help understand if it was an inventory issue

IMA SDK

unread,
Oct 27, 2020, 7:51:51 AM10/27/20
to kigso...@gmail.com, ima...@googlegroups.com

Hi there,

Thank you for your message. As per our documentation, skippable ads are only supported on iOS 10+ when playsinline is used. That being said, it is required that your video player play content inline (not fullscreen), and that you disable custom playback on iPhone. You can check out the link below for more information.

https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/skippable-ads

Please let me know if you have further questions or clarifications.


Regards,


Google Logo
Sherwin Diesta
IMA SDK Team
 


ref:_00D1U1174p._5004Q26Bf3d:ref

Kigso Games

unread,
Oct 27, 2020, 8:54:09 AM10/27/20
to Interactive Media Ads SDK
Thanks Sherwin, When I saw this I was highly optomistic as we did not have the  playsinline , however it's still not displaying video ads.

Here's a couple of links, one with adtest=on, the other without adtest=on, both set to skippablevideo, both include playsinline in the HTML

Kigso Games

unread,
Oct 27, 2020, 9:02:26 AM10/27/20
to Interactive Media Ads SDK
To add to this, as above with the 12 links, it's not playing the non-skippable ads either

IMA SDK

unread,
Oct 27, 2020, 3:13:55 PM10/27/20
to kigso...@gmail.com, ima...@googlegroups.com
Hi there,

I tried 13 and 14 in iOS simulator and no video showed but an image showed for a few seconds on top left. When I extracted the ad tag from Network request and tried it in our Visual Suite inspector in iOS it ran a video ad. Note that this was a skippable ad so it doesn't address your original use case. Number 4 extracted VAST in the inspector works too in iOS Safari and those ads don't skip.

Could you try to set up your ad tag in our Advanced Sample and see if it works in iOS? If it does, then you can try to match your implementation against the Advanced Sample implementation. You may also reach out to Ad Manager Support to help you with tag set up server side.

Regards,

Google Logo
Aryeh Baker
IMA SDK Team
 


ref:_00D1U1174p._5004Q26Bf3d:ref

Kigso Games

unread,
Oct 28, 2020, 5:42:40 AM10/28/20
to Interactive Media Ads SDK
Hi Aryeh,

The issue is that we are not able to get any video ads to display, under any settings, whether skippable or not, both don't work. At this point I'm trying to get ANY videos ads to play so we can go from there. All the way up to the 14th link, there's nothing showing and I believe I've covered all combos.

I looked at the Ad Manager Support, but I get the message " Access to publisher support representatives isn't available to any of the Google Ad Manager networks associated with your account " 

Kigso Games

unread,
Oct 28, 2020, 6:04:44 AM10/28/20
to Interactive Media Ads SDK
To add to this. I set up the advanced sample here https://eu.kigso.com/adsensetest/games/advancedtest/advanced/ I've edited the index.html to populate with one of our tags. It does indeed play video on the iPhone

IMA SDK

unread,
Oct 28, 2020, 9:18:13 AM10/28/20
to kigso...@gmail.com, ima...@googlegroups.com
Hi Mark,

From this that our Advanced Sample runs the ad it seems that server side setup at least when adtest is on works. Unfortunately this forum can only support SDK side implementations and the correct forum is server side setup and ad inventory is the Ad Manager Forum.

For the SDK side, our recommendation is to match up your integration of the SDK with the Advanced Sample that you already implemented, for it is considered a correct integration of the SDK.

Kigso Games

unread,
Oct 28, 2020, 9:35:48 AM10/28/20
to Interactive Media Ads SDK
As we have a heavily modified SDK at our side we'll need to try and find out why it's not working for us, I guess there is something wrong in our JS. I thought this was the right forum with this being part of the SDK integration. I can post into the Ad Manager Forum, but not sure that's the right forum, is this an implementation or setup issue?
Message has been deleted

IMA SDK

unread,
Oct 28, 2020, 2:16:55 PM10/28/20
to kigso...@gmail.com, ima...@googlegroups.com
Hi Mark,

Unfortunately my connection to that forum is as good as yours. If you have an issue with our Sample apps or want to implement your use case in it we are equipped to assist you. The best we can offer regarding your app is the advice to match it with the integration that our Samples have and see how you are doing something different.

Kigso Games

unread,
Oct 28, 2020, 2:37:44 PM10/28/20
to Interactive Media Ads SDK
Hi Aryeh,

Understood. Getting the video to play using your advanced test code will certainly help us in tracking it down.

We have another person looking at this for us, but if they are unsuccessful we will need to find somebody with experience to resolve it. Do you have any resources that would help us find a freelancer with the appropriate experience?

Thanks
Mark

IMA SDK

unread,
Oct 28, 2020, 3:50:24 PM10/28/20
to kigso...@gmail.com, ima...@googlegroups.com
Hi Mark,

Unfortunately we don't have a list of IMA SDK experts for hire. We do have our Sample appsguide to implementation and SDK Architecture explanation and other resources you can get on the side and top of those pages. 

Kigso Games

unread,
Nov 23, 2020, 1:58:57 PM11/23/20
to Interactive Media Ads SDK
We have a made a little progress but need some more help. It appears that we are receiving a CORS error from Google.

This CORS policy issue is an iOS thing, it works on other platforms. I presume the iOS client is not happy with the cross domain

See attached screenshot.

Is this something that is an issue at our side with the lack of access-control-allow-origin or Google?

Thanks

Mark

CORS policy.png

Kigso Games

unread,
Nov 23, 2020, 2:49:19 PM11/23/20
to Interactive Media Ads SDK
I checked out server, we actually had  access-control-allow-origin  with value *. I also tried removing all custom headers. Same problem still 

IMA SDK

unread,
Nov 24, 2020, 2:01:40 AM11/24/20
to kigso...@gmail.com, ima...@googlegroups.com

Hi there,

Thanks for your message. With regard to access-control-allow-origin, I’m afraid this is something that is beyond the scope of this forum. You’ll have to reach out to your ad provider for further assistance regarding this. You might want to check this IMA SDK documentation for more information about this subject.


Regards,


Google Logo
Sherwin Diesta
IMA SDK Team
 


ref:_00D1U1174p._5004Q26Bf3d:ref

Kigso Games

unread,
Nov 24, 2020, 5:26:15 AM11/24/20
to Interactive Media Ads SDK
I tried both ways and it made no difference anyway. The problem is why are we receiving a CORS error which is stopping Adsense video ads from being displayed (this is only on iPhone)

Thanks

Mark

IMA SDK

unread,
Nov 24, 2020, 9:32:40 AM11/24/20
to kigso...@gmail.com, ima...@googlegroups.com
Hi Kigso,

Thank you for response back. I work along with Aryeh and Sherwin. As such I will be helping you today with this issue. I just wanted to make sure that you also checked out this page of the IMA that mentions the CORS requirements. Beyond that we would have no other information that we could pass on.

Regards,
Google Logo
William Pescherine
IMA SDK Team
 

 

ref:_00D1U1174p._5004Q26Bf3d:ref

Kigso Games

unread,
Nov 25, 2020, 6:03:21 AM11/25/20
to Interactive Media Ads SDK
Thanks for the info William. I did check the CORS requirements, and I believe we're satisfying the requirements, our IIS server is set to send the header Access-Control-Allow-Origin: * which should allow it

IMA SDK

unread,
Nov 25, 2020, 12:42:40 PM11/25/20
to kigso...@gmail.com, ima...@googlegroups.com
Hi Mark,

I extracted the ad tag from https://eu.kigso.com/adsensetest/games/True_skippablevideo/ and played it in our VAST Inspector on an iPhone Simulator and the ads ran. This implies that there's a problem with your implementation that's causing this issue. You can to match your implementation with our Sample apps.

Regards,

Google Logo
Aryeh Baker
IMA SDK Team
 


ref:_00D1U1174p._5004Q26Bf3d:ref

Kigso Games

unread,
Nov 25, 2020, 1:10:44 PM11/25/20
to Interactive Media Ads SDK
Hi Aryeh,

Thanks for the follow up. 

I do also have the advanced code demo install on her server which is doing the same thing. We did find our code worked on a simulator, but not on a physical iPhone.

The advanced demo using our ad tag does indeed work on a physical iPhone, so this should in theory eliminate any issues with the headers sent from the server

We are seeing the CORS error, but we know it's not the headers, so we're somewhat at a loss

Mark

IMA SDK

unread,
Nov 25, 2020, 4:18:32 PM11/25/20
to kigso...@gmail.com, ima...@googlegroups.com
Hi Mark,

I was looking through your code and I noticed you didn't set your contentElement to play inline, and you are using a variation of our guide when adsLoader.getSettings().setDisableCustomPlaybackForIOS10Plus(true); after adsLoader is created You can set this earlier. You may want to follow the guide to skippable ads on iPhone and change your HTML and gamedisplay.JS accordingly. 

Kigso Games

unread,
Nov 26, 2020, 1:20:03 PM11/26/20
to Interactive Media Ads SDK
Hi Aryeh,

Thanks for the reply. I went back to the advanced test code that you provide, and created two new versions, one for standard video and one for skippable.


The STANDARD played a video, the SKIPPABLE would not until I added playsinline
I see that STANDARD will also work with playsinline, so we can use it for both.

I then made sure I had the same settings for the in game implementation, however it won't play video ads still :(

Maybe you would be kind enough to look at the https://eu.kigso.com/adsensetest/games/True_skippablevideo_playsinline2/ to see if there is anything obvious?

Thanks again

Mark

IMA SDK

unread,
Nov 27, 2020, 12:42:39 AM11/27/20
to kigso...@gmail.com, ima...@googlegroups.com

Hi there,

Thank you for getting back to us on this. The behavior that you are seeing regarding the skippable ads only works with playsinline is an intended behavior. Skippable ads are only supported (on iOS 10+) when playsinline is used.

With regard to the link below. The ad seems to work fine as I can see the ad being served properly (attached screenshot). Could you please confirm on your end if the issue is still happening on this page?

https://eu.kigso.com/adsensetest/games/True_skippablevideo_playsinline2/

Also, you might want to check the below documentation for more information regarding the ad’s behavior and the appropriate settings when it comes to fullscreen and skippable ads.

https://ads-developers.googleblog.com/2017/06/new-custom-playback-apis-for-ima-html5.html


Regards,

 

Google Logo
Sherwin Diesta
IMA SDK Team
 


ref:_00D1U1174p._5004Q26Bf3d:ref
img001.png

Kigso Games

unread,
Nov 27, 2020, 7:10:56 AM11/27/20
to Interactive Media Ads SDK
https://eu.kigso.com/adsensetest/games/True_skippablevideo_playsinline2/  is not showing any video ads at this side, and we have checked in various geo's

What we have noticed is that it will work on an emulator, but if you try it on a physical device it won't work. It looks like you tried it on an emulator.

Can you try on a physical device?

IMA SDK

unread,
Nov 30, 2020, 9:50:30 AM11/30/20
to kigso...@gmail.com, ima...@googlegroups.com
Hi Mark,

On an iPhone 8 plus running iOS 14.0 and on a simulator running iOS 14.2 I received in the https://eu.kigso.com/adsensetest/games/True_skippablevideo_playsinline2/ sample ima Error code 400. According to our Error code explainer this may occur when the MediaFile is not a valid video file of the specified format, or because the browser restricted autoplay with sound, or another unknown reason. If it's an Autoplay issue we have a guide.

Regards,

Google Logo
Aryeh Baker
IMA SDK Team
 


ref:_00D1U1174p._5004Q26Bf3d:ref

Kigso Games

unread,
Dec 1, 2020, 6:44:15 AM12/1/20
to Interactive Media Ads SDK
Thanks for the additional info, it helped a little, although I'm not sure what the cause is, I added MUTED  <video id="contentElement" playsinline muted> into the example below, and it plays videos now


So the issue is in the auto play with sound on physical iPhones.

With that now being said is there any further guidance you could offer towards resolving such an issue?

Many thanks

Mark

Kigso Games

unread,
Dec 1, 2020, 9:24:29 AM12/1/20
to Interactive Media Ads SDK
I did a little more testing and it became a little more confusing.

I added playsinline to the advanced test and found that it will play video on a physical iPhone, with sound, muted NOT required

Same settings inside a game. Set to trigger on PLAY button (also has timer setting), no ad displays, but if I use the MENU, back to HOME and hit PLAY again, it actually plays a video with sound.

I thought this might be something to do with interaction with the page before the ad plays, however I have also tried to load the game,  touch the screen which triggers the music, and then PLAY, but no video plays.

I also tested with muted and it plays videos but only muted which is not ideal, we need sound to play

So it's a little confusing as to why the advanced test will play them (I was thinking that the hitting of the PLAY button might be something to do with it as it's not auto playing the initial video and there is some interaction)

Any ideas?

Thanks

Mark

IMA SDK

unread,
Dec 1, 2020, 1:26:34 PM12/1/20
to kigso...@gmail.com, ima...@googlegroups.com
Hi Mark,

Autoplay in general is beyond our scope. With that being said, here's From Apple some information on autoplay that may be useful from here- https://webkit.org/blog/7734/auto-play-policy-changes-for-macos/  :
  • Auto-play restrictions are granted on a per-element basis. Change the source of the media element instead of creating multiple media elements if you want to play multiple videos back to back (or play a pre-roll ad with sound, followed by the main video).
  • Don’t play ads without showing media controls because they may not auto-play and users will have no way of starting playback.
It appears that the game has to be loaded and paused and the play button has to be in the element that you want to play the game and ad in. Here is also in iOS - https://webkit.org/blog/6784/new-video-policies-for-ios/. Maybe if the start button is part of the parent element of the ad player and game player it would help, but this is beyond our expertise. Playsinline and setDisableCustomPlaybackForIOS10Plus(true) make for a separate element from content element playing an ad.

Kigso Games

unread,
Dec 2, 2020, 9:59:20 AM12/2/20
to Interactive Media Ads SDK
Thanks again. Although that does not appear to work well. We can't put media control elements on a video ad, and we do need it to auto play. I presume everybody else has the same issue so we hoping Google would have a known clear solution to this :)

IMA SDK

unread,
Dec 2, 2020, 10:36:59 AM12/2/20
to kigso...@gmail.com, ima...@googlegroups.com
Hi Mark,

Your game requires you to press the play button. You don't need autoplay because the user already clicked. That click has to register as agreement by user to play ads. The element that receives the click has permission to play sound. In our Advanced Sample (download here ), the button is in the adContainer and becomes hidden when play is pressed.

Kigso Games

unread,
Dec 2, 2020, 10:45:57 AM12/2/20
to Interactive Media Ads SDK
Ah I see. 

We do have multiple places where the ads are also played inside the game, such as timed, end of level, loss of life, end of game, but to get to any of these the play button would need to be pressed to start the game, so in theory, if the play button and ad are in the same element then pressing play would then allow all of these other ads to also play with sound, right?

Thanks

Mark

IMA SDK

unread,
Dec 2, 2020, 2:06:50 PM12/2/20
to kigso...@gmail.com, ima...@googlegroups.com
Hi Mark,

This is a general programming issue not specific to the IMA SDK. I hope your theory works and that your game becomes useable with ads on iPhone devices.
Reply all
Reply to author
Forward
0 new messages