File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 30
30
31
31
func requestAds( ) {
32
32
guard let _video else { return }
33
+ // fixes RCTVideo --> RCTIMAAdsManager --> IMAAdsLoader --> IMAAdDisplayContainer --> RCTVideo memory leak.
34
+ let adContainerView = UIView ( frame: _video. bounds)
35
+ adContainerView. backgroundColor = . clear
36
+ _video. addSubview ( adContainerView)
37
+
33
38
// Create ad display container for ad rendering.
34
- let adDisplayContainer = IMAAdDisplayContainer ( adContainer: _video , viewController: _video. reactViewController ( ) )
39
+ let adDisplayContainer = IMAAdDisplayContainer ( adContainer: adContainerView , viewController: _video. reactViewController ( ) )
35
40
36
41
let adTagUrl = _video. getAdTagUrl ( )
37
42
let contentPlayhead = _video. getContentPlayhead ( )
You can’t perform that action at this time.
0 commit comments