Skip to content

Update "Resolves a retain cycle and memory leak involving the RCTVideo instance when using Google IMA ads in react-native-video." #4621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MdAbubakar
Copy link

Update #4574

iOS Google IMA Ads Container Not Resizing on Fullscreen or Rotation — Fixed by Adding AutoresizingMask

After recent changes to Google IMA integration, the ad container on iOS was not resizing when the player entered/exited fullscreen or changed orientation when using custom controls.

Cause:
The adContainerView added inside requestAds() had a fixed frame without autoresizingMask, causing layout issues.

Fix:
Added:
adContainerView.autoresizingMask = [.flexibleWidth, .flexibleHeight]

let adContainerView = UIView(frame: _video.bounds)
adContainerView.backgroundColor = .clear
adContainerView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
_video.addSubview(adContainerView)

Copy link
Author

@MdAbubakar MdAbubakar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS Google IMA Ads Container Not Resizing on Fullscreen or Rotation — Fixed by Adding AutoresizingMask

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To Triage
Development

Successfully merging this pull request may close these issues.

1 participant