Skip to content
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

fix(ios): destroy adsManager when player detach from super view (#3716) #3722

Conversation

Khuongnb
Copy link
Contributor

Summary

  • In iOS/tvOS, when the player is detached from the superview, the adsManager is not destroyed and keeps playing ads until they finish.

Motivation

Changes

  • Added releaseAds method to RCTIMAAdsManager.
  • Called releaseAds() in removeFromSuperview of RCTVideo.

Test Plan

  • Remove player when ads are playing; the adsManager should stop producing sound immediately.

@KrzysztofMoch
Copy link
Member

build fails because of pods cache... I will build this locally

@freeboub
Copy link
Collaborator

build fails because of pods cache... I will build this locally

I have a doubt that it builds without IMA, please double check that !

Copy link
Member

@KrzysztofMoch KrzysztofMoch left a comment

Choose a reason for hiding this comment

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

LGTM 🙌
@freeboub I was able to build successfully app with & without ADS
(not sure why CI builds fails tbh)

@KrzysztofMoch KrzysztofMoch merged commit e96c173 into TheWidlarzGroup:master May 1, 2024
3 of 6 checks passed
@Khuongnb Khuongnb deleted the bugfixes/destroy_adsmanager_on_superview_detach branch May 1, 2024 11:40
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.

3 participants