Skip to content

Conversation

@Ibad9
Copy link

@Ibad9 Ibad9 commented Nov 11, 2025

Fixes an issue https://github.com/TheWidlarzGroup/react-native-video/issues/4769 where the IMA ad container view did not resize correctly when device orientation changed on iOS.
Previously, adContainerView was initialised with a static frame (_video.bounds), so it didn’t update after rotation.

🛠️ Changes

  • Replaced frame-based layout with Auto Layout constraints to pin adContainerView to _video on all edges.
  • Ensures proper resizing on orientation change while retaining the existing memory leak fix.
  • Tested on iOS 15.1+ (iPhone simulators) — ads now stay correctly aligned after rotation.

✅ Verification

  • Verified that ads render correctly in both portrait and landscape modes.
  • Confirmed no new memory leaks or constraint warnings.
  • Maintains backward compatibility with existing React Native Video integrations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants