Need the ability to autoplay IMA ads with sound in iOS devices

86 views
Skip to first unread message

Husain Amravatiwala

unread,
Aug 17, 2023, 12:00:54 PM8/17/23
to Interactive Media Ads SDK
Hi,
I am using IMA SDK to play instream video ads. 
In iOS, when I try to autoplay ads with volume > 0, then the ad renders and closes immediately afterwards because of the browser's autoplay policies.
it does not play at all.

Currently, I am unable to correctly determine the document's policy state through dummy video injection or any content video mute status.

I want to in general, if the autoplay with sound fails, I want IMA SDK to attempt second time in muted state.
This I want to do without making a 2nd ad request.

Is there currently a way to do so?

IMA SDK

unread,
Aug 17, 2023, 4:11:08 PM8/17/23
to husain....@gmail.com, ima...@googlegroups.com

Hi,

Thank you for reaching out to us.

As per this documentation guide (https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/autoplay), it mentioned that Autoplay is supported on the desktop and on mobile web devices. As of Chrome 53 and iOS 10, Android and iPhone support inline muted autoplay. Safari 11 for Desktop has changed how it handles autoplay videos. Google Chrome made a similar change in April of 2018. Since you're encountering this in the iOS, can you provide us your sample app project or modify or replicate it in our sample app (https://github.com/googleads/googleads-ima-ios) and steps to replicate so we can further investigate this in our end? In addition to that, you've mentioned that this is "because of the browser's autoplay policies", with that, can you provide us what browser are you referring to?

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:

1. Navigate to https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=IMA+SDK&entry.460850823=5004Q00002ntSwqQAE&entry.80707362=00194142

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.

This message is in relation to case "ref:_00D1U1174p._5004Q2ntSwq:ref"

Thanks,
 
Google Logo IMA SDK Team


Message has been deleted
Message has been deleted

Husain Amravatiwala

unread,
Aug 18, 2023, 10:52:55 AM8/18/23
to Interactive Media Ads SDK
Hi,
Thanks for replying promptly.
Some more info:
  • I am using IMA Web SDK.
  • The objective is to play ad in iOS with sound whenever possible.
  • I have not used any content in the demos provided. I am directly initializing IMA SDK and playing the ads on page load.
  • Tested on iOS(100) > Safari(100)
  • "setAdWillAutoPlay" has been set to true. 
    adsRequest.setAdWillAutoPlay(true);
Observations:
  1. Scenario 1:
    If the volume is not set with the "adsManager", then the ad does not play.
    PFA: scenario1.html

  2. Scenario 2:
    If the volume is set to 0, then the ad will play every time.
    PFA: scenario2.html

  3. Scenario 3:
    A dummy video is injected, and if the dummy video plays with sound, then the volume is set as 1 otherwise set as 0 with the "adsManager"
    But whenever the volume is set to 1, the ad does not play.
    PFA: scenario3.html

  4. We have deduced from the observations that the ad does not play with sound anytime in iOS.
Please find attached example files for your reference.
https://drive.google.com/drive/folders/1o_fXyf1Tsck9ffKLrdaoUmZz7X5YDJUg?usp=sharing

IMA SDK

unread,
Aug 18, 2023, 2:23:59 PM8/18/23
to husain....@gmail.com, ima...@googlegroups.com

Hi,

Thank you for your response.

We've checked the following files scenario that you've provided, however, all scenarios are working properly in our end. With that, can you provide us your screen recording of replication as well as the browser you're using? This will help us to further investigate this behavior.

Reply all
Reply to author
Forward
0 new messages