Setting playerlayer to nil
This commit is contained in:
parent
59d503c1ef
commit
7bcbf3e075
16
RCTVideo.m
16
RCTVideo.m
@ -287,15 +287,19 @@ static NSString *const statusKeyPath = @"status";
|
|||||||
|
|
||||||
#pragma mark - Lifecycle
|
#pragma mark - Lifecycle
|
||||||
|
|
||||||
- (void)removeFromSuperview
|
- (void)removeFromSuperview {
|
||||||
{
|
|
||||||
[_player pause];
|
|
||||||
[_progressUpdateTimer invalidate];
|
[_progressUpdateTimer invalidate];
|
||||||
[_playerLayer removeFromSuperlayer];
|
|
||||||
_player = nil;
|
|
||||||
_prevProgressUpdateTime = nil;
|
_prevProgressUpdateTime = nil;
|
||||||
_eventDispatcher = nil;
|
|
||||||
|
[_player pause];
|
||||||
|
_player = nil;
|
||||||
|
|
||||||
|
[_playerLayer removeFromSuperlayer];
|
||||||
|
_playerLayer = nil;
|
||||||
|
|
||||||
[_playerItem removeObserver:self forKeyPath:statusKeyPath];
|
[_playerItem removeObserver:self forKeyPath:statusKeyPath];
|
||||||
|
|
||||||
|
_eventDispatcher = nil;
|
||||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user