[iOS] Video size is incorrect when the view is partially off-screen

123 views
Skip to first unread message

Alex Huang

unread,
Jul 9, 2024, 6:31:14 AMJul 9
to Interactive Media Ads SDK
Hi team, 

I am encountering an issue with the IMA iOS SDK (v3.22.1) related to the sizing of the video view. Here are the details:

Problem Description

When my video container is partially off-screen, the loaded video view does not fill the entire container as expected. Instead, it appears with an incorrect size, not extending to fill the whole container.
wrong_size.png

However, if the video container is entirely within the screen's boundaries, the video view loads correctly and fills the container as intended.

correct_size.png

Steps to Reproduce
  1. Set up a video container that is partially positioned outside the visible screen area.
  2. Load a video ad using the IMA iOS SDK.
  3. Observe that the video view does not fill the container correctly.
Attachments

Attachments can be found here: 
https://drive.google.com/drive/u/1/folders/1b5tdikwo0W4cwtgvkV0cvj7kVPTHalzb

  • IMA_video_ad_correct_size.mp4
  • IMA_video_ad_wrong_size.mp4
  • AdVideoPlayer(abridged version).swift

Could you please help investigate this issue and provide guidance on how to ensure the Video view fills the container correctly, even when part of the container is off-screen? Your assistance would be greatly appreciated.

Best regards,
Alex Huang

IMA SDK

unread,
Jul 9, 2024, 6:56:15 PMJul 9
to alexx...@gmail.com, ima...@googlegroups.com
Hi Alex,

Thanks for contacting IMA SDK Support Team.

Are you using collection view inside table view?  I've tried running wih Advance Sample Code and did some customization but did not replicate this issue.
Could you check once all the constraints given properly  ?
If possible share your whole sample project/ use Advance Sample code to replicate issue with us for further investigation ?
Kindly provide in below link.

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=5004Q00002tJoZhQAK&entry.80707362=00245744

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:!00D1U01174p.!5004Q02tJoZh:ref" (ADR-00245744)

Thanks,
 
Google Logo IMA SDK Team


Tzu-Hsun Huang

unread,
Jul 12, 2024, 6:28:04 AMJul 12
to Interactive Media Ads SDK
> 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:
I've uploaded the files in the original post to that link (Google Ads Developer Support Form for Large Attachments). 


> I've tried running wih Advance Sample Code and did some customization but did not replicate this issue.
I apologize for not having built a reproducible sample app yet. Could you please share the customized sample app you mentioned? It would be helpful, and I can also attempt to reproduce the issue on this app.


>Are you using collection view inside table view?
The issue can be reproducible in both scenarios:
  • A Horizontal ScrollView with a StackView (ad cards are added to this StackView) inside a CollectionView.
  • A UIView (the ad card) inside a Vertical ScrollView with a StackView.

Btw, here is an important new findings.
  • This issue was introduced after we did a migration for Google iOS IMA from 3.18.4 to 3.22.1 (just a version bump, no other code change)

IMA SDK

unread,
Jul 15, 2024, 8:06:37 AMJul 15
to alexx...@gmail.com

Hi Alex,

Thank you for providing more information.

I had also ran Advance Sample in 3.18.4 and 3.22.1 versions and the mentioned issue is not replicating. There is no seperate customized sample app, we have made some changes to the Advance Sample. Change is added the collectionView inside a tableView and the issue is not replicating. 

For us to investigate this issue further we would require the sample project to debug, find the root cause and may provide the solution 

You can provide the following details via reply privately to the author option or directly provide it to the link below.

Tzu-Hsun Huang

unread,
Jul 30, 2024, 1:02:58 AMJul 30
to Interactive Media Ads SDK
Hi team, I've forked the Advance Sample and added a scroll view and stack view as the container for the video view.
The repo is available here: https://github.com/alexpasta/googleads-ima-ios-forked

In this repo, I can reproduce a similar issue. Please refer to the recordings:
- ima_3.18.5.mp4: No issue
ima_3.22.1_in_screen.mp4: No issue
ima_3.22.1_off_screen.mp4: Issue happened
rendor_issue.png

Although the situation is not exactly the same as the one encountered in the real project, we can still observe the following:

  • When using IMA SDK 3.18.5, the video view is fully rendered even when it is partially off-screen.
  • When using IMA SDK 3.22.1, if the video view is partially off-screen, the "Learn More" label is rendered in the wrong position. (In the real project, the video also shrinks, but this phenomenon cannot be reproduced in this sample project for now.)




ima_3.18.5.mp4
ima_3.22.1_off_screen.mp4
ima_3.22.1_in_screen.mp4

IMA SDK

unread,
Jul 30, 2024, 6:37:38 AMJul 30
to ima...@googlegroups.com
Hi,

Thanks for providing details.
I am able to replicate this scenario and raise this concern to the team. 
I will update you once i get any resolution in this issue, Meanwhile, For time being use table view and header tableView instead scrollView and VStack.

IMA SDK

unread,
Aug 5, 2024, 11:39:46 AMAug 5
to ima...@googlegroups.com
Hi,

I've checked this thing in team and found that SDK is not setting these values. I would suggest to contact Ad Manager account representative and asked to raise feature request for this.

Thanks

Tzu-Hsun Huang

unread,
Aug 5, 2024, 12:05:21 PMAug 5
to Interactive Media Ads SDK
>I've checked this thing in team and found that SDK is not setting these values.

Thank you for your message. Could you please clarify which specific values you are referring to? 

IMA SDK

unread,
Aug 5, 2024, 12:17:15 PMAug 5
to ima...@googlegroups.com
Hi,

While investigating this issue i have observed wrong dimension is sending in googlesyndication api when loading ads inside scroll view + VStack View.

Could you elaborate this thing to Ad Manager account representative and asked to raise feature request for this.
In case you face any other issue in IMA SDK, kindly contact us again.

Tzu-Hsun Huang

unread,
Aug 5, 2024, 1:52:00 PMAug 5
to Interactive Media Ads SDK
Hi, thank you for the clarification. I have a few questions to better understand the situation:
  1. Could you explain why this issue is related to Ad Manager (Note: we're not using Google Ad Manager to request ads. The video ads are hosted by our own ad server.)? In the provided sample project, what role does Ad Manager play in the dimension issue?
  2. Is the problem potentially due to the VAST XML used in the sample project missing dimension information? If so, could you specify which dimensions or elements are causing the issue?
  3. Given that this issue only occurs with IMA SDK version 3.22.1 and not with version 3.18.4. Does this indicate that a change made between these versions might have introduced this bug?

IMA SDK

unread,
Aug 5, 2024, 3:21:03 PMAug 5
to ima...@googlegroups.com

Hi,

Thank you for getting back to us.

I will check with our team regarding your issue and one of my team members will reach out to you once we have an update on this. Meanwhile, your patience is highly appreciated.

IMA SDK

unread,
Aug 7, 2024, 11:15:43 AMAug 7
to ima...@googlegroups.com
Hi Tzu-Hsun,

Unfortunately I think we may have been a little over-eager in the assumption that the issue was caused by the Ad Manager servers. I'm pushing this back to our engineers to do some deeper investigation.

Thank you for your patience.

Greg Schoppe
IMA SDK Team

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tJoZh:ref" (ADR-00245744)

Thanks,
 
Google Logo
Greg Schoppe
IMA SDK Team


Tzu-Hsun Huang

unread,
Aug 7, 2024, 11:32:02 AMAug 7
to Interactive Media Ads SDK
Hi Greg,
Got it. No worries. Thanks for the update!

Tzu-Hsun Huang

unread,
Sep 29, 2024, 4:05:02 AMSep 29
to Interactive Media Ads SDK
Hi Team, 

We’ve continued to receive feedback and complaints from users/advertisers on our side due to this issue. Unfortunately, we’re unable to roll back the IMA SDK to versions prior to 3.22.0, as older versions do not comply with Apple’s latest policy.
(Apple now requires any third-party libraries used in apps to include a PrivacyInfo.xcprivacy file starting May 1, 2024.)

I was wondering if there have been any updates on the investigation.
We appreciate your support and look forward to your response. Thank you!

IMA SDK

unread,
Oct 3, 2024, 1:56:44 PMOct 3
to ima...@googlegroups.com

Hi Tzu-Hsun,

I've refiled this issue with our engineers as a regression, but it is still being investigated. I've reached out to the developer assigned to the case for an update, and will share as soon as I know more.

Thanks,



Greg Schoppe
IMA SDK Team
 

Reply all
Reply to author
Forward
0 new messages