Change video AD scaling behavior in iOS

73 views
Skip to first unread message

Maxence Bourdin

unread,
Apr 14, 2023, 2:46:35 AM4/14/23
to Interactive Media Ads SDK
Hello,

I'm currently implementing the ima SDK for iOS and tvOS. I'm trying to change the video AD scaling behavior to resizeAspectFill. 

I've already done the Android implementation which look like that: 
f (scaleMode == "zoom") { playerView?.resizeMode = AspectRatioFrameLayout.RESIZE_MODE_ZOOM } else { playerView?.resizeMode = AspectRatioFrameLayout.RESIZE_MODE_FIT }

Does a similar option exist on iOS?

Thanks
Max

IMA SDK

unread,
Apr 14, 2023, 8:34:09 AM4/14/23
to maxencebo...@gmail.com, ima...@googlegroups.com
Hi Max,

Would you able to elaborate your use case and what are you trying to achieve? Are you trying to change the size and location of the initial unit like for fullscreen or jump into a floating position on scroll out-of-view?

Regards,
Google Logo IMA SDK Team

 

ref:_00D1U1174p._5004Q2kVRy2:ref

Maxence Bourdin

unread,
Apr 16, 2023, 9:14:59 PM4/16/23
to Interactive Media Ads SDK
Hi,

Thanks for the quick reply. 

In my case I have a view of the following dimensions: 500 width and 500 height. Now let's say my video AD aspect ratio is 16:9. On Android, with ExoPlayer, when I'm setting the resizeMode to RESIZE_MODE_ZOOM the video will be cropped to fit inside the view and if I set to RESIZE_MODE_FIT the video dimensions will decrease to maintain the aspect ratio.

Now, I'm not able to achieve the same result on iOS, do you think there any way to get the same behavior?

Regards,
Max

IMA SDK

unread,
Apr 17, 2023, 4:22:31 AM4/17/23
to maxencebo...@gmail.com, ima...@googlegroups.com

Hi Maxence,

It appears that your concern is related to the video scaling/resizing for your video player. I found this Apple documentation: (https://developer.apple.com/documentation/avfoundation/avlayervideogravity/1385607-resizeaspectfill) on how to use the resizeaspectfill. If you have any questions regarding this, it would be best to raise your concern to the Apple developer support team: https://developer.apple.com/support/

Let me know if you have any questions or if you'd like to request for a method via the IMA SDK for iOS for the video ad scaling behavior you mentioned, kindly provide us with a business use-case why you need the said feature.

Regards,

Reply all
Reply to author
Forward
0 new messages